feat: Add category performance, update WebUI and OpenRouter integration, fix bugs
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using Predictalytics.Domain.Enums;
|
||||
|
||||
namespace Predictalytics.Domain.Entities;
|
||||
|
||||
public class TraderCategoryPerformance
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public int TraderId { get; set; }
|
||||
public Trader Trader { get; set; } = null!;
|
||||
|
||||
public MarketCategory Category { get; set; }
|
||||
|
||||
/// <summary>Total volume traded in this category (USD).</summary>
|
||||
public decimal TotalVolume { get; set; }
|
||||
|
||||
/// <summary>Total Profit/Loss in this category (USD).</summary>
|
||||
public decimal TotalPnL { get; set; }
|
||||
|
||||
/// <summary>Number of trades in this category.</summary>
|
||||
public int TotalTrades { get; set; }
|
||||
|
||||
/// <summary>Number of profitable trades in this category.</summary>
|
||||
public int WinningTrades { get; set; }
|
||||
|
||||
/// <summary>Calculated win rate for this category (0.0 - 1.0).</summary>
|
||||
public decimal WinRate => TotalTrades > 0 ? (decimal)WinningTrades / TotalTrades : 0;
|
||||
}
|
||||
Reference in New Issue
Block a user