Add Genetic workers
This commit is contained in:
69
src/Managing.Api/Models/Requests/RunGeneticRequest.cs
Normal file
69
src/Managing.Api/Models/Requests/RunGeneticRequest.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Api.Models.Requests;
|
||||
|
||||
/// <summary>
|
||||
/// Request model for running a genetic algorithm optimization
|
||||
/// </summary>
|
||||
public class RunGeneticRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// The ticker to optimize for
|
||||
/// </summary>
|
||||
public Ticker Ticker { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The timeframe to use for optimization
|
||||
/// </summary>
|
||||
public Timeframe Timeframe { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The start date for the backtest period
|
||||
/// </summary>
|
||||
public DateTime StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The end date for the backtest period
|
||||
/// </summary>
|
||||
public DateTime EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The starting balance for the backtest
|
||||
/// </summary>
|
||||
public decimal Balance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The population size for the genetic algorithm
|
||||
/// </summary>
|
||||
public int PopulationSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of generations to evolve
|
||||
/// </summary>
|
||||
public int Generations { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The mutation rate (0.0 - 1.0)
|
||||
/// </summary>
|
||||
public double MutationRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The selection method to use
|
||||
/// </summary>
|
||||
public string SelectionMethod { get; set; } = "tournament";
|
||||
|
||||
/// <summary>
|
||||
/// The percentage of elite individuals to preserve (1-50)
|
||||
/// </summary>
|
||||
public int ElitismPercentage { get; set; } = 15;
|
||||
|
||||
/// <summary>
|
||||
/// The maximum take profit percentage
|
||||
/// </summary>
|
||||
public double MaxTakeProfit { get; set; } = 4.0;
|
||||
|
||||
/// <summary>
|
||||
/// The list of eligible indicators to include in optimization
|
||||
/// </summary>
|
||||
public List<IndicatorType> EligibleIndicators { get; set; } = new();
|
||||
}
|
||||
Reference in New Issue
Block a user