Update scoring system

This commit is contained in:
2025-07-11 20:58:28 +07:00
parent 8a2b0ba323
commit 754a21da69
6 changed files with 304 additions and 95 deletions

View File

@@ -1,3 +1,5 @@
using static Managing.Common.Enums;
namespace Managing.Domain.Backtests;
public class BacktestScoringParams
@@ -11,6 +13,14 @@ public class BacktestScoringParams
public double Fees { get; }
public int TradeCount { get; }
public TimeSpan MaxDrawdownRecoveryTime { get; }
// New properties for enhanced scoring
public decimal MaxDrawdown { get; }
public decimal InitialBalance { get; }
public DateTime StartDate { get; }
public DateTime EndDate { get; }
public decimal FeesPaid { get; }
public Timeframe Timeframe { get; }
public BacktestScoringParams(
double sharpeRatio,
@@ -21,7 +31,12 @@ public class BacktestScoringParams
double totalPnL,
double fees,
int tradeCount,
TimeSpan maxDrawdownRecoveryTime)
TimeSpan maxDrawdownRecoveryTime,
decimal maxDrawdown = 0,
decimal initialBalance = 0,
DateTime startDate = default,
DateTime endDate = default,
Timeframe timeframe = Timeframe.OneHour)
{
SharpeRatio = sharpeRatio;
MaxDrawdownPc = maxDrawdownPc;
@@ -32,5 +47,10 @@ public class BacktestScoringParams
Fees = fees;
TradeCount = tradeCount;
MaxDrawdownRecoveryTime = maxDrawdownRecoveryTime;
MaxDrawdown = maxDrawdown;
InitialBalance = initialBalance;
StartDate = startDate;
EndDate = endDate;
Timeframe = timeframe;
}
}