Function yoy_inflation_coupon
pub(crate) fn yoy_inflation_coupon(
currency: &str,
accrual_start: NaiveDate,
accrual_end: NaiveDate,
payment_date: NaiveDate,
notional: f64,
day_count: Named<DayCountFraction>,
index: &str,
gearing: f64,
spread: f64,
lag_months: Option<u32>,
) -> PyResult<PyAnyCoupon>Expand description
One year-on-year inflation coupon: notional × accrual fraction × (gearing × (I(end)/I(start) − 1) + spread), accruing from accrual_start
to accrual_end under day_count and paid on payment_date in
currency, on a ratio of index levels.
index is a registered price index; each level is observed lag_months
back (the index’s own lag when None) under its own interpolation, a
published print first and the inflation curve otherwise. Cap, floor or
digitise it with Leg.with_collar / Leg.with_digital: each option is a
YoY optionlet off the index’s YoY vol surface.