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 GeneticSelectionMethod SelectionMethod { get; set; }

    /// <summary>
    /// The crossover method to use
    /// </summary>
    public GeneticCrossoverMethod CrossoverMethod { get; set; }

    /// <summary>
    /// The mutation method to use
    /// </summary>
    public GeneticMutationMethod MutationMethod { get; set; }

    /// <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();
} 