Function cms_spread_option
pub fn cms_spread_option<R: Scalar>(
index: &SwapIndex,
minus: &SwapIndex,
fixing: NaiveDate,
payment: NaiveDate,
mean_reversion: f64,
correlation: impl Into<CmsSpreadCorrelation>,
strike: f64,
kind: OptionKind,
view: &PricingView<'_, R>,
) -> Result<R, PricingError>Expand description
An option on the spread of two CMS rates, S₁ − S₂, fixing on fixing
and paid on payment, as a rate: a call pays (S₁ − S₂ − K)⁺, a put
(K − S₁ + S₂)⁺, each rate lognormal.
Each rate is taken at its linear-TSR adjusted mean mᵢ, with the
surface’s at-the-money vol at the fixing and its own tenor, and the two
are joined by correlation — a contract number (an f64 converts), or
the market’s mark for the pair, read in the mode from a view resolved
with it declared. On a normal surface the spread is normal:
Bachelier on m₁ − m₂ with standard deviation
√(σ₁² + σ₂² − 2ρσ₁σ₂)·√T. On a lognormal surface, conditioning on the
first rate leaves a Black put on the second, integrated over the first by
sixteen-point Gauss–Hermite. The put follows by parity.
§Errors
As cms_rate for either index, a lognormal surface on a non-positive
adjusted rate, and PricingError::MissingCmsSpreadCorrelation for a
market correlation the view does not hold.