Module coupons
Expand description
Coupon types. Every field here is passive contract data.
A coupon is a term sheet fragment: dates, a notional, a rate or a gearing
and spread, a day count, a currency. None of it is differentiable, and none
of it takes a scalar type parameter. The mode appears only when a coupon is
projected — AnyCoupon::project reads a forward curve in mode R and
produces a Cashflow<R> — so a book of trades is one type rather than one
type per pricing mode.
The set is a closed enum for the same reason the curve families are: the projection is generic over the mode, a generic method is not object-safe, and closing the set also retires the boxed-clone plumbing a trait object needs.
Structs§
- CmsCoupon
- A CMS coupon:
notional · τ · (g · CMS + s), the CMS rate the swap indextemplateattenorfixes onfixing_date— in advance, by the index’s fixing lag — convexity-adjusted by linear TSR atmean_reversionand paid onpayment_date. Apayoffcaps, floors or digitises the rate as on an IBOR coupon. - CmsSpread
Correlation Parse Error - A spelling that names no CMS spread correlation.
- CmsSpread
Leg - The swap index a CMS spread coupon subtracts, and the correlation that joins its rate to the first’s.
- Collar
- A cap and/or floor on a floating coupon’s rate
gearing · index + spread, as a decimal each. - CpiCoupon
- A CPI coupon:
notional · rate · tau · I(end)/base, paid on the payment date — a real rate on a notional carried up by a price index. - CpiRedemption
- A CPI coupon leg’s indexed notional:
notional · (I(T)/base − 1)where it pays the growth only, ornotional · I(T)/base,I(T)the index observed forobservationunder the index’s lag and interpolation, as aCpiCouponobserves its accrual end. - Digital
- Digital options on a floating coupon’s rate.
- Digital
Strike - One side of a digital: its strike on the coupon’s rate, what it pays, and which side of it the holder is on.
- Fixed
Rate Coupon - A fixed-rate coupon:
notional · rate · tau, paid on the payment date. - Fixing
Window - The window an index’s own rate spans, and the basis it is quoted on.
- Ibor
Coupon - An IBOR-style coupon: one fixing per period, geared and spread.
- Interpolated
Stub - ISDA 2006 §8.3 Linear Interpolation for a stub whose confirmation elects
it: the rate is
R_short + weight · (R_long − R_short), each rate read from the store where published and otherwise projected over its own window off its own index’s curve. - Multi
Reset Coupon - A floating coupon that resets several times and pays once: each reset’s
term rate, geared, combined over the accrual under a
ResetCompoundingmethod — the CAD, HKD or 3M-in-6M leg that pays less often than it fixes. - Observation
- One daily observation of an overnight index.
- Option
Terms 🔒 - What the optionlets on a coupon’s rate read: the rate’s gearing and spread, the currency whose cap vols price them, the time the vol is read at and the time its variance accrues over, and the surface’s tenor column.
- Overnight
Coupon - A compounded overnight (RFR) coupon.
- Range
Accrual Coupon - A range accrual:
notional · rate · tau · (days in range) / (days), each calendar day of the accrual period in range when the index’s fixing it observes lies in[lower, upper](a missing bound is open). - Range
Observation - One fixing a range accrual observes, and how many calendar days read it.
- Redemption
- A dated payment of a known amount — a redemption, a fee, a notional exchange.
- Reset
- One reset of a
MultiResetCoupon: its sub-period, its fixing date, and the index window it projects over. - Stub
Tenor - One of the two Designated Maturities an interpolated stub reads: the index it names and that index’s own window from the stub fixing’s value date.
- YoyInflation
Coupon - A year-on-year inflation coupon: `notional · τ · (g · (I(end)/I(start) − 1)
Enums§
- AnyCoupon
- The closed coupon set.
- CmsSpread
Correlation - Where a CMS spread coupon’s rate-to-rate correlation comes from.
- Direction
- Whether a leg’s payments are received or paid.
- Overnight
Coupon Error - Why an overnight coupon could not be built.
- Payoff
Error - Why an option on a coupon’s rate is not a payoff.
- Rate
Payoff - An option a floating coupon carries on its rate
gearing · index + spread— the payoff axis of the coupon layer, over any IBOR observation. - Reset
Compounding - How a multi-reset coupon combines its resets into one payment — the ISDA 2006 compounding methods (§6.3, Supplement 16) and day-weighted averaging.
Functions§
- averaged_
sum 🔒 Σ rᵢ·τᵢover the coupon’s observation strip — the numerator of an averaged overnight rate.- averaged_
sum_ 🔒by_ day averaged_sumfor a coupon that does not telescope: each day’s rate is read on its own, bounded, and accrued over its weight.- bounded 🔒
- A daily rate bounded by the coupon’s observation cap and floor.
- compose_
payoff 🔒 payoffon a coupon raterate = g·X + sstill to fix, whateverXobserves: the payoff axis of the coupon layer, composed over any observation that prices an optionlet on itself.optionlet(k, kind)is the undiscounted option onXatk, in the coupon’s payment terms. Each option on the rate atKis one onXat(K − s)/g, times|g|, a negative gearing swapping calls for puts. A collar isr − caplet(cap) + floorlet(floor); a digital is its call spread (seeDigital).- compounded_
growth 🔒 - compounded_
growth_ 🔒by_ day compounded_growthfor a coupon that does not telescope: each day’s rate is read on its own, bounded, and compounded over its weight.- day_
growth 🔒 - The compounded growth factor
∏(1 + r_d·tau_d)over the coupon’s days. - index_
tenor_ 🔒years - The registered tenor of the IBOR index
code, in years, when the registry holds it. - observation_
published 🔒 - Whether every month the observation of
indexfordateatlag_monthsreads is published — the observed level is then known, and an option on it is its intrinsic value. - observe_
day 🔒 - One overnight day under
FixingsView::observe’s rule, a day afteras_ofanswered here without the call:observecan only project it, and asking it day by day cost a third of a calibration. Both strip walks read through this, so the rule is stated once. - optioned 🔒
- A coupon rate
rate = g·F + sstill to fix, withpayoffon it: each option 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 atterms.expiryand the tenor, its variance overterms.variance. A collar isr − caplet(cap) + floorlet(floor); a digital is its call spread (seeDigital). - projected_
day 🔒 - The projected rate of one day off
curve, under the index’s day count:(DF(s)/DF(e))^(1/τ) − 1on BUS/252,(DF(s)/DF(e) − 1)/τotherwise. - telescopes 🔒
- Whether the coupon’s projected days can join telescoping runs: every rate accrues over its own span and no bound reads it. A lookback, a cut-off or a daily cap breaks that, and the coupon then takes the day-by-day walk. Both the per-day check and a pass over the strip cost a plain SOFR ladder over 10% of its calibration, so the weights are judged once at build.