Skip to main content

shocked_rate_smile

Function shocked_rate_smile 

fn shocked_rate_smile(
    smile: RateSmileRef<'_>,
    moved: impl Fn(f64, f64) -> f64,
) -> Option<RateSmile>
Expand description

market with the credit index index’s tranche model mark input moved by a parallel leg — absolutely unless the leg asks for a relative move — and re-pinned as the parameter it is, so the layout is kept. A market without the mark is carried through, as a vol leg on a surface it does not hold.

§Errors

ScenarioError::UnsupportedShape for a slope or a bucket, and ScenarioError::CreditModel for a result outside the mark’s range. market with the quoted futures prices leg selects moved by its parallel shift — absolutely in price points unless the leg says relatively — one contract, or every quoted one when contract is None. A rate smile moved node by node: a grid’s vols, or a SABR surface’s ATM vols with ρ and ν held. None when a node leaves (0, ∞).