Function shocked_spread_correlation
fn shocked_spread_correlation(
market: MarketContext,
leg: &ScenarioLeg,
first: &str,
second: &str,
) -> Result<MarketContext, ScenarioError>Expand description
market with its CMS spread correlation for the pair moved by leg —
absolutely unless the leg asks for a relative move — and re-pinned as the
parameters it is, so the layout is kept. A term structure moves pillar by
pillar, the leg’s shape read at each pillar’s expiry (the vol rule); a
flat mark has no expiry to read a shape at, so it takes a parallel move
only. A market without a mark for the pair is carried through, as a vol
leg on a surface it does not hold.
§Errors
ScenarioError::UnsupportedShape for a slope or a bucket on a flat
mark, and the store’s refusal of a result outside [-1, 1].