Struct CpiRedemption
pub struct CpiRedemption {
pub payment_date: NaiveDate,
pub payment_ordinal: i32,
pub notional: f64,
pub currency: Currency,
pub index: String,
pub lag_months: u32,
pub base_index: f64,
pub observation: NaiveDate,
pub growth_only: bool,
pub base_date: Option<NaiveDate>,
pub payoff: Option<RatePayoff>,
}Expand description
A CPI coupon leg’s indexed notional: notional · (I(T)/base − 1) where
it pays the growth only, or notional · I(T)/base, I(T) the index observed for observation
under the index’s lag and interpolation, as a CpiCoupon observes its
accrual end.
Fields§
§payment_date: NaiveDateThe payment date.
payment_ordinal: i32The payment date as a proleptic-Gregorian day number.
notional: f64The notional before indexation. Contract data.
currency: CurrencyThe currency.
index: StringThe price index’s registry code.
lag_months: u32The observation lag, in months.
base_index: f64The base index level. Contract data.
observation: NaiveDateThe date the index is observed for — the leg’s last accrual end.
growth_only: boolWhether only the notional’s growth is paid.
base_date: Option<NaiveDate>The date the base level stands for — the start of the indexation, which a payoff’s annualised strikes are measured from. Needed only by a payoff.
payoff: Option<RatePayoff>A collar on the indexed notional, or None. Its bounds are annualised
zero-coupon rates k: the ratio I(T)/base is held within
[(1+k_floor)^τ, (1+k_cap)^τ], τ = ACT/365F(base_date, observation)
— a linker’s deflation floor is floor = 0. Still to fix, each bound
is a zero-coupon optionlet on the ratio off the index’s CPI vol surface
(see crate::marketdata::inflation_vol::CpiVolSurface).
Implementations§
§impl CpiRedemption
impl CpiRedemption
pub fn with_payoff(self, payoff: RatePayoff, base_date: NaiveDate) -> Self
pub fn with_payoff(self, payoff: RatePayoff, base_date: NaiveDate) -> Self
This notional with payoff on its indexed growth, strikes annualised
from base_date.
pub fn rate_with<R: Scalar, C: CurveByIndex<R> + ?Sized>(
&self,
curves: &C,
fixings: &FixingsView<'_, R>,
as_of: NaiveDate,
) -> Result<R, CashflowError>
pub fn rate_with<R: Scalar, C: CurveByIndex<R> + ?Sized>( &self, curves: &C, fixings: &FixingsView<'_, R>, as_of: NaiveDate, ) -> Result<R, CashflowError>
What the notional pays per unit of notional — the ratio I(T)/base,
less one where only the growth is paid — with its collar, as of
as_of: settled on a published observation, otherwise the rate less a
zero-coupon call at the cap plus a put at the floor, through
the coupon layer’s payoff composition.
§Errors
CashflowError::NoIndexForCoupon where curves holds no inflation
for the index; CashflowError::MalformedPayoff for a digital or an
unanchored strike; CashflowError::PayoffWithoutCpiVols where an
option still to fix meets no CPI vols; the curve’s own errors.
Trait Implementations§
§impl Clone for CpiRedemption
impl Clone for CpiRedemption
§fn clone(&self) -> CpiRedemption
fn clone(&self) -> CpiRedemption
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more