DifferentialSharpeReward

Models & Types · AiDotNet.Finance.Trading.Rewards

Differential Sharpe Ratio reward (Moody & Saffell, 1998) — the canonical risk-adjusted objective for RL trading. It rewards the MARGINAL contribution of each step’s return to the online Sharpe ratio, so the agent is pushed toward smooth, consistent gains rather than volatile ones (a big gain that spikes variance can score LOWER than a smaller steady gain). Maintains exponentially-weighted first (A) and second (B) moments of the return with decay eta; the differential is D_t = (B·ΔA − 0.5·A·ΔB) / (B − A²)^{3/2}, which is the derivative of the Sharpe ratio w.r.t. the EWMA weight — a per-step, online, backprop-free shaping signal. An optional turnover penalty is subtracted.

Implements: IPortfolioReward

Constructors

Constructor Summary
DifferentialSharpeReward(double eta, double turnoverPenalty)

Methods

Method Summary
double Reward(PortfolioRewardContext context)
void Reset()