PortfolioRewardContext

Structs · AiDotNet.Finance.Trading.Rewards

The information a portfolio reward function needs at each environment step. All values are in double precision (reward shaping is scale-sensitive and does not need the environment’s generic numeric type): the realized one-step portfolio return (ALREADY net of trading frictions, which the environment deducts from cash), plus exposure/turnover/drawdown context so a reward can penalize churn, leverage, or losses.

Inheritance: ValueType → PortfolioRewardContext

Constructors

Constructor Summary
PortfolioRewardContext(double portfolioReturn, double turnover, double grossExposure, double shortExposure, double drawdown)

Properties

Property Summary
double Drawdown { get; } Current drawdown from the running peak portfolio value, in [0, 1].
double GrossExposure { get; } Gross exposure after the step: sum of |position notional| / portfolio value (1 = fully invested).
double PortfolioReturn { get; } One-step portfolio return, net of all frictions the environment applied this step.
double ShortExposure { get; } Short exposure after the step: sum of short position notional / portfolio value (>= 0).
double Turnover { get; } Fraction of portfolio value traded this step (sum of |Δnotional| / value) — turnover.