Skip to main content

Module bond_derivatives

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§

BondFuture
A bond future: a delivery date and the deliverable basket with its exchange-published conversion factors.
BondFutureAnalysis
The basket analysis: one row per deliverable, the cheapest to deliver, and the theoretical futures price off its forward.
BondFutureOption
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.
BondFutureOptionDiagnostics
The quantities a futures option is priced from, per 100 — what a trader reconciles against an exchange or vendor screen. Recombining european + early_exercise reproduces the per-100 model value.
BondFuturePosition
A bookable bond future position: a basket, a size, and a traded price.
BondOption
A European option on a fixed-coupon bullet bond, physically settled.
BondOptionDiagnostics
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.
DeliverableAnalysis
One deliverable’s analytics at a quoted futures price.

Enums§

BondFutureError
A bond future that cannot be analysed.
BondFutureOptionError
A bond future option that cannot be built, naming the field.
BondOptionEngine
Which model a bond option prices under.
BondOptionError
A bond option that cannot be built.
BondStrike
The option’s strike, in the market’s quoting alternatives. Price strikes are per 100 face.
BondStrikeKind
Which price a BondStrike is quoted on, without the number.
CmeMaturityRounding
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.
RepoTier
Which tier of the repo resolution supplied a deliverable’s carry curve. None on a row means the documented discount-curve fallback.

Functions§

bond_future_option_from_template
One long contract of the option of year-month under the futures option template code, struck at strike per 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_factor formula on half-year coupon periods, cn/(100·cf) the per-period notional yield, each coupon and the redemption discounted a further delay/daycount periods for a payment date that rolls off a weekend or holiday — delay the days it rolls, daycount the 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_year coupon periods, unrounded: each payment rolled following on paid_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 bond at a gross redemption yield of notional_coupon (a decimal, 0.04 for the Long Gilt), compounded semi-annually, settled on delivery_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 designated under the futures option template code, struck at strike per 100: its last trading day and the quarterly future it exercises into by FutureOptionTemplate::weekly, the rest as bond_future_option_from_template.