Add score

This commit is contained in:
2025-03-01 17:24:16 +07:00
parent e16f0a2e5d
commit bcf9d21b0a
7 changed files with 212 additions and 4 deletions

View File

@@ -50,7 +50,8 @@ public class Backtest
[Required] public MoneyManagement OptimizedMoneyManagement { get; set; }
[Required] public MoneyManagement MoneyManagement { get; set; }
public Dictionary<StrategyType, StrategiesResultBase> StrategiesValues { get; set; }
[Required] public Dictionary<StrategyType, StrategiesResultBase> StrategiesValues { get; set; }
[Required] public double Score { get; set; }
public string GetStringReport()
{

View File

@@ -0,0 +1,36 @@
namespace Managing.Domain.Backtests;
public class BacktestScoringParams
{
public double SharpeRatio { get; }
public double MaxDrawdownPc { get; }
public double GrowthPercentage { get; }
public double HodlPercentage { get; }
public double WinRate { get; }
public double TotalPnL { get; }
public double Fees { get; }
public int TradeCount { get; }
public TimeSpan MaxDrawdownRecoveryTime { get; }
public BacktestScoringParams(
double sharpeRatio,
double maxDrawdownPc,
double growthPercentage,
double hodlPercentage,
double winRate,
double totalPnL,
double fees,
int tradeCount,
TimeSpan maxDrawdownRecoveryTime)
{
SharpeRatio = sharpeRatio;
MaxDrawdownPc = maxDrawdownPc;
GrowthPercentage = growthPercentage;
HodlPercentage = hodlPercentage;
WinRate = winRate;
TotalPnL = totalPnL;
Fees = fees;
TradeCount = tradeCount;
MaxDrawdownRecoveryTime = maxDrawdownRecoveryTime;
}
}