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; }
/// Subcategory (e.g. "Basketball", "Elections", "Bitcoin").
public string Subcategory { get; set; } = string.Empty;
/// Total volume traded in this category (USD).
public decimal TotalVolume { get; set; }
/// Total Profit/Loss in this category (USD).
public decimal TotalPnL { get; set; }
/// Number of trades in this category.
public int TotalTrades { get; set; }
/// Number of profitable trades in this category.
public int WinningTrades { get; set; }
/// Calculated win rate for this category (0.0 - 1.0).
public decimal WinRate => TotalTrades > 0 ? (decimal)WinningTrades / TotalTrades : 0;
}