Module mm
Expand description
Money-market templates: deposits (MoneyMarket) and rate futures (RateFuture).
Money-market templates — the mm group covers single-currency front-end
instruments quoted as tagged pillars: deposits (type = "MoneyMarket", a simple
accrual to a convention-advanced maturity), rate futures (type = "RateFuture",
a forward accrual over a fixed contract length), and forward-rate agreements
(type = "FRA", a forward accrual on a projection curve).
All three are product-bearing: a rate-future template builds a
RateFuture, a FRA template builds a ForwardRateAgreement, and a deposit
template builds a MoneyMarketDeposit, each priced through the ordinary
market context.
Each group reached that state separately, and the deposit reached it last. The futures and FRA groups were pillar-only for a while — the conventions were complete and the calibration helpers consumed them, but the product builder rejected them, so a curve could be calibrated from a contract nobody could hold.
The deposit group was pillar-only on purpose, and that decision has now been reversed rather than eroded. The argument for it was that building a product from a convention-only template should fail loud rather than silently produce something, and it was sound for exactly as long as nothing could price a deposit. Once something can, refusing to build one stops protecting a caller and starts withholding the market’s standard short-end pillar: without it a real bootstrap loses about five orders of magnitude of agreement at every pillar it has.
A previous version of this paragraph claimed the pillar-only status was
“asserted by the registry-wide parity check”. No such check existed — the
only code that distinguished the group was the binding’s family_of,
naming it in an error message. The claim is deleted rather than moved. What
observes a group’s status now is that each family has a constructor test:
tests/money_market_deposit.rs builds a deposit from USD-SOFR-DEPO and
calibrates with it, which a convention-only group could not pass.
Statics§
- MM_
DEPOSIT - Registry rows for this template group.
- MM_FRA
- Registry rows for this template group.
- MM_
FUTURE - Registry rows for this template group.
Functions§
- cad_
corra_ 3m_ fut CAD-CORRA-3M-FUTtemplate.- chf_
saron_ 3m_ fut CHF-SARON-3M-FUTtemplate.- deposit 🔒
- Builder for a money-market deposit template.
namedoubles as the registry code. - eur_
estr_ 3m_ fut EUR-ESTR-3M-FUTtemplate.- eur_
estr_ depo EUR-ESTR-DEPOtemplate.- eur_
euribor_ 3m_ fra EUR-EURIBOR-3M-FRAtemplate.- eur_
euribor_ 3m_ fut EUR-EURIBOR-3M-FUTtemplate.- eur_
euribor_ 6m_ fra EUR-EURIBOR-6M-FRAtemplate.- fra 🔒
- Builder for a forward-rate-agreement template.
namedoubles as the registry code; the index conventions (forward-curve name, accrual period, day-count) are resolved from the index registry byindex_code, so the FRA pins the same forward curve as the index’s vanilla swap. - gbp_
sonia_ 3m_ fut GBP-SONIA-3M-FUTtemplate.- gbp_
sonia_ depo GBP-SONIA-DEPOtemplate.- ibor_
index 🔒 - Resolves a term (IBOR) index by code, panicking on a wiring error (caught by the registry round-trip test).
- rate_
future 🔒 - Builder for a rate-future template.
namedoubles as the registry code; the underlying index is resolved from the index registry byindex_code, soindex_namecarries the projection-curve key the contract’s forwards belong to (the join key projection-side futures pillars validate against); the contract accrual length isperiod_monthsmonths.contract_notionalandcontract_accrualare the published contract specification, andcontract_accrualis the exchange’s fixed period fraction — not the accrual ofday_countover the real contract dates. SeeFutureTemplate::contract_accrualfor why conflating the two misprices the contract’s bp value by 1.1%–2.2%.averagedsays the contract settles on the average of its daily prints; see [FutureTemplate::averaged]. - rate_
index_ 🔒name_ and_ currency - Resolves any rate index (overnight or term) by code to its curve name — the
projection-namespace key (
"SOFR","EURIBOR"), panicking on a wiring error (caught by the registry round-trip test). The projection-curve key and ISO currency of any rate index (overnight or term), resolved by code. The currency is not recoverable from the name —"SOFR"does not say USD — so a template that needs both takes both from one lookup. - usd_
effr_ 1m_ fut USD-EFFR-1M-FUTtemplate.- usd_
sofr_ 1m_ fut USD-SOFR-1M-FUTtemplate.- usd_
sofr_ 3m_ fut USD-SOFR-3M-FUTtemplate.- usd_
sofr_ depo USD-SOFR-DEPOtemplate.