* Start building with orlean

* Add missing file

* Serialize grain state

* Remove grain and proxies

* update and add plan

* Update a bit

* Fix backtest grain

* Fix backtest grain

* Clean a bit
This commit is contained in:
Oda
2025-07-30 11:03:30 +02:00
committed by GitHub
parent d281d7cd02
commit 3de8b5e00e
59 changed files with 2626 additions and 677 deletions

View File

@@ -1,20 +1,26 @@
using Managing.Domain.Bots;
using Orleans;
namespace Managing.Domain.Backtests;
/// <summary>
/// Lightweight backtest class for Orleans serialization
/// Contains only the essential properties needed for backtest results
/// </summary>
[GenerateSerializer]
public class LightBacktest
{
public string Id { get; set; } = string.Empty;
public TradingBotConfig Config { get; set; } = new();
public decimal FinalPnl { get; set; }
public int WinRate { get; set; }
public decimal GrowthPercentage { get; set; }
public decimal HodlPercentage { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public decimal? MaxDrawdown { get; set; }
public decimal Fees { get; set; }
public double? SharpeRatio { get; set; }
public double Score { get; set; }
public string ScoreMessage { get; set; } = string.Empty;
[Id(0)] public string Id { get; set; } = string.Empty;
[Id(1)] public TradingBotConfig Config { get; set; } = new();
[Id(2)] public decimal FinalPnl { get; set; }
[Id(3)] public int WinRate { get; set; }
[Id(4)] public decimal GrowthPercentage { get; set; }
[Id(5)] public decimal HodlPercentage { get; set; }
[Id(6)] public DateTime StartDate { get; set; }
[Id(7)] public DateTime EndDate { get; set; }
[Id(8)] public decimal? MaxDrawdown { get; set; }
[Id(9)] public decimal Fees { get; set; }
[Id(10)] public double? SharpeRatio { get; set; }
[Id(11)] public double Score { get; set; }
[Id(12)] public string ScoreMessage { get; set; } = string.Empty;
}