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: NaiveDateAccrual start.
accrual_end: NaiveDateAccrual end.
payment_date: NaiveDatePayment date.
notional: f64The notional the coupon accrues on.
gearing: f64Multiplicative gearing on the index rate.
spread: f64Additive spread, as a decimal.
index: StringThe index this coupon resets against.
fixing_date: Option<NaiveDate>The reset date. None leaves the period always projected.
day_count: DayCountFractionThe accrual day count.
accrual: f64The accrual year fraction under day_count, evaluated once at build.
accrual_start_ordinal: i32Accrual start, accrual end, and payment as proleptic-Gregorian day numbers — the form a curve is queried in, computed once at build.
accrual_end_ordinal: i32See accrual_start_ordinal.
payment_ordinal: i32See accrual_start_ordinal.
currency: CurrencyThe 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
impl IborCoupon
pub fn with_payoff(self, payoff: RatePayoff) -> Self
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>
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>
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
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
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
impl Clone for IborCoupon
§fn clone(&self) -> IborCoupon
fn clone(&self) -> IborCoupon
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more