15 lines
535 B
C#
15 lines
535 B
C#
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Predictalytics.Application.Interfaces;
|
|
|
|
public interface IPositionPnLEngine
|
|
{
|
|
/// <summary>
|
|
/// 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.
|
|
/// </summary>
|
|
Task RecalculateTraderPositionsAsync(int traderId, CancellationToken ct = default);
|
|
}
|