Skip to main content

shocked_rate_quotes

Function shocked_rate_quotes 

fn shocked_rate_quotes(
    market: MarketContext,
    leg: &ScenarioLeg,
    id: &CurveId,
) -> Result<MarketContext, ScenarioError>
Expand description

market with the rate curve id bootstrapped again from its par quotes moved by leg (see moved_quotes), in the form its ladder was solved in — over the curves its refit holds — and re-pinned, with its new ladder and refit, under every role that shares the refit: a self-discounting curve pinned as a discount and a projection moves in both. A curve calibrated over the moved one keeps its own curve. A market that does not hold id is carried through.

§Errors

ScenarioError::NoQuotes when the curve carries no refit; ScenarioError::Refit when a rung cannot be re-struck or the moved ladder does not solve.