Struct PredictedPnl
pub struct PredictedPnl {
pub rows: Vec<(MarketInputId, f64)>,
pub quadratic: f64,
pub gamma: GammaTerms,
pub resets: f64,
pub before: f64,
pub after: f64,
pub residual: f64,
}Expand description
A predicted explain: first order per input, second order along the move.
Fields§
§rows: Vec<(MarketInputId, f64)>risk_i · Δ_i per input, in lift order.
quadratic: f64½ Δᵀ H Δ, from one directional second-order valuation.
gamma: GammaTermsThe quadratic split by the axis groups that moved: own gamma per group, cross gamma per pair, and the closure of the split.
resets: f64The reset step: the exact revaluation from each new print’s forecast
to the print, for the prints the ending market holds and the starting
market does not. Zero when there are none. The first and second order
are taken from the market with the prints, so resets + first_order + quadratic + residual is after − before.
before: f64The book’s value against the starting market — with each new print standing at the forecast it replaced, where there are any, since a market lacking a print the book has accrued does not value.
after: f64The book’s value against the ending market.
residual: f64after − before − resets − Σ rows − quadratic: what the reset step
and the first and second order do not explain.
Implementations§
§impl PredictedPnl
impl PredictedPnl
pub fn first_order(&self) -> f64
pub fn first_order(&self) -> f64
The first-order total.
pub fn own_gamma(&self) -> &[(Option<RiskAxis>, f64)]
pub fn own_gamma(&self) -> &[(Option<RiskAxis>, f64)]
The quadratic’s own-gamma terms, one per moved group: GammaTerms::own.
pub fn cross_gamma(&self) -> &[(Option<RiskAxis>, Option<RiskAxis>, f64)]
pub fn cross_gamma(&self) -> &[(Option<RiskAxis>, Option<RiskAxis>, f64)]
The quadratic’s cross-gamma terms, one per moved pair:
GammaTerms::cross.
pub fn gamma_closure(&self) -> f64
pub fn gamma_closure(&self) -> f64
quadratic less the own and cross terms: GammaTerms::closure.
Trait Implementations§
§impl Clone for PredictedPnl
impl Clone for PredictedPnl
§fn clone(&self) -> PredictedPnl
fn clone(&self) -> PredictedPnl
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more