Skip to main content

explain

Function explain 

pub(crate) fn explain(
    py: Python<'_>,
    book: &PyBook,
    before: &PyMarket,
    after: &PyMarket,
    order: Option<Vec<Named<RiskAxis>>>,
) -> PyResult<PyExplainReport>
Expand description

The step-revaluation explain of book between two markets, moving the axes in order (the core’s default order when None).

Each step takes the axis’s curves as after holds them — a scenario’s shock included — and its parameters at after’s values, so a market under a scenario is explained on the axes the scenario moved, and the last step is book.npv(after) exactly.