Skip to main content

cpi_redemption

Function cpi_redemption 

pub(crate) fn cpi_redemption(
    currency: &str,
    payment_date: NaiveDate,
    notional: f64,
    index: &str,
    base_index: f64,
    observation: Option<NaiveDate>,
    lag_months: Option<u32>,
    growth_only: bool,
    base_date: Option<NaiveDate>,
) -> PyResult<PyAnyCoupon>
Expand description

A CPI leg’s indexed notional paid on payment_date: notional × (I/base_index − 1) where only the growth is paid (the default) or notional × I/base_index, I the index observed for observation (the payment date when None) lag_months back (the index’s own lag when None) under its own interpolation. base_date is the date the base level stands for: a collar on the notional (Leg.with_collar) is struck in annualised zero-coupon rates from it, so a floor at 0 is a linker’s deflation floor.