using System.Threading; using System.Threading.Tasks; namespace Predictalytics.Application.Interfaces; public interface IPositionPnLEngine { /// /// Recalculates all positions, average costs, and PnL values for a trader by re-playing their trade history. /// Updates the TraderPosition records in the database, calculates realized/unrealized PnL, /// and updates the Trader's TotalPnl and WinRate. /// Task RecalculateTraderPositionsAsync(int traderId, CancellationToken ct = default); }