Skip to main content

Module linker

Module linker 

Expand description

Street quote conventions for inflation-linked bonds.

A linker is priced by scaling its real flows by the index at a plainly lagged date. It is quoted by a rule its market publishes, and the two are not the same rule โ€” the same split a nominal bond already has between curve-space and yield-space. Nothing here changes what a linker is worth; it changes what number the market puts on it.

Most of that number is arithmetic this crate already has. TIPS, Canadian RRBs and UK gilts at the three-month lag all quote a real yield on the real flows, and InflationLinkedBond::real is exactly that bond โ€” so their quotes are dirty_price on the real twin at a street basis, and no second implementation of the price/yield relationship appears here. What those three markets genuinely need is the two pieces below: a reference-index observation and a rounding chain.

Three markets are more than that, and each says so: UK gilts at the eight-month lag leave real space for money space, Brazilian NTN-Bs discount on BUS/252 against a VNA, and Australian capital-indexed bonds carry a quarterly Kt recursion.

Structsยง

AnbimaParcel
One discounted parcel of an ANBIMA quotation.
AnbimaQuote
An ANBIMA quotation: its parcels, the quotation, and the unit price.
AustralianSnapshot ๐Ÿ”’
The yield-independent AOFM inputs.
LinkerInvoice
What a linker actually settles at, per 100 nominal face.
RoundingChain
What a market does to its reference index and to the ratio built from it.
UkDmoSnapshot ๐Ÿ”’
The yield-independent inputs to the DMO case formula.

Enumsยง

LinkerQuoteError
A street quote asked of a market that does not serve it, or that could not be produced.
MonthObservation
How a market reads the index inside the lagged month.
RoundingStep
One rounding step in a marketโ€™s published chain.

Constantsยง

DMO_ASSUMED_INFLATION
The DMOโ€™s standing inflation assumption for eight-month-lag money/real arithmetic.
REAL_YIELD_FAMILY ๐Ÿ”’
The markets whose street quote is a real yield on the real flows.

Functionsยง

anbima_nominal_value
The official VNA at date: 1000 ยท I(date)/I_base, truncated to six decimals.
anbima_price
The ANBIMA quotation at a real yield (tir, per annum as a decimal).
anbima_price_from_snapshot ๐Ÿ”’
The unit price over a snapshot, applying the same truncation chain anbima_price does without materialising parcels.
anbima_snapshot ๐Ÿ”’
The yield-independent ANBIMA flow snapshot: per remaining flow its date, business-day count, amount, and truncated exponent.
anbima_yield_from_price
The real yield implied by an ANBIMA unit price, by bisection over the exact truncation chain.
australian_coupon_factor
The AOFM p for the payment at next_coupon: half the percentage CPI movement over the two quarters ending two quarters before that paymentโ€™s quarter, p = roundโ‚‚(50ยท(CPIโ‚œ/CPIโ‚œโ‚‹โ‚‚ โˆ’ 1)).
australian_indexation_factor
The Kt at date in ratio form: roundโ‚‚(100 ยท I(lagged(date))/I_base).
australian_kt_step
One exact step of the AOFM Kt chain: Kt = roundโ‚‚(Ktโ‚‹โ‚ ยท (1 + p/100)).
australian_price_from_real_yield
The AOFM price per 100 face at a quarterly-compounded real yield.
australian_price_from_snapshot ๐Ÿ”’
The AOFM price formula at a trial quarterly-compounded real yield:
australian_real_yield_from_price
The quarterly-compounded real yield implied by an AOFM price.
australian_snapshot ๐Ÿ”’
days_in_month ๐Ÿ”’
Days in dateโ€™s own month โ€” the denominator of the daily interpolation.
invoice
The settlement invoice for a real-yield-quoting linker at a real clean quote.
lagged_month_start ๐Ÿ”’
The first of the month lag months before date.
month_point ๐Ÿ”’
One monthly index point: a published fixing where there is one, the curve otherwise.
months_between ๐Ÿ”’
Whole months from fromโ€™s month to toโ€™s month.
period_containing ๐Ÿ”’
The coupon period containing settlement, as (start, end).
periods_as_f64 ๐Ÿ”’
A whole-period count as a float. A bond has few periods, so the conversion cannot lose anything; written out rather than cast so the pedantic lints stay on.
quotes_real_yield
Whether convention quotes a real yield, given the bondโ€™s lag.
real_clean_price_of ๐Ÿ”’
The real clean price per 100: the real dirty price less the real twinโ€™s accrued. Accrued is in real terms too, so nothing indexes here.
real_dirty_price_of ๐Ÿ”’
The real dirty price per 100 at a street real yield.
real_price
The real price at real_yield on the requested basis โ€” one door for a caller holding a parsed PriceBasis rather than a branch over two signatures.
real_yield
The street real yield implied by a real clean quote โ€” the inverse of real_price at the clean basis.
real_yield_basis
The street basis a real yield is quoted on: semiannual for every market in this family.
reference_index
The street reference index at date.
require_anbima ๐Ÿ”’
require_australian ๐Ÿ”’
require_bullet ๐Ÿ”’
The sovereign street kernels quote a bullet; an amortising real twin is refused by name rather than read as one.
require_real_yield ๐Ÿ”’
require_uk ๐Ÿ”’
round_dp
Round x to the nearest value at dp decimal places.
street_index_ratio
The street index ratio at date, by the bondโ€™s own market convention.
street_rule
The observation and rounding chain a marketโ€™s street quote reads by.
trunc_dp
Truncate x toward zero at dp decimal places.
uk_anchor ๐Ÿ”’
The DMO projection anchor a = (RPI_L/RPI_B)ยทu^{2k/12}: the latest published RPI deflated back k months to the next dividendโ€™s defining month, with u = (1+ฯ€)^{โˆ’1/2}.
uk_dmo_snapshot ๐Ÿ”’
uk_latest_rpi ๐Ÿ”’
The latest published monthly index print strictly before settlementโ€™s month, scanning back up to eighteen months of fixings and falling back to the curve at the previous month start.
uk_money_accrued
The money accrued per 100 at settlement.
uk_money_dirty_from_snapshot ๐Ÿ”’
The DMO case formula at a trial real yield:
uk_money_price
The money dirty price per 100 at a semiannual real yield.
uk_money_yield
The DMO money yield implied by a real yield under assumed annual inflation pi: (1 + y/2) = (1 + ฯ/2)ยท(1 + ฯ€)^{1/2}.
uk_real_yield_from_money
The real yield implied by a DMO money yield โ€” the inverse of uk_money_yield.
uk_real_yield_from_money_dirty
The semiannual real yield implied by a money dirty price โ€” the inverse of uk_money_price, by bisection over the case formula.