Skip to main content

strip_caplet_smile

Function strip_caplet_smile 

pub fn strip_caplet_smile(
    index: &IborIndex,
    effective: NaiveDate,
    terminations: &[NaiveDate],
    strikes: &[f64],
    vols: &[Vec<f64>],
    first_caplet_excluded: bool,
    scheme: StripScheme,
    convention: VolConvention,
    market: &MarketContext,
    tolerance: Tolerance,
) -> Result<RateVolSurface, PricingError>
Expand description

Caplet vols from a quoted cap matrix: one smiled surface in which each strike column is the caplet ladder stripped at that strike.

This is how a cap market is quoted — a grid of flat term vols over (termination × strike) — and how it is stripped: each strike column on its own, because a cap at one strike says nothing about a caplet at another, then interpolated across strikes at read time. The caplets’ fixings do not depend on the strike, so every column lands on the same expiry nodes and the columns assemble into one surface.

vols carries one row per termination and one entry per strike.

§Errors

UnsupportedForProduct if the matrix is ragged, an axis is empty or not ascending, or a column refuses to strip; otherwise whatever resolution, the pricer or the surface reports.