Function caplet_forwards
pub fn caplet_forwards(
market: &MarketContext,
index: &IborIndex,
effective: NaiveDate,
termination: NaiveDate,
first_caplet_excluded: bool,
) -> Result<(Vec<f64>, Vec<Vec<f64>>), PricingError>Expand description
The caplet expiries and forwards on market of the cap on index from
effective to termination — the caplets strip_caplet_vols strips,
filtered as its nodes are (one per caplet still to fix, a repeated expiry
dropped), so the rows line up with the surface it strips. The forwards
come one per row, the shape calibrate_sabr reads off a one-tenor cap
surface.
§Errors
PricingError::UnsupportedForProduct for a cap that cannot be built
(or, excluding its first caplet, has none left); otherwise what resolving
its curves refuses with.