Function explain
pub fn explain(
book: &Book,
before: &MarketContext,
after: &MarketContext,
order: &[RiskAxis],
) -> Result<ExplainReport, PnlError>Expand description
The step-revaluation explain of book from before to after: first
the prints after holds that before does not, published onto before
as the ExplainLeg::Resets leg (present only when there are any), then one
axis group at a time in order: at its step an axis takes after’s
rate, repo, security-spread, credit or inflation curves (shock transforms
included) and after’s value of every parameter on it. Axes absent from
order, and inputs on no axis, move together in the final leg, so the last
step is after.
§Errors
The layout guard, a valuation, or PnlError::MoveOutsideParameters when
the last step does not value bit for bit as after — the markets differ by
something no step moves.