Skip to main content

cpi_coupon

Function cpi_coupon 

pub(crate) fn cpi_coupon(
    currency: &str,
    accrual_start: NaiveDate,
    accrual_end: NaiveDate,
    payment_date: NaiveDate,
    notional: f64,
    fixed_rate: f64,
    day_count: Named<DayCountFraction>,
    index: &str,
    base_index: f64,
    lag_months: Option<u32>,
) -> PyResult<PyAnyCoupon>
Expand description

One CPI coupon: notional × fixed_rate × accrual fraction × I(end)/base_index, accruing from accrual_start to accrual_end under day_count and paid on payment_date in currency.

index is a registered price index; its level is observed for the accrual end lag_months back (the index’s own lag when None) under its own interpolation, a published print first and the inflation curve otherwise. base_index is the contract’s base level. A leg holding CPI coupons declares the index as its inflation curve.