Module bond_derivatives
Expand description
Bond derivatives: the European option on a cash bond, and the bond future’s deliverable basket.
The bond option is quoted on yield volatility and priced on price
volatility, and the bridge between the two is the forward’s modified
duration. Under the yield-vol engine a vol read off the currency’s bond
yield vol surface at (expiry, forward modified duration) becomes a price
vol by dP = −D·P·dy: an absolute per-100 vol σ_y·D·F under the
Normal convention (priced by Bachelier), a relative vol σ_y·D·y
under Lognormal (Black-76). It is applied to the forward dirty price at
exercise settlement — the spot price carried on the bond’s repo curve, or
on its discount curve when it declares none — against the dirty cash
strike, and the premium discounts from expiry. The Hull-White engine prices
the same option by the Jamshidian decomposition on the deliverable flows.
The bond future carries a delivery date and a basket of
(ISIN, conversion factor) deliverables; conversion factors are
exchange-published data, never computed. Its analytics — gross and net
basis, implied repo, the cheapest to deliver and the theoretical price —
live with the market layer, which resolves the deliverables’ curves.
Every field is passive contract data.
Re-exports§
pub use crate::statics::listed_future::ExerciseStyle;pub use crate::statics::listed_future::PremiumStyle;
Structs§
- Bond
Future - A bond future: a delivery date and the deliverable basket with its exchange-published conversion factors.
- Bond
Future Analysis - The basket analysis: one row per deliverable, the cheapest to deliver, and the theoretical futures price off its forward.
- Bond
Future Option - An option on a listed bond future: the right to a futures position at the strike, priced off the quoted futures price and the contract’s option vol surface.
- Bond
Future Option Diagnostics - The quantities a futures option is priced from, per 100 — what a trader
reconciles against an exchange or vendor screen. Recombining
european + early_exercisereproduces the per-100 model value. - Bond
Future Position - A bookable bond future position: a basket, a size, and a traded price.
- Bond
Option - A European option on a fixed-coupon bullet bond, physically settled.
- Bond
Option Diagnostics - The yield-vol engine’s intermediate quantities — what a trader reconciles against a vendor screen. Reapplying the closed-form Black/Bachelier formula to these reproduces the premium.
- Deliverable
- A basket entry already resolved to the bond it delivers — what the analytics consume. The security-master path builds these from ISINs; a caller holding bonds already builds them directly.
- Deliverable
Analysis - One deliverable’s analytics at a quoted futures price.
Enums§
- Bond
Future Error - A bond future that cannot be analysed.
- Bond
Future Option Error - A bond future option that cannot be built, naming the field.
- Bond
Option Engine - Which model a bond option prices under.
- Bond
Option Error - A bond option that cannot be built.
- Bond
Strike - The option’s strike, in the market’s quoting alternatives. Price strikes are per 100 face.
- Bond
Strike Kind - Which price a
BondStrikeis quoted on, without the number. - CmeMaturity
Rounding - How the CME counts a deliverable’s remaining months past whole years: rounded down to a quarter for the 10-year note, Ultra 10-year, bond and Ultra bond contracts, and to a whole month for the 2-, 3- and 5-year notes.
- Repo
Tier - Which tier of the repo resolution supplied a deliverable’s carry curve.
Noneon a row means the documented discount-curve fallback.
Functions§
- bond_
future_ option_ from_ template - One long contract of the option of
year-monthunder the futures option templatecode, struck atstrikeper 100: the template’s premium style, exercise style, currency and point value, its expiry by the template’s rule on its calendar, and its underlying the quarterly future the month exercises into. - cme_
conversion_ factor - The CME Treasury futures conversion factor: the price of $1 of the bond
at a 6% yield,
a·[(coupon/2) + c + d] − b, rounded to four decimals, as CME’s Calculating U.S. Treasury Futures Conversion Factors defines it. - eurex_
btp_ conversion_ factor - Eurex’s conversion factor for a semi-annual-coupon Italian government bond
delivered into the Euro-BTP future, rounded to seven decimals, as
Conversion factor calculation for Euro-BTP Future states it: the
eurex_conversion_factorformula on half-year coupon periods,cn/(100·cf)the per-period notional yield, each coupon and the redemption discounted a furtherdelay/daycountperiods for a payment date that rolls off a weekend or holiday —delaythe days it rolls,daycountthe actual days of the period after it. The payments roll following on the TARGET calendar, where BTPs pay. - eurex_
chf_ conversion_ factor - Eurex’s conversion factor for a CHF-denominated Swiss Confederation bond delivered into the CONF future, as Conversion factor calculation for CHF-denominated bonds states it:
- eurex_
conversion_ factor - Eurex’s conversion factor for an annual-coupon EUR-denominated bond, rounded to six decimals, as Conversion factor calculation for EUR-denominated bonds states it:
- eurex_
periodic_ 🔒factor - The Eurex formula on
per_yearcoupon periods, unrounded: each payment rolled following onpaid_on, if given, and discounted the further fraction of a period it rolls. - futures_
option_ 🔒template - ice_
gilt_ conversion_ factor - The ICE Long Gilt conversion factor: the clean price per unit nominal of
bondat a gross redemption yield ofnotional_coupon(a decimal, 0.04 for the Long Gilt), compounded semi-annually, settled ondelivery_month_start— the first calendar day of the delivery month, business day or not — rounded to seven decimals, as ICE’s contract specification defines it. - on_
template 🔒 - template_
error 🔒 - weekly_
bond_ future_ option_ from_ template - One long contract of the weekly option designated to expire on
designatedunder the futures option templatecode, struck atstrikeper 100: its last trading day and the quarterly future it exercises into byFutureOptionTemplate::weekly, the rest asbond_future_option_from_template.