Skip to main content

InflationLinkedBond

Struct InflationLinkedBond 

pub struct InflationLinkedBond {
    pub real: FixedRateBond,
    pub index: String,
    pub base_index: f64,
    pub lag_months: u32,
    pub collateral: CollateralSpec,
    pub redemption_floor: bool,
    pub issuer: Option<CreditCurveId>,
    pub security_spread: Option<String>,
    pub interpolation: Option<IndexInterpolation>,
}
Expand description

An inflation-linked bond: a real coupon on a nominal schedule, every flow scaled by I(lagged(t)) / I_base against a named price index.

A bet on the index, not on the coupon. The lagged index level is a published fixing when one exists at the observation date and the curve’s projection otherwise; the redemption is floored at par when the floor is set — an option on the terminal index level, worth exactly nothing once the index ends above its base.

Fields§

§real: FixedRateBond

The real twin: a fixed-rate bullet on the real coupon, whose flows are the un-indexed amounts.

§index: String

The price index, by name — the key the market stores the inflation curve and its fixings under.

§base_index: f64

The index level the flows are scaled against.

§lag_months: u32

The indexation lag, in calendar months.

§collateral: CollateralSpec

The discounting key.

§redemption_floor: bool

Whether the redemption is floored at par.

§issuer: Option<CreditCurveId>

The issuer, when the bond is valued risky.

§security_spread: Option<String>

A security-spread key composed onto the discounting.

§interpolation: Option<IndexInterpolation>

How the index is observed inside the month, where the bond states it; None reads the index’s registered one.

Implementations§

§

impl InflationLinkedBond

pub fn with_interpolation(self, interpolation: IndexInterpolation) -> Self

This bond observing its index under interpolation rather than the index’s registered convention, for every coupon’s ratio and the redemption’s.

pub fn new( currency: Currency, index: impl Into<String>, base_index: f64, real_coupon: f64, lag_months: u32, frequency: Frequency, day_count: DayCountFraction, face: f64, issue: NaiveDate, maturity: NaiveDate, ) -> Result<Self, CurveError>

A capital-indexed, par-floored linker on index — the TIPS shape — collateralised in its own currency.

§Errors

CurveError::Malformed if the real bullet cannot be built.

pub fn with_redemption_floor(self, floored: bool) -> Self

Sets whether each principal payment is floored at par: the redemption at maturity, and every paydown of an amortising real twin.

pub fn with_amortisation( self, outstanding: Vec<f64>, ) -> Result<Self, CurveError>

This linker with its real twin paying principal down on outstanding, one fraction of the original face per coupon period, as FixedRateBond::with_amortisation takes it. Each paydown is indexed at its period’s ratio, as the coupons are.

§Errors

The real twin’s refusal of a malformed profile.

pub fn with_payment_calendar( self, calendar: Arc<dyn Calendar>, convention: BusinessDayConvention, ) -> Self

This linker paying on calendar under convention, by forwarding to its real twin’s with_payment_calendar.

Only the date each flow is paid and discounted on rolls. The accrual does not move, and neither does the index observation, which is read at the accrual end — a coupon that settles two days late for a holiday pays the same indexed amount.

pub fn with_accrual_adjustment( self, calendar: Arc<dyn Calendar>, convention: BusinessDayConvention, ) -> Self

This linker accruing over boundaries rolled on calendar under convention, by forwarding to its real twin’s with_accrual_adjustment. Each flow’s index observation is read at its rolled accrual end. Set it before with_amortisation.

pub fn issued_by(self, issuer: CreditCurveId) -> Self

Tags the bond to issuer’s credit.

pub fn spread_by(self, key: impl Into<String>) -> Self

Composes the security spread under key onto the discounting.

pub fn lagged(&self, date: NaiveDate) -> NaiveDate

The date whose index level a flow on date is scaled by: date less the indexation lag, in whole months.

This is the pricing observation. It is what a linker’s cashflows are actually scaled by, and it reads no market quote convention — a bond’s value does not depend on the market its quote is expressed in.

The street counterpart is linker::reference_index, which most markets read daily-interpolated inside the month and then round by their own published chain. The two are different rules answering different questions, and they may legitimately disagree.

§Panics

If the date arithmetic overflows, which no bond’s dates do.

§

impl InflationLinkedBond

pub fn index_ratio<R: Scalar>( &self, view: &PricingView<'_, R>, date: NaiveDate, ) -> Result<R, PricingError>

The index ratio applied to a flow paying at date: the level at the lagged observation — a published fixing first, the curve otherwise — over the base index.

§Errors

The product error if the view carries no inflation curve; otherwise whatever the curve reports.

fn indexed_flows<R: Scalar>( &self, view: &PricingView<'_, R>, ) -> Result<Vec<(NaiveDate, R)>, PricingError>

The indexed flows after the valuation: each real coupon scaled by its ratio, the redemption scaled or — when the floor binds — returned as the par amount unmultiplied, so the kink carries a one-sided derivative and no spurious index sensitivity.

Trait Implementations§

§

impl Clone for InflationLinkedBond

§

fn clone(&self) -> InflationLinkedBond

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for InflationLinkedBond

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl PartialEq for InflationLinkedBond

§

fn eq(&self, other: &InflationLinkedBond) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<R: Scalar> Priceable<R> for InflationLinkedBond

§

fn npv(&self, view: &PricingView<'_, R>) -> Result<R, PricingError>

The indexed flows discounted on the collateral curve; survival-weighted on the current indexed face when tagged.

§

fn par_rate(&self, _view: &PricingView<'_, R>) -> Result<R, PricingError>

The par rate — the fixed rate at which the product is worth nothing. Read more
§

fn par_spread(&self, _view: &PricingView<'_, R>) -> Result<R, PricingError>

The par (breakeven) floating-leg spread. Zero for a product with no floating leg. Read more
§

impl PricingRiskFactors for InflationLinkedBond

§

fn risk_factors(&self) -> Result<RiskFactors<'_>, PricingError>

The market data this product is priced against. Read more
§

impl Product for InflationLinkedBond

§

fn currency(&self) -> Currency

The currency the product pays in. An FX product values in its quote currency; a book converts.
§

fn contract_dates(&self) -> Vec<(&'static str, NaiveDate)>

The contract dates the product resolved to, as (name, date) pairs — exactly the dates its stated constructor takes, so a product built through a derived form can be read back and rebuilt through the stated one. Empty for a product with no stated form. No default: every product states which it is — see AnyInstrument::contract_dates.
§

fn legs(&self) -> Option<Vec<&Leg>>

The legs the product itself holds, in a declared order, or None for a product that holds none — see AnyInstrument::legs. No default: every product states which it is.
§

fn final_payment_date(&self) -> Option<NaiveDate>

The date of the product’s final payment, where a calibration rung can be built on it; None for a product no ladder is built from.
§

fn restruck_at_rate(&self, _rate: f64) -> Option<AnyInstrument>

This product re-struck at the par rate rate — the scalar a par calibration rung on it is quoted in — or None for a product that carries no such scalar. What a quote scenario moves a rung to.
§

fn restruck_at_spread(&self, _spread: f64) -> Option<AnyInstrument>

This product re-struck at the basis spread spread on its spread leg, or None for a product that quotes none.
§

impl StructuralPartialEq for InflationLinkedBond

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.