Skip to main content

quote_delta

Function quote_delta 

pub fn quote_delta(
    risk: &RiskVector,
    market: &MarketContext,
    axis: RiskAxis,
) -> f64
Expand description

The P&L of a unit parallel move of axis’s quote, from the risk vector a pass already produced.

The chain rule over the entries belonging to axis: each is weighted by ∂p/∂q, the move a unit quote move makes in the parameter the ladder differentiated. A discount or projection curve stores log discount factors and a survival curve ln S, so a unit parallel move of the quote they are read in — a zero rate, a hazard — sends the pillar at τ years by −τ. Every other lifted input already is its own quote — a repo quote, a spread pillar, an inflation level, an FX spot, a vol node — and is weighted by one.

A derivative, not a bump: the result is per unit quote, so × 1e-4 is the per-basis-point figure. It agrees with the same move applied as a Scenario to the second order that separates a derivative from a finite difference.

The arithmetic itself lives on RiskFrame, which owns this reading and the par one together so the two cannot drift: a par ladder that did not sum to its own zero total would be two answers to one question.