Skip to main content

IborCoupon

Struct IborCoupon 

pub struct IborCoupon {
Show 17 fields pub accrual_start: NaiveDate, pub accrual_end: NaiveDate, pub payment_date: NaiveDate, pub notional: f64, pub gearing: f64, pub spread: f64, pub index: String, pub fixing_date: Option<NaiveDate>, pub day_count: DayCountFraction, pub accrual: f64, pub accrual_start_ordinal: i32, pub accrual_end_ordinal: i32, pub payment_ordinal: i32, pub currency: Currency, pub fixing_window: Option<FixingWindow>, pub interpolation: Option<InterpolatedStub>, pub payoff: Option<RatePayoff>,
}
Expand description

An IBOR-style coupon: one fixing per period, geared and spread.

The coupon holds which index it references and when it resets, not what the index printed. A published fixing is a market observation with its own risk axis, so freezing one onto the trade would quietly delete that axis: a book of already-reset coupons would report no fixing sensitivity at all, and nothing would say so. Whether a reset is realised is then a question about the valuation date rather than about the coupon.

Fields§

§accrual_start: NaiveDate

Accrual start.

§accrual_end: NaiveDate

Accrual end.

§payment_date: NaiveDate

Payment date.

§notional: f64

The notional the coupon accrues on.

§gearing: f64

Multiplicative gearing on the index rate.

§spread: f64

Additive spread, as a decimal.

§index: String

The index this coupon resets against.

§fixing_date: Option<NaiveDate>

The reset date. None leaves the period always projected.

§day_count: DayCountFraction

The accrual day count.

§accrual: f64

The accrual year fraction under day_count, evaluated once at build.

§accrual_start_ordinal: i32

Accrual start, accrual end, and payment as proleptic-Gregorian day numbers — the form a curve is queried in, computed once at build.

§accrual_end_ordinal: i32

See accrual_start_ordinal.

§payment_ordinal: i32

See accrual_start_ordinal.

§currency: Currency

The coupon’s currency.

§fixing_window: Option<FixingWindow>

The index’s own rate window. None projects over the accrual period, which is the only sound reading for a coupon carrying no index tenor.

§interpolation: Option<InterpolatedStub>

The two tenors a stub electing ISDA 2006 §8.3 Linear Interpolation reads, or None for a coupon that reads its own index alone.

§payoff: Option<RatePayoff>

A cap and/or floor on the coupon’s rate, or None for a plain one. An option on the coupon’s rate — a cap and floor, or a digital — or None for a plain coupon.

Implementations§

§

impl IborCoupon

pub fn with_payoff(self, payoff: RatePayoff) -> Self

This coupon with payoff on its rate.

pub fn with_stub( self, index: &IborIndex, rule: &StubRule, ) -> Result<Self, StubInterpolationError>

This coupon with its stub reading the index as rule says.

IndexTenor reads the index’s full Designated Maturity from the accrual start; OwnAccrual projects over the accrual period itself (the default); Interpolated blends the two named tenors by ISDA 2006 §8.3 linear interpolation.

§Errors

StubInterpolationError if the interpolated stub’s tenors do not bracket the stub’s length.

fn optioned_rate<R: Scalar, C: CurveByIndex<R> + ?Sized>( &self, payoff: &RatePayoff, curves: &C, fixings: &FixingsView<'_, R>, as_of: NaiveDate, ) -> Result<R, CashflowError>

The rate a coupon carrying an option on its rate is worth.

A printed reset pays RatePayoff::settle of its rate. Otherwise the forward rate r = g·F + s — F the index forward, or the §8.3 blend for an interpolated stub — with each option on it an optionlet on the index at (K − s)/g, times |g|, a negative gearing swapping calls for puts; Bachelier or Black-76 by the surface’s convention, the vol read in the mode at the fixing and the index tenor. A collar is r − caplet(cap) + floorlet(floor); a digital is its call spread (see Digital).

§

impl IborCoupon

pub fn on_index( index: &IborIndex, accrual_start: NaiveDate, accrual_end: NaiveDate, payment_date: NaiveDate, notional: f64, day_count: DayCountFraction, currency: Currency, gearing: f64, spread: f64, ) -> Self

A term coupon on index over [accrual_start, accrual_end), built by the one rule every term-coupon builder applies: it fixes on the index’s own lag before the accrual starts — in good business days on the index’s calendar, as the market publishes and the store keys the fixing — and a regular period projects over the index’s own window, a stub over its accrual (term_fixing_window). The amount accrues over the accrual period on day_count.

Trait Implementations§

§

impl Clone for IborCoupon

§

fn clone(&self) -> IborCoupon

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 IborCoupon

§

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

Formats the value using the given formatter. Read more
§

impl PartialEq for IborCoupon

§

fn eq(&self, other: &IborCoupon) -> 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 StructuralPartialEq for IborCoupon

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.