Capability Matrix
Every capability the engine declares, with the evidence behind it. This page is generated from the same registry that serves GET /api/v1/capabilities, so it cannot say one thing while the API says another.
93 capabilities — 74 validated against an independent oracle, 19 experimental. Engine version 0.1.0.
What the statuses mean
ga-validated — Validated against an independent third-party oracle. The vectors are in the repository and the comparison runs in CI.
experimental — Implemented and tested against its own source, but not yet checked against an independent third-party oracle — or knowingly an approximation. Use it with the limitations below in view.
Status is derived from evidence, never asserted. A capability reaches ga-validated because a third-party oracle fixture is attached to it, and anything flagged as an approximation is capped at experimental regardless of how well it tests.
Market data is a separate axis. A capability that needs a discount or forward curve is not less validated — it needs an integration before its numbers describe today's market rather than the inputs you handed it.
The matrix
| Capability | Pricer | Status | Validated against | Market data | Source |
|---|---|---|---|---|---|
commodity.asian | commodity_asian_turnbull_wakeman | experimental (approximation) | QuantLib | takes every input on the request | Turnbull & Wakeman (1991) moment matching |
commodity.barrier | commodity_barrier_ikeda_kunitomo | ga-validated | QuantLib | takes every input on the request | Rubinstein & Reiner (1991) for effectively one-sided barriers; Ikeda & Kunitomo (1992) kernel entry point with zero-carry commodity mapping |
commodity.forward | commodity_forward | ga-validated | Closed form | takes every input on the request | Discounted difference of two forwards; no single citation |
commodity.future | commodity_future | ga-validated | Closed form | takes every input on the request | Cost-of-carry forward price; no single citation |
commodity.quanto | commodity_quanto_black76 | ga-validated | Closed form | takes every input on the request | Black (1976) on a quanto-drift-adjusted forward |
commodity.spread | commodity_spread_kirk | experimental (approximation) | — | takes every input on the request | Kirk (1995), Correlation in the Energy Markets |
commodity.storage | commodity_storage_lsm | ga-validated | Deterministic dynamic program | needs a discount or forward curve | Two-pass Boogert-De Jong least-squares Monte Carlo on a Schwartz one-factor spot |
commodity.swing | commodity_swing_lsm | ga-validated | Closed form | takes every input on the request | Longstaff-Schwartz least-squares Monte Carlo over (spot, rights remaining) |
commodity.vanilla | commodity_black76 | ga-validated | QuantLib | takes every input on the request | Black (1976) on the forward |
credit.cdo_tranche | credit_cdo_tranche_gaussian_copula | ga-validated | Closed form | needs a discount or forward curve | One-factor Gaussian copula on a homogeneous pool; the module cites no paper |
credit.cds | credit_cds | ga-validated | QuantLib | needs a discount or forward curve | Two-leg reduced-form CDS decomposition over a piecewise-constant hazard |
credit.cds_option | credit_cds_option | ga-validated | QuantLib | needs a discount or forward curve | Black (1976) applied to the forward spread |
credit.digital_default_swap | credit_digital_default_swap | ga-validated | QuantLib | needs a discount or forward curve | The CDS decomposition with a fixed digital payment; no single citation |
credit.nth_to_default | credit_nth_to_default_gaussian_copula | ga-validated | Closed form | needs a discount or forward curve | Li (2000), Gaussian copula for correlated default times |
credit.total_return_swap | credit_total_return_swap | ga-validated | Closed form | needs a discount or forward curve | Financed-long decomposition; no single citation |
equity.american | american_baw | ga-validated | FinancePy, QuantLib | takes every input on the request | Barone-Adesi & Whaley (1987) |
equity.american | american_bjerksund_stensland | ga-validated | FinancePy, QuantLib | takes every input on the request | Barone-Adesi & Whaley (1987) |
equity.american | binomial_tree | ga-validated | QuantLib | takes every input on the request | Cox, Ross & Rubinstein (1979); Leisen-Reimer; Jarrow-Rudd; Tian |
equity.asian | asian_arithmetic_seasoned | experimental (approximation) | FinancePy, QuantLib | needs a historical fixing series | Turnbull & Wakeman (1991); Levy (1992); Kemna & Vorst (1990) |
equity.autocallable | equity_autocallable_mc | experimental | Closed form, DerivFabric reference reductions | takes every input on the request | Black-Scholes/Garman-Kohlhagen GBM risk-neutral simulation; Huang & Luo (2022) for autocallable benchmark alternatives |
equity.barrier | barrier_ikeda_kunitomo | ga-validated | QuantLib | takes every input on the request | Rubinstein & Reiner (1991) for effectively one-sided barriers; Ikeda & Kunitomo (1992) kernel entry point |
equity.basket | basket_levy | experimental (approximation) | — | needs a discount or forward curve | Levy (1992), moment matching to a lognormal basket |
equity.binary | binary_analytical | ga-validated | QuantLib | takes every input on the request | Black-Scholes digital closed forms |
equity.chooser | equity_chooser_rubinstein | ga-validated | QuantLib | takes every input on the request | Rubinstein (1991), simple chooser |
equity.cliquet | cliquet_bs | ga-validated | Closed form | needs a historical fixing series | Sum of per-period forward-start Black-Scholes values |
equity.compound | equity_compound_geske | ga-validated | Geske closed form | takes every input on the request | Geske (1979), compound options |
equity.convertible | equity_convertible_bond_floor_approx | experimental (approximation) | — | takes every input on the request | Bond floor plus a damped Black-Scholes exchange option; not a published model |
equity.double_barrier | double_barrier_ikeda_kunitomo | ga-validated | QuantLib | takes every input on the request | Ikeda & Kunitomo (1992) |
equity.equity_linked_note | equity_linked_note_static_replication | ga-validated | QuantLib | takes every input on the request | Static replication into a discount bond and vanilla calls |
equity.forward | equity_forward_cost_of_carry | ga-validated | Closed form | takes every input on the request | Cost-of-carry forward against the contracted price; no single citation |
equity.forward_start | equity_forward_start_rubinstein | ga-validated | QuantLib | takes every input on the request | Rubinstein (1990), forward-start options — exact under lognormal scale invariance |
equity.index_future | equity_index_future | ga-validated | Closed form | takes every input on the request | Cost-of-carry forward price; no single citation |
equity.local_vol | dupire | ga-validated | QuantLib | needs a volatility surface | Dupire (1994) |
equity.lookback | lookback_conze_viswanathan | ga-validated | FinancePy | takes every input on the request | Conze & Viswanathan (1991); Goldman, Sosin & Gatto (1979) |
equity.partial_lookback | partial_lookback_heynen_kat | experimental (approximation) | — | takes every input on the request | Heynen & Kat (1994), partial lookback options |
equity.rainbow | rainbow_mc | ga-validated | Closed form | needs a discount or forward curve | Correlated lognormal Monte Carlo on the extremum of N assets |
equity.reverse_convertible | equity_reverse_convertible_analytic | ga-validated | QuantLib | takes every input on the request | Static replication into cash-or-nothing and asset-or-nothing digitals |
equity.rough_bergomi | equity_rough_bergomi_hybrid_mc | experimental (approximation) | QuantLib | takes every input on the request | Bayer, Friz & Gatheral (2016); Bennedsen, Lunde & Pakkanen (2017) for the hybrid scheme |
equity.rough_heston | equity_rough_heston_mc | experimental (approximation) | QuantLib | takes every input on the request | El Euch & Rosenbaum (2019) |
equity.shout | equity_shout_binomial | experimental (approximation) | — | takes every input on the request | Binomial tree with a single optimal shout; no single citation |
equity.spread | spread_kirk | experimental (approximation) | QuantLib | takes every input on the request | Kirk (1995) |
equity.touch | equity_touch_rubinstein_reiner | ga-validated | First-passage-time quadrature | takes every input on the request | Rubinstein & Reiner (1991) binary barriers; eigenfunction expansion for the double barrier |
equity.vanilla | bs_analytical | ga-validated | FinancePy, QuantLib | takes every input on the request | Black & Scholes (1973); Merton (1973) |
equity.vanilla.heston | equity_vanilla_heston_carr_madan | ga-validated | QuantLib | takes every input on the request | Heston (1993); Carr & Madan (1999) |
equity.vanilla.sabr | equity_vanilla_sabr_hagan | experimental (approximation) | — | needs a volatility surface | Hagan, Kumar, Lesniewski & Woodward (2002), "Managing Smile Risk" |
equity.variance_swap | variance_swap_flat_variance | ga-validated | Closed form | takes every input on the request | Discounted (fair variance - strike variance) times tenor; no single citation |
equity.worst_of_autocallable | equity_worst_of_autocallable_mc | experimental | DerivFabric reference reductions | takes every input on the request | Correlated Black-Scholes basket simulation; structured reduction fixture |
fx.asian | fx_asian_turnbull_wakeman | experimental (approximation) | QuantLib | takes every input on the request | Turnbull & Wakeman (1991) moment matching |
fx.barrier | fx_barrier_ikeda_kunitomo | ga-validated | QuantLib | takes every input on the request | Rubinstein & Reiner (1991) for effectively one-sided barriers; Ikeda & Kunitomo (1992) kernel entry point with FX carry substitution |
fx.basket | fx_basket_levy | experimental (approximation) | — | needs a discount or forward curve | Levy (1992) moment matching, on the shared equity basket kernel with an FX carry |
fx.digital | fx_digital_reiner_rubinstein | ga-validated | QuantLib | takes every input on the request | Reiner & Rubinstein (1991) binary forms under Garman-Kohlhagen |
fx.double_barrier | fx_double_barrier_ikeda_kunitomo | ga-validated | QuantLib | takes every input on the request | Ikeda & Kunitomo (1992) kernel with FX carry substitution |
fx.forward | fx_forward | ga-validated | Closed form | takes every input on the request | Covered interest parity on a discounted forward differential; no single citation |
fx.future | fx_future | ga-validated | Closed form | takes every input on the request | Covered interest parity forward rate; no single citation |
fx.ndf | fx_ndf_deliverable_equivalent | ga-validated | Closed form | needs a discount or forward curve | Covered interest parity, valued as the deliverable equivalent; no single citation |
fx.quanto | fx_quanto_garman_kohlhagen | ga-validated | Closed form | takes every input on the request | Garman & Kohlhagen (1983) with the standard quanto drift adjustment |
fx.tarf | fx_tarf_monte_carlo | ga-validated | Closed form | takes every input on the request | Monte Carlo under risk-neutral lognormal FX; no single citation |
fx.vanilla | fx_garman_kohlhagen | ga-validated | QuantLib | takes every input on the request | Garman & Kohlhagen (1983) |
fx.window_barrier | fx_window_barrier_monte_carlo | ga-validated | Closed form | takes every input on the request | Monte Carlo under risk-neutral lognormal FX; no single citation |
inflation.bond | inflation_bond | ga-validated | Closed form | needs a discount or forward curve | Real-yield discounted indexed cashflows; no single citation |
inflation.cap_floor | inflation_cap_floor | ga-validated | Closed form | needs a discount or forward curve | Black (1976) on the inflation forward; Bachelier below zero |
inflation.jarrow_yildirim | inflation_yoy_jarrow_yildirim | experimental (approximation) | QuantLib | needs a discount or forward curve | Jarrow & Yildirim (2003) |
inflation.yoy_swap_curve | inflation_yoy_swap | ga-validated | Closed form | needs a discount or forward curve | Discounted forward CPI ratios against a fixed leg; no single citation |
inflation.zc_swap_curve | inflation_zc_swap | ga-validated | Closed form | needs a discount or forward curve | Discounted forward CPI |
rates.amortizing_bond | rates_amortizing_bond | ga-validated | Closed form | needs a discount or forward curve | Discounted amortising cashflows; no single citation |
rates.asset_swap | rates_asset_swap_par_par | ga-validated | Closed form | needs a discount or forward curve | Par/par asset swap arithmetic; no single citation |
rates.basis_swap | rates_basis_swap_dual_curve | ga-validated | Closed form | needs a discount or forward curve | Two-floating-leg discounted cashflow; no single citation |
rates.bond | rates_bond | ga-validated | QuantLib | needs a discount or forward curve | Standard discounted cashflow; no single citation |
rates.bond_option | rates_bond_option_hull_white | ga-validated | Closed form | needs a discount or forward curve | Hull & White (1990); Jamshidian (1989) |
rates.bond_option_black | rates_bond_option_black | ga-validated | QuantLib | needs a discount or forward curve | Black (1976) |
rates.callable_bond | rates_callable_bond_hull_white | ga-validated | Closed form | takes every input on the request | Hull-White trinomial lattice, two-stage displacement |
rates.callable_range_accrual | rates_callable_range_accrual_hull_white | experimental | DerivFabric reference reductions | needs a discount or forward curve | Hull & White (1990, 1994) trinomial short-rate lattice |
rates.cap_floor | rates_cap_floor | ga-validated | QuantLib | needs a discount or forward curve | Black (1976) |
rates.caplet_black | rates_caplet_black | ga-validated | QuantLib | needs a discount or forward curve | Black (1976) |
rates.cms_cap | rates_cms_cap_black | ga-validated | Closed form | needs a discount or forward curve | Hagan, Convexity Conundrums (2003), linear terminal-swap-rate form |
rates.cms_caplet | rates_cms_caplet_black | ga-validated | Closed form | needs a discount or forward curve | Hagan, Convexity Conundrums (2003), linear terminal-swap-rate form |
rates.cms_spread_bachelier | rates_cms_spread_bachelier | ga-validated | QuantLib | needs a discount or forward curve | Bachelier (1900); normal-model CMS spread |
rates.collar | rates_collar | ga-validated | QuantLib | needs a discount or forward curve | Black (1976) per caplet and floorlet |
rates.commercial_paper | rates_commercial_paper_discount | ga-validated | Closed form | takes every input on the request | Bank-discount purchase price; no single citation |
rates.compounding_swap | rates_compounding_swap | ga-validated | Closed form | needs a discount or forward curve | Compounded floating leg against a fixed leg; no single citation |
rates.currency_swap | rates_currency_swap_dual_curve | ga-validated | Closed form | needs a discount or forward curve | Two-leg discounted cashflow with an FX conversion; no single citation |
rates.deposit | rates_deposit | ga-validated | QuantLib | needs a discount or forward curve | Money-market simple-interest terminal value; no single citation |
rates.float_bond_option | rates_float_bond_option_black | ga-validated | Closed form | takes every input on the request | Black (1976) on a forward bond price |
rates.fra | rates_fra | ga-validated | QuantLib | needs a discount or forward curve | Standard discounted-settlement FRA arithmetic; no single citation |
rates.ois_future | rates_ois_future | ga-validated | Closed form | needs a discount or forward curve | Hull, Options, Futures and Other Derivatives, futures convexity |
rates.ois_swap | rates_ois_swap | ga-validated | QuantLib | needs a discount or forward curve | Standard OIS discounted cashflow; no single citation |
rates.option_embedded_float_bond | rates_option_embedded_float_bond_hull_white | ga-validated | Closed form | takes every input on the request | Hull-White trinomial lattice, two-stage displacement |
rates.prdc | rates_prdc_lsm | experimental | DerivFabric reference reductions | needs a discount or forward curve | Garman & Kohlhagen (1983); Longstaff & Schwartz (2001) least-squares Monte Carlo |
rates.stir_future | rates_stir_future | ga-validated | Closed form | needs a discount or forward curve | Hull, Options, Futures and Other Derivatives, Eurodollar futures convexity |
rates.swap | rates_swap | ga-validated | QuantLib | needs a discount or forward curve | Standard fixed-versus-float discounted cashflow; no single citation |
rates.swaption | rates_swaption | ga-validated | QuantLib | needs a discount or forward curve | Black (1976) |
rates.swaption_lg2f | rates_swaption_lg2f | ga-validated | QuantLib | needs a discount or forward curve | Brigo & Mercurio (2006), Interest Rate Models, eq. 4.31 |
rates.target_redemption_note | rates_target_redemption_note_mc | experimental | DerivFabric reference reductions | needs a discount or forward curve | Hull & White (1990); Luo & Shevchenko (2015) for TARN finite-difference benchmark design |
Conventions and limitations
The part of a pricing library that is normally undocumented. Each entry states the conventions its numbers assume and the regimes where it degrades — including for capabilities we consider production-grade, because every numerical method has both.
commodity_asian_turnbull_wakeman
commodity.asian · v1 · experimental.
Source. Turnbull & Wakeman (1991) moment matching
Conventions.
- Act/365F day count
- Monitored on the instrument's fixing schedule
- Spot is treated as the forward; zero cost of carry
Limitations.
- The shared equity Asian route with a zero-carry substitution, the same pattern
commodity.barrierdeclares. It is not a commodity-specific model: no seasonality, no forward-curve term structure, no convenience yield. - Priced through its own adapter against the eleven zero-dividend QuantLib arithmetic vectors in
quantlib_asian_facade_vectors.rs. The other three carry a dividend and the route hard-codes zero carry, so they describe a contract it cannot express and are excluded rather than compared. Worst case 1.0397% relative. - Moment-matching approximation: the average of lognormals is not lognormal. The residual is the method's, monotone in volatility — 0.09%-0.60% at sigma 0.20, 0.90%-1.04% at sigma 0.40.
- No seasoning; averaging starts at the valuation date.
Fingerprint. fp:v1:blake3:e5fca4bc8f2b7272560ed3358221f872d47129db2d9bc87c2b3251f49413c9d9 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
commodity_barrier_ikeda_kunitomo
commodity.barrier · v1 · ga-validated.
Source. Rubinstein & Reiner (1991) for effectively one-sided barriers; Ikeda & Kunitomo (1992) kernel entry point with zero-carry commodity mapping
Conventions.
- Act/365F day count
- Continuous monitoring
- Commodity forward carried as spot with zero convenience-yield input
Limitations.
- Commodity single barriers reuse the shared one-sided barrier route as Black-76:
market.spotis the forward, so the drift is zero. Agreement 2.8e-9 against QuantLib across 96 vectors. - The carry was passed as
(rate = r, dividend = 0)under a comment reading 'forward = spot, carry = 0' until August 2026 — the kernel therefore grew the forward atr, applying the carry a second time. That is 5.13% on the underlying at 5% over a year and 2.7% on the price.commodity.vanillais Black-76 on the same field and was already GA-validated, so the two commodity routes disagreed about what one snapshot field meant. - Continuous monitoring only; discrete monitoring is not adjusted.
- Flat rate and volatility; no smile, seasonality or convenience-yield term structure.
Fingerprint. fp:v1:blake3:a36d1c7240f7bdabe426f475d578b77b6a899b4845cd85fc04389d6956797025 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
commodity_forward
commodity.forward · v1 · ga-validated.
Source. Discounted difference of two forwards; no single citation
Conventions.
- Act/365F; the value is a notional-scaled mark to market
spotis the current forward for the same delivery date
Limitations.
- The caller must supply a forward matched to the settlement date. Passing a physical spot silently gives a wrong mark: there is no cost-of-carry step, convenience yield or storage cost on this route.
- Flat discounting; a rate curve on the snapshot is ignored.
- Price only; no Greeks.
Fingerprint. fp:v1:blake3:814c8fbb8c81b03350e53ebca7bfcba79e813fdffbd0c8f5b45696917d9886b8 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
commodity_future
commodity.future · v1 · ga-validated.
Source. Cost-of-carry forward price; no single citation
Conventions.
- Act/365F day count
spotis a physical spot here, unlike the option and forward routes, and is grown by the carrydividendcarries the convenience yield on this route
Limitations.
- The number is a fair price per unit, not a present value. It is not scaled by
contract_sizeand not netted against a traded price, so it must not be summed into a portfolio value as if it were a mark. - Storage cost is fixed at zero and cannot be supplied through the facade —
MarketSnapshotcarries no field for it. - No futures/forward convexity adjustment on this route.
Fingerprint. fp:v1:blake3:fad6c65c8fc512f9c26143afb07dbd36d1f3b1ab509d6c607554469d971e64df — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
commodity_quanto_black76
commodity.quanto · v1 · ga-validated.
Source. Black (1976) on a quanto-drift-adjusted forward
Conventions.
- Act/365F;
spotis read as the commodity forward, with no carry applied - The FX volatility and the commodity/FX correlation travel on the trade, not the snapshot — a market-data bump will never move them
- Price and all five Greeks scaled by notional
Limitations.
- No second interest rate enters at all:
foreign_rateanddividendwere measured to leave the price bit-identical, so the quanto effect is purely the volatility-correlation drift adjustment on a cross-currency product. - The payout currency must differ from the commodity's own: a quanto into the same currency has nothing to convert, so such a contract is refused rather than priced.
- Greeks are differentiated with respect to the adjusted forward, so delta is a forward delta and none of them is a sensitivity to the FX volatility or the correlation the quanto depends on.
- The drift adjustment
-rho * sigma_asset * sigma_fxis pinned by identities rather than by a reference price: put-call parity on the adjusted forward at five correlations, opposite monotonicity for calls and puts, and the plain Black-76 collapse at zero correlation. No external oracle prices a commodity quanto.
Fingerprint. fp:v1:blake3:c4da6dfa5daa378a09768acaead68be6977f43fa4fbee66da291c1145c707a61 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
commodity_spread_kirk
commodity.spread · v1 · experimental.
Source. Kirk (1995), Correlation in the Energy Markets
Conventions.
- Act/365F; each leg's
spotis that leg's forward - Correlation comes from the market view, and is required
Limitations.
- Kirk's approximation is exact only at a zero spread strike and degrades as the strike moves away from it. Both halves are now measured. At zero strike Kirk is Margrabe's exchange option and reproduces it to 8.7e-16 — the identity the approximation is built on. Away from it the error is one-signed on each side and grows with |K|, undervaluing below and overvaluing above: at S1 = 100, S2 = 90, volatilities 30% and 25%, rho = 0.5 and one year, it runs -1.52% at K = -20, -0.98% at -10, -0.11% at 0, +1.12% at 10, +2.66% at 20 and +5.92% at 40, against a 400,000-path Monte Carlo — 4 to 12 standard errors out everywhere except the zero-strike case, which is inside sampling error as it must be.
- The shared equity spread route with both carries set to zero — the same pattern
commodity.barrierandcommodity.asiandeclare. The QuantLib oracle behindequity.spreaddrives the equity entry point and does not cover this one. - Requires a market view with two named legs and a correlation; a single snapshot is refused rather than approximated.
- Delta and gamma are finite differences on leg one's forward with leg two held fixed: there is no leg-two delta and no cross-gamma.
Fingerprint. fp:v1:blake3:25ff8fbd0c7c7694e7d45218eed893f01e49c820c32db32c041719bd5a432512 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
commodity_storage_lsm
commodity.storage · v1 · ga-validated.
Source. Two-pass Boogert-De Jong least-squares Monte Carlo on a Schwartz one-factor spot
Conventions.
- Act/365F;
spotis a genuine spot under mean reversion, not a forward - Injection and withdrawal rates are per year and are converted to per-step volumes on a monthly decision grid
- 60,000 paths on a fixed seed; an 8-interval inventory grid
start_dateopens the lease: the decision grid runs from it to maturity, and the spot diffuses to it before the first decision. A start in the past clamps to the valuation date, so a seasoned trade prices on its remaining life.
Limitations.
- Terminal inventory is worth nothing — there is no salvage value and no end-of-season constraint. This is structural rather than unwired: the instrument carries no terminal-inventory field and the kernel's backward induction starts from a hardcoded zero terminal value, so honouring a mandated closing inventory needs a boundary condition the algorithm does not have. Gas left in the ground at maturity is forfeited, so a lease with a mandated closing inventory is priced as a different contract.
- The action set is bang-bang: full withdraw, idle, or full inject. That is optimal for a linear per-period payoff and not for a ratcheted one.
- The volatility comes from the calibrated model payload, not from
market.volatility, which was measured to have no effect. A caller who bumps the snapshot's volatility will see nothing move. - One factor, no spikes or jumps, and no external benchmark for a stochastic storage value — the tests bracket it between a perfect-foresight bound and a zero-volatility intrinsic.
- At zero volatility the bracket collapses to an identity, and that is validated: the path is deterministic, so knowing it in advance is worth nothing and the fitted policy must reproduce the perfect-foresight optimum exactly.
closed_form_storage_vectors.rsholds 15 configurations across both spot regimes, the inventory edges, binding injection and withdrawal limits, four grid resolutions and two horizons.
Where no rate limit binds the two agree to floating point. Where one binds the LSM sits slightly above the reference, which looks impossible on a deterministic path and is not: the LSM's forward pass carries continuous inventory, so its value is identical at 4, 8, 16, 32 and 64 grid levels, while the reference is a grid dynamic program that climbs toward it (1456.110, 1474.558, 1474.909, 1475.091, 1475.127 against a grid-independent 1475.191). The reference is the approximation there, not the engine.
The stochastic case is still uncovered: with volatility the fitted policy is no longer the perfect-foresight one, and the gap between them is the option value the product exists to capture.
Fingerprint. fp:v1:blake3:d0ad74357e6dcc3d11f68341c3bcecc818527f1e45be49946363226f8e4f2c1f — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
commodity_swing_lsm
commodity.swing · v1 · ga-validated.
Source. Longstaff-Schwartz least-squares Monte Carlo over (spot, rights remaining)
Conventions.
- Act/365F;
spotis the commodity forward, carry zero - 100,000 paths on a fixed seed; a Laguerre degree-3 regression basis
- The value scales with
max_volume, which is the size that matters - The swing's direction is the instrument's
option_type, defaulting to a call. A sell-side swing prices as a put. - The price carries its own standard error on
Valued::std_error.
Limitations.
min_volumeis carried and never read — measured bit-identical from 0 to 900. This is structural rather than a missing wire: the kernel lifts a fixedvolumeper right and has no volume decision to constrain, so honouring a take-or-pay minimum needs a per-date volume choice this algorithm does not make. A take-or-pay minimum is the obligation that defines a real gas swing, so the price is an unconstrained upper bound for any contract that has one.notionalis a decoy: it is carried, never read, andmax_volumedoes the scaling.maturityis likewise ignored — only the exercise dates matter.- The policy is fitted in-sample on the same paths it is valued on, which biases the estimate. The standard error measures the noise, not that bias: a narrow band says the average is well determined, not that the exercise policy is right.
- Validated on two exact reductions in
closed_form_swing_vectors.rs— 21 vectors, worst 1.66 standard errors on the sampled family and exact to 1e-4 on the deterministic one. Unlimited rights make the swing a strip of European options, which exercises the payoff and volume but deliberately leaves the regression irrelevant. Zero volatility makes the optimal policy a sort — the k largest discounted intrinsics — so the rights constraint binds against an exactly known answer, including a negative-rate vector where the best dates are the earliest rather than the latest. The stochastic constrained case, a genuine regression decision under uncertainty, still has no reference.
Fingerprint. fp:v1:blake3:e1842b17e432e0abd347f9c81b8013d494114c42935e74a9949075038d5aa2fe — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
commodity_black76
commodity.vanilla · v1 · ga-validated.
Source. Black (1976) on the forward
Conventions.
- Act/365F day count
spotis the commodity forward; no carry is applied to it- Price and Greeks scaled by notional; vega per 1 vol point
Limitations.
- European only. An American commodity option was silently priced European until August 2026 —
exercise_stylewas never read, despite a publicamerican()constructor. It is now refused. - Theta and rho are not computed and report zero.
- Flat volatility and a flat discount rate: no smile, no forward curve, no seasonality, no convenience-yield structure.
Fingerprint. fp:v1:blake3:49454810d78ad07a4f1c55311e363e40357f0337c45a1c48a23e9c345019fd2c — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
credit_cdo_tranche_gaussian_copula
credit.cdo_tranche · v1 · ga-validated.
Source. One-factor Gaussian copula on a homogeneous pool; the module cites no paper
Conventions.
- Act/365F; protection buyer positive; per unit of tranche width
- One-factor Gaussian copula on a homogeneous pool: every name shares the pool's curve and one flat correlation
- 50,000 paths, a fixed seed, and a 40-point default-time grid
- The price carries its own standard error on
Valued::std_error, accumulated on the net per-path value: the losses that raise the protection leg are exactly those that shrink the notional the premium leg pays on, so per-leg variances would overstate the error.
Limitations.
- Prices at a single compound correlation, taken as the mean of the supplied matrix's off-diagonal. There is no base-correlation skew, so a full capital structure will not reprice market tranche quotes.
- The correlation matrix is not checked against the pool size, so a two-name matrix can supply the correlation for a hundred-name pool without error.
- The premium leg pays on the tranche notional outstanding at period end and accrues no stub to a mid-period default — a different convention from
credit.nth_to_default, which accrues to the trigger. - Homogeneous pool only: one curve, one recovery. A bespoke tranche with per-name curves is not representable.
- Monte Carlo at a quarter of the nth-to-default's path count on a concentrated loss distribution, so the reported standard error is the quantity to check before trusting a thin tranche.
- Validated at zero correlation, where a homogeneous pool's default count is exactly binomial and both legs — being linear in the tranche loss — have a closed form: 22 vectors in
closed_form_cdo_vectors.rs, worst 1.29 standard errors. That pins the absolute level, the attachment/detachment clipping and both legs' discounting. It cannot detect a broken one-factor decomposition, since at rho = 0 there is nothing to break; the correlation directionality gates cover that. - Gaussian copula: no tail dependence; senior tranches under-price.
Fingerprint. fp:v1:blake3:ddb9859a60c4f425c9a095e9dffe2a88a981e615fed2b6d42c7438c3ea70b449 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
credit_cds
credit.cds · v1 · ga-validated.
Source. Two-leg reduced-form CDS decomposition over a piecewise-constant hazard
Conventions.
- Act/365F on the facade route
- Protection buyer positive; a seller's value is negated
- Recovery from the instrument, default 0.40; notional-scaled
- The premium leg accrues to a mid-period default, the default placed at the period midpoint
Limitations.
- The premium leg carried no accrual-on-default term until August 2026, understating it by 0.38% of the annuity and overstating the par spread by about 1.9 bp on a 500 bp name.
- Default is resolved only at premium-payment granularity: the hazard grid is the coupon grid, with no sub-period integration.
- The protection leg discounts each period's marginal default by the average of the period's endpoint discount factors, where QuantLib's midpoint engine uses the midpoint factor itself. The discount factor is convex, so the average sits above the midpoint by up to 1.25e-5 relative per period on a five-year quarterly schedule at 4%; measured end to end the two agree to 3.1e-6 of notional across the vector sweep.
- The schedule is quarterly regardless of the instrument's
frequency, andday_countis not read on this route — the accrual is the curve's Act/365F, not the market's Act/360. - The credit curve's own
recovery_rateis ignored for the price but used to scale CS01, so a curve and an instrument disagreeing on recovery give a CS01 on a different LGD.
Fingerprint. fp:v1:blake3:f64fc2253f5cca99efa73e29dad7beeaf86ac034593f17e4448d17f0ed4d906b — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
credit_cds_option
credit.cds_option · v1 · ga-validated.
Source. Black (1976) applied to the forward spread
Conventions.
- Act/365F day count
- Black on the forward par spread, discounted at the risky annuity
- Payer maps to a call on the spread, receiver to a put
Limitations.
- The forward CDS underlying accrued from the valuation date rather than from the option's expiry until August 2026. On a one-year option into a five-year CDS the first period spanned 1.25 years instead of 0.25: the risky annuity came out 4.66 against a true 4.20 (19% high) and the protection leg covered a year of pre-expiry default the forward contract does not insure. Both legs now share an accrual start, giving a forward spread of 181.1 bp against QuantLib's 180.9. Correcting the annuity alone made it worse — 218.6 bp — because a forward spread is protection over annuity and the two were then measured over different windows. The matrix fixture could not catch any of this: it supplies the forward spread and annuity as numbers.
- Lognormal forward spread. No front-end protection, and no default before expiry — the knock-out a payer holder is usually paid for.
- Six matrix vectors, tolerance 30 on a 10,000,000 notional — 3 parts per million, which is the coarsest in the fixture and reflects the annuity's own sensitivity to the hazard grid.
Fingerprint. fp:v1:blake3:6c7214166154499cfd0debfb0935842006aa0bb9021a97d90f72d2f4be72b608 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
credit_digital_default_swap
credit.digital_default_swap · v1 · ga-validated.
Source. The CDS decomposition with a fixed digital payment; no single citation
Conventions.
- Act/365F; protection buyer positive
- Recovery-independent by construction: the protection leg is evaluated at unit loss and scaled by the fixed digital amount
notionalscales only the premium leg;digital_amountalone sizes the payout
Limitations.
- No protection-seller representation: there is no side flag, so a seller must negate the value themselves.
- The payment schedule is synthesised by the adapter as fixed 365/frequency-day steps from the valuation date — 91 days for quarterly, not calendar quarters, with no roll or business-day convention and a stub of any length at maturity.
- Shares the CDS protection-leg endpoint-average discounting and coupon-granularity default resolution.
Fingerprint. fp:v1:blake3:91f0b6f1dc73791cd03196bd80be640344e981495586fe094673e5c14f7697ab — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
credit_nth_to_default_gaussian_copula
credit.nth_to_default · v1 · ga-validated.
Source. Li (2000), Gaussian copula for correlated default times
Conventions.
- Act/365F; protection buyer positive; notional-scaled
- Full pairwise Gaussian copula by Cholesky, one credit curve per name
- Premium accrues to the trigger in the period that defaults
- 200,000 paths, a fixed seed, and a 60-point default-time grid
- The price carries its own standard error on
Valued::std_error, accumulated on the net per-path value rather than per leg: an early trigger raises the protection leg and truncates the premium leg, so combining separate per-leg variances would overstate the error by ignoring that cancellation.
Limitations.
- A Gaussian copula has no tail dependence. That is the model's known weakness and it bites hardest on a high
nthin a large basket. - A high
nthis a rare event, so the standard error is the quantity to read rather than the fixed seed's reproducibility — reproducible is not converged. - Validated at zero correlation, where the copula falls away and the order statistics are exact: 21 vectors in
closed_form_ntd_vectors.rs, worst 1.76 standard errors. That pins the absolute level and the nth structure; it cannot detect a broken Cholesky, which the directional gates cover (first-to-default protection falls with correlation, last-to-default rises). The sharpest row is the single-name basket, which removes the copula entirely and is a plain CDS: the engine matched it to 0.12 standard errors at 2m paths. - One flat recovery for every name; the per-name curves' own recoveries are ignored.
- Discounting is a single flat rate taken from the first name's snapshot, so the rate term structure is discarded while the credit term structure is required.
- Price only: no CS01 and no correlation sensitivity.
Fingerprint. fp:v1:blake3:355c7781906622ab9bd30c193d1e97acb9a0c2dd9d15d7a601502a22b16f146f — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
credit_total_return_swap
credit.total_return_swap · v1 · ga-validated.
Source. Financed-long decomposition; no single citation
Conventions.
- Act/365F; the
sidefield selects receiver or payer, receiver default - Recovery from the instrument, default 0.40; notional-scaled
- Valued as the risky reference bond minus the financed strike, less the funding spread on a survival-weighted annuity
Limitations.
- The floating index is never projected. The decomposition assumes the index legs cancel — a par floater funding a par asset — so only the spread survives, and any residual basis away from par is not modelled.
floating_index,start_dateandreference_assetare carried on the instrument and never read: the schedule is synthesised from the valuation date and the curve is whichever one the snapshot holds.- No mark-to-market resets; the whole life is valued as one position.
- Priced through
build_priceragainst 34 independently derived closed-form vectors inclosed_form_trs_vectors.rs, agreeing to 3.1e-15 relative — floating-point summation order, since both sides evaluate the same finite sum. No third-party mirror exists: QuantLib has no total return swap and FinancePy's is an equity TRS with no credit leg, so the reference is derived from the decomposition rather than transcribed. Covers both sides, off-par strikes, a 50bp-500bp hazard sweep bracketing zero, recovery 0-100%, four payment frequencies and an upward-sloping credit curve.
Fingerprint. fp:v1:blake3:c5b4a00d89895e0eb30a0f9f87cb88d380de3e8634a7cb969f69417e2b6f9704 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
american_baw
equity.american · v1 · ga-validated.
Source. Barone-Adesi & Whaley (1987)
Conventions.
- Act/365F day count
Limitations.
- Quadratic approximation; accuracy degrades for long maturities.
Fingerprint. fp:v1:blake3:f42905d441704facc3edda71a3b1e5b02428593a24236548a62d59aa6584c631 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
american_bjerksund_stensland
equity.american · v1 · ga-validated.
Source. Barone-Adesi & Whaley (1987)
Conventions.
- Act/365F day count
Limitations.
- Quadratic approximation; accuracy degrades for long maturities. Despite the pricer id, this entry runs Barone-Adesi-Whaley — the Bjerksund-Stensland boundary degenerates for small q/r.
Fingerprint. fp:v1:blake3:388211e1d099b7bf571ecd2de7462e0a40de028136082fae4abed7b4029b010f — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
binomial_tree
equity.american · v1 · ga-validated.
Source. Cox, Ross & Rubinstein (1979); Leisen-Reimer; Jarrow-Rudd; Tian
Conventions.
- Act/365F day count
- Step count configurable; default 500
Limitations.
- Convergence is O(1/N); price oscillates near barriers.
Fingerprint. fp:v1:blake3:cfeafa32538e194670370f0b05c2868f025b6863e4c7708515164c6bbf290ad1 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
asian_arithmetic_seasoned
equity.asian · v1 · experimental.
Source. Turnbull & Wakeman (1991); Levy (1992); Kemna & Vorst (1990)
Conventions.
- Act/365F day count
- Arithmetic averaging; seasoned fixings supported
- Discretely monitored on the instrument's observation schedule. An option carrying no schedule is priced as a continuous average, which is a different contract — supply the fixings.
Limitations.
- Priced through
build_priceragainst the QuantLib arithmetic vectors inquantlib_asian_facade_vectors.rs, which exercises the adapter rather than the kernel. The olderquantlib_asian_arithmetic_vectors.rscallsprice_discretedirectly and cannot see an adapter fault. - Moment-matching approximation for arithmetic averaging: the average of lognormals is not lognormal. The residual is a property of the method, monotone in volatility and one-signed — 0.09%-0.60% at sigma 0.20, rising to 0.90%-1.04% at sigma 0.40 (worst case 1.0397%, ql_arith_asian_010).
Fingerprint. fp:v1:blake3:25b7d6bebffab3044cbd45accb0327694e3c9647d9c29df01484452c4ce4f864 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
equity_autocallable_mc
equity.autocallable · v1 · experimental.
Source. Black-Scholes/Garman-Kohlhagen GBM risk-neutral simulation; Huang & Luo (2022) for autocallable benchmark alternatives
Conventions.
- Act/365F day count
- Autocall and knock-in barriers are fractions of the initial level
- Snowball coupon pays coupon_rate times the 1-based observation count
- European knock-in by default; continuous monitoring uses the simulation grid
- 100,000 Monte Carlo paths on a fixed seed "AUTO". The price carries its own standard error on
Valued::std_error, so the sampling error is reported rather than merely reproducible.
Limitations.
- Validated on three exact reductions in
closed_form_autocallable_vectors.rs— 29 vectors, worst 1.54 standard errors. The knock-in is European by default, so wherever the autocall decision is not path-dependent the payoff is a function of one lognormal and has a closed form: a single observation at maturity, an unreachable autocall barrier at any observation count, and a zero-volatility path where the call index is known exactly. The third exists because the first two cannot see the snowball multiplier — replacing(i + 1)with a constant passed both, a coverage gap found by mutation rather than inspection. The multi-observation called payoff is still uncovered: calling at the first crossing is a sequential first-crossing event on a multivariate lognormal with no simple closed form beyond two or three dates. Continuous knock-in monitoring is likewise outside the reductions, since it reads the simulation grid.
Fingerprint. fp:v1:blake3:b12165d3ad3eb3c4509e5fe78d30a136aff552734d7acb59dd4a6fa1cc84209f — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
barrier_ikeda_kunitomo
equity.barrier · v1 · ga-validated.
Source. Rubinstein & Reiner (1991) for effectively one-sided barriers; Ikeda & Kunitomo (1992) kernel entry point
Conventions.
- Act/365F day count
- Continuous monitoring
- Zero rebate: the vectors are struck with no rebate, so the knock-out pays nothing on breach
- Single barriers are encoded through the historical Ikeda-Kunitomo entry point but delegate to the Rubinstein-Reiner closed form in the effectively one-sided regime — the same Merton/Reiner-Rubinstein family QuantLib's
AnalyticBarrierEngineimplements, which is why the two agree to 5.5e-8 across 136 vectors
Limitations.
- Continuous monitoring only; discrete monitoring is not adjusted.
- Constant volatility and rates; no term structure.
Fingerprint. fp:v1:blake3:782272b3ba76df967864cee760d865609f4279409babe08b5fed9277761d852c — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
basket_levy
equity.basket · v1 · experimental.
Source. Levy (1992), moment matching to a lognormal basket
Conventions.
- Act/365F day count; the legs' raw spots, weighted inside the pricer
- Notional applied once to the discounted basket value
Limitations.
- Two-moment matching: the weighted sum of lognormals is not lognormal. The error is measured against a correlated lognormal Monte Carlo, and dispersion is the only driver — correlation and asset count are not. At a uniform 20% volatility the approximation is inside sampling error at every strike tested (0.07%, 0.15%, 0.50% at K = 80, 100, 130 on a two-asset basket at rho = 0.5), and stays there at rho = 0, rho = 0.9 and on four assets. With dispersed volatilities of 10% and 45% it degrades to 2.45%, 3.68% and -7.08% at the same strikes — 12 to 15 standard errors out on 400,000 paths. Note the sign change: Levy is high near the money and low in the wing.
- The reported delta and gamma are finite differences on the first leg's spot with the others held fixed.
Greekscarries one delta slot and a basket has N underlyings, so a caller reading it as the basket's sensitivity misreads it by roughly one over the first weight — measured 105x apart between weights (0.01, 0.99) and (0.99, 0.01) on an otherwise identical basket. - Vega, theta and rho are reported as zero and were never computed.
- The rate and valuation date come from the first leg's snapshot, so legs with differing rates silently use the first.
- No independent reference: Levy has published benchmark tables and none is used here.
Fingerprint. fp:v1:blake3:c6bfd07abae048c4304b2a70d27e99a8630a27b3e190a411cb7970d7d154551f — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
binary_analytical
equity.binary · v1 · ga-validated.
Source. Black-Scholes digital closed forms
Conventions.
- Act/365F day count; European, settled at expiry
- Cash-or-nothing discounts the cash amount at the domestic rate; asset-or-nothing discounts the spot at the dividend yield
- Notional multiplies the payout, which for cash-or-nothing is already an amount
Limitations.
- Greeks are finite differences. A digital's delta is a spike at the strike, so the reported delta and gamma are properties of the bump width as much as of the option — the sibling FX digital route declines to report them for exactly this reason, and the two routes disagree.
- Flat volatility on the product most sensitive to smile: a desk prices a digital as a call spread, and this will differ materially.
- At expiry the comparison is strict, so exactly at the strike the option pays nothing.
Fingerprint. fp:v1:blake3:5c35808139c404382278bdee6ae42facef48f4b2e0e5e06f33c1a6d68d72dfb8 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
equity_chooser_rubinstein
equity.chooser · v1 · ga-validated.
Source. Rubinstein (1991), simple chooser
Conventions.
- Act/365F day count
- Priced as the equivalent call plus a dividend-scaled put struck at the carry-adjusted strike —
call(K,T) + e^{-q(T-t_c)} · put(K·e^{-(r-q)(T-t_c)}, t_c)— the algebra behind Rubinstein's closed form, exact for a simple chooser
Limitations.
- The
e^{-q(T-t_c)}factor on the put leg was missing until August 2026, so every non-zero-dividend chooser was overpriced: 13.2230 against 13.1548 at q = 3%, and 0.27 too high at q = 6% versus r = 2%. With q = 0 the factor is 1, which is why the Haug reference case and every zero-dividend test passed. - Simple choosers only. The instrument carries one strike and one maturity, so a complex chooser with different call and put terms cannot be expressed.
- A choose date after maturity is clamped into the option's life rather than refused.
- Constant volatility and rates; no smile, no term structure.
Fingerprint. fp:v1:blake3:6b95959b7df377c566008be4a67273f177980e990ceb14c58ac547d26e36861e — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
cliquet_bs
equity.cliquet · v1 · ga-validated.
Source. Sum of per-period forward-start Black-Scholes values
Conventions.
- Discretely monitored on the reset schedule; Act/365 by calendar days
- The payoff is return-based, so the value does not depend on the spot supplied and carries no delta to it
- Local caps and floors apply per period; a global bound applies to the sum
- A local floor at or above zero is required. The route sums per-period expectations and applies the payoff to that sum, which equals the price only when the bounded returns cannot go negative — the ordinary capital-protected structure, for which it is exact. Anything else is refused.
Limitations.
- The option type was ignored until August 2026, so a cliquet put returned the call price to the last decimal and a reverse cliquet was priced as a forward one.
- The cap and floor legs had the strike's sign inverted in
d1until August 2026, which zeroed a capped period outright; across a floored-and-capped structure the observable error was a 39% understatement. - Structures without a local floor at or above zero are refused rather than approximated. Summing per-period expectations gives
f(sum of E[])where the payoff isE[f(sum)]; measured against 400k Monte Carlo paths an unfloored call priced 164,757 against 91,434 — 80% high — and an unfloored put priced identically zero for every input, since the per-period expectations are all positive so(-sum).max(0)never fires. RepresentingE[max(0, sum)]needs the distribution of a sum of bounded lognormals, which has no closed form. - A local floor above zero was read off the instrument and silently dropped until August 2026: the floor leg was guarded by
floor < 0, and the base leg was always the at-the-money call. A 2% floor with a 10% cap priced 24% low and returned the identical number to a zero-floored cliquet. The correct decomposition isfloor + C(floor) - C(cap). - Every period value was discounted twice until August 2026 — once by its own
exp(-r * tau)and again by the maturity discount applied to the assembled sum — understating a quarterly-reset cliquet by 1.239% at a 5% rate. - The cap leg subtracted the whole call spread from a value that was already the long leg, leaving only the short leg: a capped period was worth a third of its correct value, 67% low against Monte Carlo.
- Realised returns are added undiscounted to a discounted sum, and the seasoning index is positional with nothing validating that the observed spots line up with the reset dates.
- One flat volatility across every reset, where each period is a distinct forward start.
- Priced through
build_priceragainst 22 closed-form vectors inclosed_form_cliquet_vectors.rs, agreeing to 2.3e-11 of notional. The closed form itself was verified against Monte Carlo to better than 0.03% across every configuration, inside the simulation's own standard error. Covers a cap sweep including uncapped, positive floors, volatility, four reset frequencies, carry signs and a binding global cap.
Fingerprint. fp:v1:blake3:4ba57fc4ad0d21a0832850c408523528ecfb823b03476349b351c3b5cb6229fa — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
equity_compound_geske
equity.compound · v1 · ga-validated.
Source. Geske (1979), compound options
Conventions.
- Act/365F day count
outer_maturityis the compound expiry andouter_strikethe premium paid then; the inner pair describes the underlying option- All four call-on-call through put-on-put combinations are priced
- Validated against the Geske closed form computed independently, not against QuantLib:
AnalyticCompoundOptionEnginediffers from the closed form by up to 9e-6 with a sign that varies with the outer strike, which is its critical-spot root tolerance. The 200-iteration bisection here converges tighter, and a four-million-path Monte Carlo agrees with both to within half a standard error
Limitations.
- The critical spot is found by a fixed 200-iteration bisection on a hardcoded bracket, with no convergence check and no error if the root lies outside it.
- An inner maturity before the outer is silently coerced to the outer rather than refused.
- Accuracy is bounded by the bivariate normal CDF the formula rests on, and one flat volatility serves both horizons.
Fingerprint. fp:v1:blake3:e504ebdd9c487b025363a7d34873a52acf63ce2e8790325c3835782de007a055 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
equity_convertible_bond_floor_approx
equity.convertible · v1 · experimental.
Source. Bond floor plus a damped Black-Scholes exchange option; not a published model
Conventions.
- Act/365F day count
spotis the underlying stock price; value is per bond, face-scaled- The bond floor discounts the full face at the risk-free rate plus the instrument's credit spread
Limitations.
- The time value is multiplied by a bare 0.5, commented "Dampening factor for approximation", with no derivation. That constant has no model behind it, so the number is an indication and not a price — and the cost is now measured rather than asserted. Against
ConvertibleBond::price_treeon a five-year zero-coupon convertible at a 3% rate, the closed form is 0.08% low deep out of the money, 4.6% low at 60 spot, 7.7% low at the money, 3.3% low at 140, 0.5% low at 250, and 14.2% low at a 60% volatility. It understates everywhere, and most where the option is worth most. That comparison only became possible in August 2026:price_treewas itself inert, returningmax(face, conversion value)with no time value and no volatility dependence at all, because its Boyle weights were built against the full node ratios rather than their square roots — which madepdnegative andpmexceed one at every volatility. Fixing that is what turned the lattice into a usable reference for the constant above. - Not Tsiveriotis-Fernandes, despite the id reading
equity_convertible_tfuntil August 2026. TF couples an equity component discounted risk-free with a cash-only component discounted risky; this applies one risky rate to the whole face. - Coupons never enter the priced path: the bond floor is a single discounted redemption, so a high-coupon convertible is undervalued.
call_scheduleandput_scheduleare read byConvertibleBond::price_tree, including soft-call triggers, but that route is still unreachable from the facade — the shipping approximation ignores both.contingent_triggeris read by neither.- No dividend yield is applied to the conversion option. The lattice route
ConvertibleBond::price_tree— itself not TF — is unreachable from the facade, and takesmax(conversion, continuation)at every node with no conversion window, so above a spot where conversion exceeds the discounted face its value collapses to the conversion value with no time value at all.
Fingerprint. fp:v1:blake3:7c5033bb152556fc1ec4b3069cc0495cd44bf300544206735797120606187a7e — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
double_barrier_ikeda_kunitomo
equity.double_barrier · v1 · ga-validated.
Source. Ikeda & Kunitomo (1992)
Conventions.
- Act/365F day count
- Continuous monitoring
Limitations.
- Continuous monitoring only; discrete monitoring is not adjusted.
- Evidence here covers genuine double barriers only. One-sided or effectively one-sided barriers are a separate runtime route and are not covered by this entry.
- Series truncation; accuracy falls for very wide barriers.
Fingerprint. fp:v1:blake3:5e0a5e98b1ebb35fa8d27dcf873746d811fb5c7ec4870fa4f9aecad40c5a8367 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
equity_linked_note_static_replication
equity.equity_linked_note · v1 · ga-validated.
Source. Static replication into a discount bond and vanilla calls
Conventions.
- Act/365F day count
- Performance is terminal spot divided by initial spot, minus one
- Protection level is the minimum redemption fraction of notional
- Cap, if present, is an absolute return cap above par
Limitations.
- Constant volatility and rates; no smile or term structure.
- Terminal lognormal model only: no path-dependent features, averaging or early redemption.
Fingerprint. fp:v1:blake3:699dba47c2085df24587d5de4baef4ec2f676c023fc761026efc06ff60f1a635 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
equity_forward_cost_of_carry
equity.forward · v1 · ga-validated.
Source. Cost-of-carry forward against the contracted price; no single citation
Conventions.
- Act/365F;
spotis a genuine spot and carry is applied to it - The result is a discounted mark to market, scaled by notional — unlike
equity.index_future, which returns an undiscounted, unscaled index level - Positive to the long
currencylabels the contract and cannot change its price: this route prices against a singleMarketSnapshot, which carries no FX rate to translate with. Measured bit-identical across USD, EUR and JPY. The routes that do translate — the currency swap among them — take aMarketViewand readfx_rate
Limitations.
- Discounting is at the flat scalar rate, so a rate curve on the snapshot is ignored on this route.
- Continuous dividend yield only: a discrete dividend schedule cannot be expressed.
Fingerprint. fp:v1:blake3:3d8815ffd89d15c052301c8989f03b6d1667bc758a90c1f400b348f938e6a97f — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
equity_forward_start_rubinstein
equity.forward_start · v1 · ga-validated.
Source. Rubinstein (1990), forward-start options — exact under lognormal scale invariance
Conventions.
- Act/365F day count
- The strike is a ratio of the spot at the start date, never a level; the value is linear in today's spot
Limitations.
- Unseasoned only. There is no field for the observed spot at the start date, so once that date passes the strike is re-derived from today's spot rather than from the fixing that actually set it.
- A start date after maturity is clamped rather than refused, collapsing the option to intrinsic at reset.
- One flat volatility, where the correct input is the forward volatility over the option's own window.
Fingerprint. fp:v1:blake3:e8a3188d8c57bc91be68238985323d58484155abff072c48fad45ea5e4416b6c — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
equity_index_future
equity.index_future · v1 · ga-validated.
Source. Cost-of-carry forward price; no single citation
Conventions.
- Act/365F day count
dividendcarries the index dividend yield- Greeks are analytic, not bumped: delta is
exp((r - q) T), gamma and vega are exactly zero because the forward is linear in spot and takes no volatility, and theta and rho follow from the same expression. Each is checked against a finite difference of this pricer's own price.
Limitations.
- The number is a fair index level, not a present value. It is not scaled by
multiplier,tick_sizeortick_value, none of which the pricing function can even see — it takes no instrument. Measured bit-identical across a 50,000x multiplier range, so a contract's size has no effect on its price and the result must not be summed into a portfolio as a mark. - No futures/forward convexity adjustment — the future is priced as a forward.
Fingerprint. fp:v1:blake3:49da6d9bda52795a94c184528d72eec2cc78ca8aba3e910daf54e29aa632506e — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
dupire
equity.local_vol · v1 · ga-validated.
Source. Dupire (1994)
Conventions.
- Act/365F day count
- sigma(S, t) supplied by the caller on an explicit (spot, time) grid; bilinear between nodes, flat beyond them
- Monte Carlo, deterministic given the pricer's fixed seed
Limitations.
- Prices a surface, it does not calibrate one. Deriving sigma(S, t) from implied quotes is
DupireModel::from_implied_vols, which finite-differences the Dupire equation and carries its own error. - Monte Carlo: the price carries sampling error near 0.03 at the default 200,000 paths, and no Greeks are returned because bumping the simulation would return noise rather than a sensitivity.
Fingerprint. fp:v1:blake3:e53e3ee00f8c4351cccb6b4bccbde12db26644be2226301ba9cb8e5120897987 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
lookback_conze_viswanathan
equity.lookback · v1 · ga-validated.
Source. Conze & Viswanathan (1991); Goldman, Sosin & Gatto (1979)
Conventions.
- Act/365F day count
- Continuous monitoring of the extremum
Limitations.
- Continuous monitoring; discrete sampling is not adjusted.
Fingerprint. fp:v1:blake3:2db6ee2c7c5a997fbde2f15e8ff0331f3d1b34762a1a8f46322b3d6825d8e53d — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
partial_lookback_heynen_kat
equity.partial_lookback · v1 · experimental.
Source. Heynen & Kat (1994), partial lookback options
Conventions.
- Act/365F day count
- Floating strike only; the lookback window is [t1, T]
- Continuous monitoring of the extremum inside the window
Limitations.
- Not the published Heynen-Kat closed form. That needs a bivariate normal, because the running extremum over a sub-interval and the terminal value are jointly distributed; this uses univariate terms with a
sqrt(t1/t)factor on one of them, which the source calls a simplified form. Measured against a step-extrapolated Monte Carlo on its own convention: +0.3% at a half-year window and -2.0% at a one-day one. The errors carry opposite signs and differ by an order of magnitude, which a single approximation constant would not produce. - Fixed-strike partial lookbacks are refused rather than approximated. The previous closed form added an undocumented
0.4 * spot * sigma * sqrt(t)premium; there is no validated fixed-strike form to route to. - Validated against Monte Carlo rather than a third-party library. QuantLib's
AnalyticContinuousPartialFloatingLookbackEnginecannot serve: it monitors[0, end]while this monitors[t1, T], so its price rises toward maturity where this one falls. They price different contracts, and comparing them directly shows a spurious 20% gap. - Constant volatility and rates; no smile, no term structure.
Fingerprint. fp:v1:blake3:9089ef4aa11e3ab2d6785f5dcdea7b10544e85fa83592d54578d974baa1b7cf4 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rainbow_mc
equity.rainbow · v1 · ga-validated.
Source. Correlated lognormal Monte Carlo on the extremum of N assets
Conventions.
- Act/365F; a terminal-only simulation, exact for a payoff on the final level
- 100,000 paths on a fixed seed
- The price carries its own Monte Carlo standard error on
Valued::std_error. Measured on a three-asset best-of call (spots 100, sigma 25%, rho 0.3, one year) at 100,000 paths: price 22.578, standard error 0.070, 0.31% relative. It measures sampling noise only and says nothing about discretisation or model error. - Correlations are keyed by underlying name and rebuilt in the option's own leg order, so the view's matrix ordering does not affect the price and a pair the view does not carry is an error rather than a default.
- Best-of plus worst-of equals the two vanilla calls exactly and independently of correlation, because {max, min} is a permutation of the two levels. The gate holds that at every correlation, which covers the near-perfect-correlation region where the Stulz reference itself goes singular: its
sqrt(v1^2 - 2 rho v1 v2 + v2^2)denominator vanishes, so the fixture stops at rho = 0.9.
Limitations.
RainbowTypeoffers four variants that resolve to two behaviours: best-of and max-of price identically, as do worst-of and min-of. In standard terminology an option on the maximum and the best of N vanillas are different products, and the id cannot distinguish which the caller meant.- Price only: bumped Monte Carlo Greeks would be dominated by noise.
- Validated on the two-asset case, where Stulz (1982) gives an exact closed form: 23 vectors x 2 legs in
closed_form_rainbow_vectors.rs, worst 2.08 standard errors. Because the route simulates the terminal level only it carries no discretisation bias, so the whole error budget is sampling error and the band is the estimator's own rather than a chosen tolerance. Three or more assets have no closed form and are covered only by the correlation-independent identity below.
Fingerprint. fp:v1:blake3:3b0d52b871315536d3f38822919c9d1cac629f9d66d492114ceb134783df5d85 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
equity_reverse_convertible_analytic
equity.reverse_convertible · v1 · ga-validated.
Source. Static replication into cash-or-nothing and asset-or-nothing digitals
Conventions.
- Act/365F day count
- Barrier and strike are fractions of the initial spot, not absolute levels
- Value quoted per unit notional; linear in notional
- Coupon is a simple rate on notional, paid at maturity
Limitations.
- European (terminal-only) knock-in. The closed form exists because the trigger is observed at maturity;
price_analyticignoresknock_in_continuousand always prices this convention. The difference is material — measured at 1.4% of notional on a 1y note with a 70% barrier and 25% vol. - Constant volatility and rates; no term structure.
- Assumes barrier <= strike, the standard configuration. Outside that the replication identity no longer describes the redemption.
Fingerprint. fp:v1:blake3:42c18c294f35f7dae3207af06202b38caf86e23725a40fb356a9a1c0aba5a5a1 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
equity_rough_bergomi_hybrid_mc
equity.rough_bergomi · v1 · experimental.
Source. Bayer, Friz & Gatheral (2016); Bennedsen, Lunde & Pakkanen (2017) for the hybrid scheme
Conventions.
- Act/365F day count
- Flat forward variance at xi0; no term structure
- Puts by parity from the simulated call, so put-call parity holds exactly rather than to within two independent sampling errors
Limitations.
- Monte Carlo on a discretised Volterra process, cross-checked against an independent implementation of the same scheme rather than a third-party library — QuantLib has no rough volatility model, so no independent oracle exists. Prices agree within 2.5 combined standard errors across 20 vectors, and the zero vol-of-vol limit reproduces Black-Scholes exactly.
- Requires calibrated (H, eta, rho, xi0); there is no default, and a MarketSnapshot volatility describes none of them.
- Price only. Bumping a 50,000-path simulation five times to difference Greeks costs more than the price and returns numbers dominated by simulation noise.
Fingerprint. fp:v1:blake3:ae75fbae575bd8668eafef3d10978ef520ace715ea44f372aa04f5e14ca8c338 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
equity_rough_heston_mc
equity.rough_heston · v1 · experimental.
Source. El Euch & Rosenbaum (2019)
Conventions.
- Act/365F day count
- Puts by parity from the simulated call
- The variance kernel is normalised as t^(H-1/2)/Gamma(H+1/2). Earlier builds omitted the Gamma denominator, equivalent to rescaling xi by Gamma(H+1/2) (1.4892 at H = 0.1).
Limitations.
- Euler discretisation of the fractional variance process, checked against QuantLib's analytic Heston in the H -> 1/2 limit where the two models coincide. Within 2.6% where the Feller condition 2kappatheta > xi^2 holds.
- The 2.6% figure is measured at H -> 1/2, the only regime with an independent reference: classical Heston exists there and rough Heston converges to it. No third-party implementation exists to check the rough regime the model is actually used in, so at H = 0.1 the error against truth is unmeasured rather than small. Gamma(H+1/2) is 1 in that limit, which is why the reference gate cannot see the kernel normalisation at all.
- Biased upward where the Feller condition fails — up to 85% on the fixture's most extreme set. The variance process reaches zero and the Euler step floors it rather than reflecting. Market-calibrated Heston parameters routinely violate Feller, so this is the common case, not an edge one. A full-truncation or quadratic-exponential scheme (Andersen 2008) is what fixes it.
- Fourier pricing is not implemented. The transform that was here solved the fractional Riccati equation in real arithmetic and returned a 100-strike call on a spot of 100 valued at 135 — more than the underlying. It now returns an error rather than a number.
- Requires calibrated (H, kappa, theta, xi, rho, v0); no default.
Fingerprint. fp:v1:blake3:07c4151ab46f703024b7fd1b219e0123303c2ce16c23f13dd3733624409ac73f — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
equity_shout_binomial
equity.shout · v1 · experimental.
Source. Binomial tree with a single optimal shout; no single citation
Conventions.
- Act/365F day count; a 500-step Cox-Ross-Rubinstein tree
- At each node the shout value is the locked intrinsic plus a fresh at-the-money option on the remaining life
Limitations.
- The post-shout contract is valued through its at-the-money homogeneity rather than a nested lattice, so a right beyond the first is priced on a per-unit table indexed by remaining life. Exact for the single-shout contract; an approximation above it whose error has not been measured against an external reference, because none prices a multi-shout note.
- The step count is fixed at 500 and the pricer accepts no parameters, so accuracy cannot be traded against speed the way the plain binomial route allows.
- Price only: the early-shout boundary leaves no stable closed-form delta.
- No third-party mirror exists, so there is no exact reference. What has been measured instead, in
shout_lattice_convergence_gates.rs, is convergence and bracketing. The CRR lattice alternates by parity on the at-the-money kink: at the reference case the odd branch sits 3.8e-4 above the even one at 500 steps, the half-gap falling by 2.36-2.40 per doubling of the step count while the branch average is stable to 1e-4.SHOUT_TREE_STEPSis even, so the shipped price sits on the low branch, 0.0027% below that average. - Bracketed from below by two quantities derived without the tree: the European it degenerates to (shouting immediately at the money reproduces it exactly), and a Monte Carlo under a parametric boundary that never consults the lattice — 14.185 +/- 0.040 on 400k paths against the tree's 14.2625. The tree must and does sit above it; the 0.54% excess is the two-parameter rule's suboptimality, confirmed by the bound rising monotonically toward the tree as the rule improved (13.973 at a constant threshold, 14.185 with a time-dependent one) and never crossing it.
- A right beyond the first is an approximation: the post-shout contract is read from a per-unit at-the-money table rather than a nested lattice. That is exact for the single-shout contract — where the bracketing above applies — and unmeasured above it, because no external pricer values a multi-shout note. The gates assert that further rights add value with diminishing returns, which is a shape check rather than a price one.
Fingerprint. fp:v1:blake3:5ed1a37889c68e5fcde42d638946bfb12ac1b74902b73c4c8289aa2021a5d618 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
spread_kirk
equity.spread · v1 · experimental.
Source. Kirk (1995)
Conventions.
- Act/365F day count
- Kirk's approximation: a Margrabe exchange on an adjusted volatility
Limitations.
- Kirk's approximation, not an exact spread price. It is exact at a zero strike — where it is Margrabe's exchange option, reproduced to 8.7e-16 — and degrades as the strike moves away, because the adjusted volatility it substitutes stops describing the true spread distribution. Measured against a 400,000-path Monte Carlo at S1 = 100, S2 = 90, volatilities 30% and 25%, rho = 0.5 and one year, the error is one-signed on each side and grows with |K|: -1.52% at K = -20, -0.98% at -10, -0.11% at 0, +1.12% at 10, +2.66% at 20, +5.92% at 40. It undervalues below the zero strike and overvalues above.
- Six matrix vectors, tolerance 8e-3 on a unit-notional price.
Fingerprint. fp:v1:blake3:7eb99a67845aa885cf92fa29f1bfadbd08d54ab69908ed60027c38088d0b0f4d — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
equity_touch_rubinstein_reiner
equity.touch · v1 · ga-validated.
Source. Rubinstein & Reiner (1991) binary barriers; eigenfunction expansion for the double barrier
Conventions.
- Continuous monitoring; the payout is the notional
- Act/365 by calendar days, computed inside the instrument rather than through the facade's day count
Limitations.
payment_timingis honoured on the one-touch branch only. Requesting payment at hit on a no-touch or either double-barrier type returns the at-expiry value with no warning.- Time to maturity is computed as days clamped at zero, so a matured contract prices at zero instead of raising the negative-time error the facade would.
- The double-barrier series is truncated at 200 terms. Its coefficients carried the wrong measure change until August 2026, understating a double-no-touch by roughly a third and asymmetrically in spot; it now matches a bridge-corrected Monte Carlo to 6e-5.
- A missing barrier yields zero rather than an error. The single-barrier branch carries a committed first-passage-time fixture — 45 vectors, worst 6.5e-11, cross-checked against QuantLib's
AnalyticDigitalAmericanEngineat generation time — while the double branch has only a Monte Carlo reference and is not covered by it.
Fingerprint. fp:v1:blake3:2bf01a7b590d0c9c9846846d4daf6a79678336ba4b4f6855c7ea6efd30c07c83 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
bs_analytical
equity.vanilla · v1 · ga-validated.
Source. Black & Scholes (1973); Merton (1973)
Conventions.
- Act/365F day count
- Greeks per unit spot; vega per 1 vol point
Limitations.
- Constant volatility and rates; no term structure.
- European exercise only.
Fingerprint. fp:v1:blake3:11fc25828bb872dc164d06e4908a27928ed8f4851a0d953c9a7787e759fc7904 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
equity_vanilla_heston_carr_madan
equity.vanilla.heston · v1 · ga-validated.
Source. Heston (1993); Carr & Madan (1999)
Conventions.
- Act/365F day count
- Carr-Madan FFT damping alpha configurable
Limitations.
- FFT grid truncation; accuracy degrades far from the money.
- Requires calibrated (v0, theta, kappa, sigma, rho); there is no default, and a MarketSnapshot volatility describes none of them.
Fingerprint. fp:v1:blake3:5ae57b5435da0f2c180d98a365fc658a0d1e5b03b2b5c27e79d48befc2b183f5 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
equity_vanilla_sabr_hagan
equity.vanilla.sabr · v1 · experimental.
Source. Hagan, Kumar, Lesniewski & Woodward (2002), "Managing Smile Risk"
Conventions.
- Act/365F day count
- Prices in forward space: F = S e^{(r-q)T}, discounted at e^{-rT}
Limitations.
- Requires calibrated (alpha, beta, rho, nu); a snapshot volatility describes none of them.
- Hagan's asymptotic expansion, with its error measured against Monte Carlo of the SABR SDE itself rather than described. The expansion parameter is
nu^2 Tand the gap grows with it, one-signed, Hagan always above the true price. At alpha = 0.25, beta = 1, rho = -0.3, on a million paths and 400 steps: +0.15% at (T=1, nu=0.4); +2.94% at (5, 0.4); +22.4% at (5, 0.8); +62.5% at (5, 0.8, K=150); and +65.3% at (10, 0.8). The one-year case is not measurably wrong — an earlier 200k-path run showed -0.5% there, which was sampling noise — while the long-dated, high-vol-of-vol cases are 12 to 77 standard errors out. This is the model's own approximation, not an implementation shortfall: at beta = 1, nu = 0 the expansion returns a flat alpha at every strike, exactly.
Fingerprint. fp:v1:blake3:0aa2bf28ebeaf85bea2d5a207e2db5403351063d768b0a2cb9f53bd8bcdd5ae4 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
variance_swap_flat_variance
equity.variance_swap · v1 · ga-validated.
Source. Discounted (fair variance - strike variance) times tenor; no single citation
Conventions.
- Act/365F day count
- The fair variance is the snapshot's implied volatility squared — the caller's own view, not a strike-weighted replication
- Linear in the variance notional; payoff is spot-independent
- A seasoned swap blends what it has realized with what is still implied, weighted by elapsed and remaining time over its observation window; with no observations the price is the unseasoned one
Limitations.
- Not replication. The pricer was named
variance_swap_replicationuntil August 2026 while computing a flat implied variance, which made the id a false claim in every receipt. Replication needs a strike axis a single snapshot cannot carry, so it would arrive under its own id with a market type that can feed it. - One flat volatility means no smile, and a variance swap's fair strike is a smile-weighted quantity — the whole reason the replication strip exists. Expect a material difference from a replicated strike on any skewed surface.
- The variance notional is per variance-year on this route: the payoff is scaled by the tenor, while the instrument's own
settlement_valueandmtmtreat it as per unit of variance. The two disagree at any tenor other than a year, and this route keeps its own convention rather than repricing existing trades. - The payoff does not depend on spot, so the reported delta and gamma are structurally zero rather than uncomputed.
Fingerprint. fp:v1:blake3:63f9746a679d19c40fb2692b85f3a92de1b3e3bae3ea271deb36b174bdd05382 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
equity_worst_of_autocallable_mc
equity.worst_of_autocallable · v1 · experimental.
Source. Correlated Black-Scholes basket simulation; structured reduction fixture
Conventions.
- Act/365F day count
- Worst performer drives autocall, knock-in and downside redemption
- Requires a MarketView carrying one snapshot per underlying and correlations
- 100,000 Monte Carlo paths on a fixed seed "WOAC". The price carries its own standard error on
Valued::std_error, so the sampling error is reported rather than merely reproducible.
Limitations.
- Reference fixture covers the no-call/no-knock-in principal reduction only; it does not validate basket correlation sensitivity or early-call exercise.
Fingerprint. fp:v1:blake3:d9ffb2215f9fa7b630ae066643952c60a1c150d3bbef8441b2140fcd2e731cf5 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
fx_asian_turnbull_wakeman
fx.asian · v1 · experimental.
Source. Turnbull & Wakeman (1991) moment matching
Conventions.
- Act/365F day count
- Domestic rate from
rate, foreign fromforeign_rate - Monitored on the instrument's fixing schedule; an option with no schedule is priced as a continuous average, a different contract
Limitations.
- Priced through its own adapter against all fourteen QuantLib arithmetic vectors in
quantlib_asian_facade_vectors.rs. Garman-Kohlhagen maps the dividend ontoforeign_rate, so the three dividend-carrying vectors are in scope. Worst case 1.0397% relative. - Moment-matching approximation: the average of lognormals is not lognormal. The residual is the method's, monotone in volatility — 0.09%-0.60% at sigma 0.20, 0.90%-1.04% at sigma 0.40.
- No seasoning. Averaging is assumed to start at the valuation date, so an in-flight Asian with observed fixings cannot be priced correctly.
- A missing
foreign_rateis rejected; usewith_foreign_rate(0.0)only for an explicitly zero-rate foreign currency.
Fingerprint. fp:v1:blake3:4452dd9dcee1401f25565ddfde68c4272bc5b0dbbe6737b9d358ac37ced8905c — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
fx_barrier_ikeda_kunitomo
fx.barrier · v1 · ga-validated.
Source. Rubinstein & Reiner (1991) for effectively one-sided barriers; Ikeda & Kunitomo (1992) kernel entry point with FX carry substitution
Conventions.
- Act/365F day count
- Continuous monitoring
- Foreign rate mapped to the carry term q in Garman-Kohlhagen style
Limitations.
- Single FX barriers reuse the shared one-sided barrier route with q = foreign rate — Garman-Kohlhagen carry, which is what QuantLib's dividend yield expresses on a Black-Scholes-Merton process. Agreement 4.9e-10 across 96 vectors, including cases where the foreign rate exceeds the domestic one and the drift inverts.
- Continuous monitoring only; discrete monitoring is not adjusted.
- Flat domestic/foreign rates and volatility; no smile or term structure.
Fingerprint. fp:v1:blake3:2a0c83911d4227f02fa20d6160e170bc2e1c6e941ef74686bd4696edbd11ea57 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
fx_basket_levy
fx.basket · v1 · experimental.
Source. Levy (1992) moment matching, on the shared equity basket kernel with an FX carry
Conventions.
- Act/365F day count
- Every leg must quote in the settlement currency, or the basket is refused — the weighted sum of rates has units only then
- Each leg's carry is its
foreign_rate, not itsdividend
Limitations.
- The same two-moment lognormal match as
equity.basket, reached through the same kernel with the foreign rate substituted for the dividend, so its measured error is the same: inside sampling error at a uniform volatility for every correlation and asset count tested, degrading to 2.45%-7.08% with volatilities dispersed 10% against 45%. Seeequity.basketfor the measurement. settlement_currencywas carried and never read until August 2026: a basket could declare one currency while its legs quoted another and price without complaint.- Price only, unlike the equity route through the same kernel, which returns a first-leg delta and gamma.
- A missing leg
foreign_rateis rejected; usewith_foreign_rate(0.0)only for an explicitly zero-rate foreign currency.
Fingerprint. fp:v1:blake3:955da2c22f32c6da6056f1cf27400c526a0790cf5d1f78ff5528dd562bb777de — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
fx_digital_reiner_rubinstein
fx.digital · v1 · ga-validated.
Source. Reiner & Rubinstein (1991) binary forms under Garman-Kohlhagen
Conventions.
- Act/365F day count
- Cash-or-nothing pays a fixed quote-currency amount and discounts at the domestic rate; asset-or-nothing pays one unit of base and discounts at the foreign rate
- Notional applied inside the instrument; the value is total
Limitations.
- Price only, deliberately: a digital's delta is a spike at the strike rather than a stable hedge ratio.
- Flat volatility with no smile — and a digital is the product most sensitive to it. A desk prices one as a call spread, and this will differ materially from a smile-consistent value.
- At expiry the payoff uses a strict inequality, so exactly at the strike it pays nothing.
- A missing
foreign_rateis rejected; usewith_foreign_rate(0.0)only for an explicitly zero-rate foreign currency.
Fingerprint. fp:v1:blake3:9e35674cbd1252c88f356210a807debe5dacf5287b31d7d090491a4f4716ba12 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
fx_double_barrier_ikeda_kunitomo
fx.double_barrier · v1 · ga-validated.
Source. Ikeda & Kunitomo (1992) kernel with FX carry substitution
Conventions.
- Act/365F day count
- Continuous monitoring
- Foreign rate mapped to the carry term q in Garman-Kohlhagen style
Limitations.
- Double FX barriers reuse the equity double-barrier kernel with q = foreign rate. Agreement 6.2e-11 against QuantLib's
AnalyticDoubleBarrierEngineacross 40 vectors, knock-in and knock-out, from a narrow corridor to a very wide one. - Continuous monitoring only; discrete monitoring is not adjusted.
- Series truncation; accuracy falls for very wide corridors.
Fingerprint. fp:v1:blake3:b5ba0f422255c1aac356dab8ca3f71db9a262d32c2a59e7621442b6889bac233 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
fx_forward
fx.forward · v1 · ga-validated.
Source. Covered interest parity on a discounted forward differential; no single citation
Conventions.
- Act/365F day count
- Value is the notional-scaled mark to market, in the quote currency
- Long the base currency is positive when the market forward exceeds the contracted one
Limitations.
- Flat continuously compounded rates only: the discount factor is built from the scalar
rate, so a rate curve on the snapshot is ignored on this route. - No settlement lag, business-day adjustment or cross-currency basis.
- A missing
foreign_rateis rejected; usewith_foreign_rate(0.0)only for an explicitly zero-rate foreign currency. - Price only; no Greeks.
Fingerprint. fp:v1:blake3:67c66e702e937069618f77b7051382e51e45b11975e1a99f226abf471ae33320 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
fx_future
fx.future · v1 · ga-validated.
Source. Covered interest parity forward rate; no single citation
Conventions.
- Act/365F day count
spotis the FX spot;foreign_ratethe foreign legtick_size,tick_valueand the two currency fields describe the contract, not the calculation: a fair forward rate is a rate, so no size or tick enters it. The CME specs the constructors carry are internally consistent — 6E is 0.00005 x 125,000 = 6.25 a tick, 6B is 0.0001 x 62,500 = 6.25 — so a caller scaling the rate itself has what it needs
Limitations.
- The number is a fair FX rate, not a present value, and is not scaled by
contract_size— measured bit-identical from a contract size of 1 to one of a billion. It must not be summed into a portfolio as a mark. - A missing
foreign_rateis rejected; usewith_foreign_rate(0.0)only for an explicitly zero-rate foreign currency. - No futures/forward convexity adjustment.
Fingerprint. fp:v1:blake3:3b8122093f9239d8b93e22b41d595bb961a433f267709d7514199050fedb5333 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
fx_ndf_deliverable_equivalent
fx.ndf · v1 · ga-validated.
Source. Covered interest parity, valued as the deliverable equivalent; no single citation
Conventions.
- Discount factors carry the day count; both legs to the settlement date
- Spot is quote currency per unit of base; long-base is positive
- The result is denominated in the instrument's
settlement_currency: the quote-currency payoff, translated at the covered-interest-parity forward when settlement is in base
Limitations.
settlement_currencywas not read until August 2026, so a USD-settled USD/CNY NDF — the ordinary market convention — returned a CNY figure with nothing saying so. The two differ by a factor of the forward.- A settlement currency that is neither leg is refused rather than approximated: it needs its own discount curve and a quanto correction for the correlation between the pair and the settlement rate.
- An NDF past its
fixing_dateis refused, not re-forecast: its rate has been observed, so the payoff is a known cashflow rather than a forward, and the observed fixing is on neither the instrument nor the market view. Pricing a settled trade needs somewhere to read that rate from. - A failed discount-factor lookup falls back to 1.0 rather than erroring, so a broken curve silently prices undiscounted.
- Priced through
build_priceragainst 26 covered-interest-parity vectors inclosed_form_ndf_vectors.rs, agreeing to 8.2e-16 relative — floating-point evaluation order, since parity is an arbitrage identity rather than a model. No third-party mirror exists. Covers both settlement currencies, both signs of the rate differential, a spot sweep through the contracted rate, tenors from one month to five years and a settlement-lag sweep that holds the fixing fixed.
Fingerprint. fp:v1:blake3:e1a35baeb5431685ff866193d4eb9b6c4711c92c336ba08079e8a9699c2efd07 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
fx_quanto_garman_kohlhagen
fx.quanto · v1 · ga-validated.
Source. Garman & Kohlhagen (1983) with the standard quanto drift adjustment
Conventions.
- Act/365F; price and all five Greeks scaled by notional
- The FX volatility and the correlation travel on the trade, not the snapshot, so a market-data bump will never move them
- Theta per calendar day, rho per percentage point of the domestic rate
Limitations.
- The drift adjustment ran with the wrong sign until August 2026:
adjusted_rateadds the shift to the foreign rate, which Garman-Kohlhagen subtracts from the drift, so a positively correlated quanto was adjusted the wrong way. The sibling commodity route was always right, and the two disagreed for identical inputs. Both routes are now pinned by put-call parity on the adjusted forward and by asserting they shift the drift the same way, so neither the sign nor their agreement rests on the other being checked. - The payout currency must not be one of the option's own legs: with the payout already in a leg currency there is nothing to convert and the drift adjustment does not apply, so such a contract is refused rather than priced. It priced silently until then, moving an at-the-money EURUSD option paying USD by 7.5%.
- Rho is the domestic-rate sensitivity only; the foreign-rate mirror term is not reported.
- Constant flat volatilities and correlation; no smile, no term structure.
Fingerprint. fp:v1:blake3:546c3d3c84c026f1f7cc308da20bd3555918856a653660c33321494e5dd6a172 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
fx_tarf_monte_carlo
fx.tarf · v1 · ga-validated.
Source. Monte Carlo under risk-neutral lognormal FX; no single citation
Conventions.
- Act/365F to each fixing; one exact lognormal step per fixing
- Leveraged-asymmetric payoff: a favourable fixing pays and accrues toward the target, an unfavourable one pays the leveraged loss and does not
- Full-gain knockout: the fixing that reaches the target pays in full and the structure terminates
- 100,000 paths on a fixed seed. The price carries its own Monte Carlo standard error on
Valued::std_error, so the sampling error is reported rather than merely reproducible.
Limitations.
- Flat volatility and flat rates. A TARF is strongly smile-sensitive and this prices it on one number.
- The target-redemption logic is validated on the two-fixing case, where the accrued gain after fixing 1 depends only on S1 and the knockout becomes a threshold on one variable: 19 vectors in
closed_form_tarf_vectors.rs, worst 0.94 standard errors. Both legs are bivariate-normal expectations, so the reference carries no truncation error. Cross-checked against an independent nested quadrature — Richardson-extrapolated and split at the two analytic kinks — which agrees to 4.8e-6 relative.
Beyond two fixings the knockout depends on the accrued path and the state stops being one-dimensional; there is still no reference there. One consequence is recorded in the gate: making an unfavourable fixing accrue its negative intrinsic toward the target — instead of accruing nothing — is unobservable on a two-fixing note in principle, and on a six-fixing note the two conventions differ by under 3%, below the route's own sampling error. That convention is therefore disclosed and unenforced.
- A missing
foreign_rateis rejected; usewith_foreign_rate(0.0)only for an explicitly zero-rate foreign currency.
Fingerprint. fp:v1:blake3:7abcab144b3f2c52bcb38503c9df3be820766ab19dbe77d22d339b483fad0338 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
fx_garman_kohlhagen
fx.vanilla · v1 · ga-validated.
Source. Garman & Kohlhagen (1983)
Conventions.
- Act/365F day count
- Spot is domestic per unit foreign;
rateis domestic,foreign_rateforeign - Price and Greeks scaled by the option's notional
- Delta is spot delta, foreign-discounted and not premium-adjusted; vega per 1 vol point; theta per calendar day; rho per 1 percentage point of the domestic rate
Limitations.
- Theta and rho were reported as literal zeros until August 2026 — the pricer implemented neither, and a client could not tell a computed zero from an absent one. Both are now closed forms, checked against a finite difference of the price to 1e-9.
- Rho is the domestic-rate sensitivity only. An FX option has two, and the foreign-rate mirror term is not reported.
- European exercise, constant flat volatility and rates: no smile and no term structure, on a product quoted by delta and smile.
- A missing
foreign_rateis rejected; usewith_foreign_rate(0.0)only for an explicitly zero-rate foreign currency.
Fingerprint. fp:v1:blake3:69c5fafc37aedbe3a5894e56a861cf97668f053f2edb8d01218ef5e25fd12270 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
fx_window_barrier_monte_carlo
fx.window_barrier · v1 · ga-validated.
Source. Monte Carlo under risk-neutral lognormal FX; no single citation
Conventions.
- Act/365F; 250 monitoring steps spread uniformly over the whole life
- The barrier is checked only at grid points inside the window
- 100,000 paths on a fixed seed. The price carries its own Monte Carlo standard error on
Valued::std_error— measured at 0.57% relative on a one-year EURUSD up-and-out with a three-to-nine-month window. It covers sampling only; the discrete-monitoring bias below is a separate quantity that no number of paths removes.
Limitations.
- The grid is uniform over the life, not the window, so a short window gets only its share of the 250 steps — a one-month window in a five-year trade is monitored about four times. A window shorter than life/250 contains no grid point at all and prices as an unbarriered vanilla.
- Discrete monitoring with no Broadie-Glasserman-Kou continuity correction, so the bias is systematic and does not shrink with path count.
- Validated at a full window, where the contract is an ordinary barrier and Reiner-Rubinstein applies: 23 vectors in
closed_form_window_barrier_vectors.rs, worst 2.73 standard errors. The reference is evaluated at the Broadie-Glasserman-Kou discretely-monitored level,H * exp(beta * sigma * sqrt(T/m))with beta = 0.5826, which is not optional: against the uncorrected continuous formula the engine sits 15.1 standard errors away at H = 1.20, a 22.7% price difference. A partial window has no closed form and the uniform grid means its effective step count is not the nominal one, so it is not covered. - Window bounds that fail to convert are silently clamped to the option's life rather than erroring.
Fingerprint. fp:v1:blake3:7e276d978cc4700ac2b421e25acdb12cfc34b30cb14cec183a474a409865b9c5 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
inflation_bond
inflation.bond · v1 · ga-validated.
Source. Real-yield discounted indexed cashflows; no single citation
Conventions.
- Act/365F; a semi-annual schedule synthesised from the valuation date
- Indexed cashflows are nominal and discount at the nominal rate; the index ratio carries the inflation, so no real rate is formed
- Each coupon carries its own index ratio, floored, read at the
lag_monthsindexation lag — three months by default, the TIPS and gilt convention
Limitations.
- The deflation floor did not reach the redemption until August 2026: under a 5%-a-year deflation curve a floored and an unfloored bond both priced 307,460. One maturity index ratio was also applied to every coupon, over-indexing all but the last.
lag_monthswas carried and never read until August 2026 — measured bit-identical from 3 to 240 — so every cashflow was indexed to its own date. Under positive inflation that over-indexed all of them: at 2% inflation the standard three-month lag is worth 49 bp of every indexed cashflow. A reference date before the valuation date carries a unit index ratio, since the curve holds no history.base_index,issue_dateand the index identity are still unread, and the schedule is synthesised from the valuation date, so coupon dates never align with the real ones and there is no accrued-interest concept.
Fingerprint. fp:v1:blake3:a8afc064a830076a8a83d947423850b9f38dce67c3f4991b06d4720eac2b569a — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
inflation_cap_floor
inflation.cap_floor · v1 · ga-validated.
Source. Black (1976) on the inflation forward; Bachelier below zero
Conventions.
- Act/365F; flat nominal discounting from
rate volatilityis the inflation volatility, a single scalar- Lognormal above zero, Bachelier at or below it, with the volatility converted as
sigma_N = sigma_LN * |F|
Limitations.
- The normal branch was handed the lognormal volatility unconverted until August 2026, so the price jumped 7.6x as the strike crossed zero — 250 bp to 1912 bp at a 2.5% forward over five years. The conversion is the first-order at-the-money equivalence, so the two models still disagree away from the money.
- The zero-coupon branch returned bare intrinsic below zero, giving a deflation floor no time value at all. It now prices Bachelier.
- One flat inflation volatility: no smile and no term structure, and inflation caps are quoted with a pronounced smile.
- No convexity adjustment and no nominal/inflation correlation — that is what
inflation.jarrow_yildirimsupplies and this does not.
Fingerprint. fp:v1:blake3:3781424385dbd8cff7bc816ae9580bb796a49cf29b27e17ee59fd22aaf920490 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
inflation_yoy_jarrow_yildirim
inflation.jarrow_yildirim · v1 · experimental.
Source. Jarrow & Yildirim (2003)
Conventions.
- Nominal and real curves both flat, continuously compounded
- Year-on-year swaplet pays I(T_e)/I(T_s) - (1 + K)
Limitations.
- The year-on-year convexity and volatility are composite approximations, not the full three-factor result. Measured against Monte Carlo of the model's own SDEs the volatility is 8.8% high at a 1y expiry and 22.8% low at 9y — nearly flat where the true term structure rises.
- Flat nominal and real curves. JY is defined against two market curves and this fits it to two flat rates.
- No calibration. (a_n, sigma_n, a_r, sigma_r, sigma_i) and the three correlations are the caller's own fit.
Fingerprint. fp:v1:blake3:a9be125e341696efd05bb2e54eeb84a2ae3e57ee175e7d5a80fc0b8c462b4989 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
inflation_yoy_swap
inflation.yoy_swap_curve · v1 · ga-validated.
Source. Discounted forward CPI ratios against a fixed leg; no single citation
Conventions.
- Act/365F over the swap's own
payment_dates, accruing the fixed leg fromstart_date; payments at or before the valuation date are dropped - Positive to the inflation receiver, matching the zero-coupon sibling's treatment of the same flag
Limitations.
payment_datesandstart_datewere carried and never read until August 2026: the schedule was synthesised as whole years from the valuation date, rounded up. That invented a payment beyond maturity for any swap that was not a whole number of years — a four-and-a-half-year swap priced 22.6% high — and priced a forward-starting swap as a spot-starting one. The fixed leg also accrued from the valuation date rather thanstart_date, so a five-year swap starting in a year was charged two years of fixed on its first coupon, cutting it to an eighth of its value.YearYearInflationSwap::newgenerates annual payment dates only. A non-annual schedule set onpayment_datesdirectly is honoured — the fixed leg accruest_i - t_{i-1}— but the constructor will not build one.- A swap already in its life drops the payments it has made and accrues the first surviving period from the valuation date, not from the last payment. The accrued index growth since that payment is therefore not valued, so a mid-life swap is worth slightly less than its full accrual implies.
- No convexity adjustment. A year-on-year swap carries a genuine correction relative to a strip of zero-coupon quotes, which is what
inflation.jarrow_yildirimexists to supply and this does not. - Flat nominal discounting; a rate curve on the snapshot is ignored.
Fingerprint. fp:v1:blake3:e47f1edc2269b30dc93c9824002f1e836c9dd7f697481f16c17dcfb4e4cb1e00 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
inflation_zc_swap
inflation.zc_swap_curve · v1 · ga-validated.
Source. Discounted forward CPI
Conventions.
- Forward CPI ratio I(T)/I(0) read from the inflation curve, discounted at the snapshot's flat nominal rate
- Sign follows
pay_fixed: the inflation receiver is positive
Limitations.
- A curve valuation, not a model. There is no inflation volatility and therefore no optionality: this prices the swap, and an inflation cap or floor needs a model.
inflation.jarrow_yildirimis that model.
Fingerprint. fp:v1:blake3:a5be08e91bf9c985047d4508735e6e5487197c7e747b7f2247467d76023fad10 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_amortizing_bond
rates.amortizing_bond · v1 · ga-validated.
Source. Discounted amortising cashflows; no single citation
Conventions.
- Act/365F accrual on the curve's own clock; no basis mismatch here
- Coupon accrues on the principal outstanding at each period start
- The amortization schedule is the contract: it carries the dates principal moves on and the amounts, so
frequencybuilds a schedule throughlevel_payand decides nothing once one exists. Unlike a bullet bond, splitting a period is not neutral here — the balance falls between periods, so a finer schedule accrues on less - Positive: an asset, scaled by the schedule's own amounts
Limitations.
- The first accrual runs from the valuation date rather than the last coupon, so a seasoned bond's opening period is truncated and there is no clean/dirty distinction.
- A failed discount-factor lookup falls back to 1.0, pricing that cashflow undiscounted rather than erroring.
Fingerprint. fp:v1:blake3:0b79f76f9e02b15bd2a84af8aa623a7763c26edc66bb51f6bcd6c2552027789b — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_asset_swap_par_par
rates.asset_swap · v1 · ga-validated.
Source. Par/par asset swap arithmetic; no single citation
Conventions.
- Act/365F accrual; bond price quoted per 100, notional absolute
- The floating leg accrues the simple forward
DF(start)/DF(end) - 1, so a par/par swap is worth zero to floating point rather than to a convention gap - Positive to the asset-swap buyer
Limitations.
- The schedule is synthesised forward from the valuation date in integer 365/frequency-day steps, so
start_dateis never read and a forward-starting asset swap prices as spot-starting. floating_indexis carried and never read: one curve both discounts and forecasts, so a SOFR and a EURIBOR asset swap price identically.bond_priceis a caller input; no bond model stands behind it.
Fingerprint. fp:v1:blake3:422b7dfb110db3b66f741cdc54f96b6ed6f92701b55531b3b5f0abbd7f67b6aa — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_basis_swap_dual_curve
rates.basis_swap · v1 · ga-validated.
Source. Two-floating-leg discounted cashflow; no single citation
Conventions.
- Act/365F accrual; positive to the receiver of the receive index
- Which leg carries the spread is configurable, not assumed
Limitations.
- Both legs are valued on one shared schedule at the higher of the two frequencies, so a 3s6s swap projects its 6M leg over 3M periods. That is the approximation at the heart of the product.
- The pay-index curve doubles as the discount curve, so
dual_curvemeans two forecast curves and not a separate discount basis. swap_typeis carried and never read, and cannot change a projected price: compounding a curve's own overnight forwards telescopes exactly to the period growth factor both legs already use — verified to 1e-15 over a quarter. What separates an overnight leg from a term one is realised fixings, which this route consumes for neither.- Price only; no DV01, on a pure curve instrument.
Fingerprint. fp:v1:blake3:6a66624b43e310ef89b8b5fb857d865718db2ae2248bcb7ebafe3d2440528488 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_bond
rates.bond · v1 · ga-validated.
Source. Standard discounted cashflow; no single citation
Conventions.
- Act/365F on the curve; coupon dates from the bond's own schedule
- The coupon paid on each date is the annual rate divided by the bond's
frequency
Limitations.
- One curve discounts and forecasts. No basis between a discount curve and a forecast curve.
- The coupon frequency was hardcoded semi-annual until August 2026: an annual bond priced 10.7% under and a quarterly bond 21.6% over, on a 5y 5% bond at a flat 4%. Fixed and pinned by a per-frequency test.
- The returned number is a dirty price.
Bond::accrued_interestis correct and validated against QuantLib, but the pricing path does not subtract it, so a clean price must be formed by the caller.
Fingerprint. fp:v1:blake3:cd2118a24b938b7d349e82d0d1be416597dd851895375357243ab6a7d359933b — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_bond_option_hull_white
rates.bond_option · v1 · ga-validated.
Source. Hull & White (1990); Jamshidian (1989)
Conventions.
- Act/365F day count
- Prices from the short rate; the bond price is a model output
Limitations.
- Constant theta, so this is the Vasicek closed form: it does not by construction reproduce today's yield curve, which a time-dependent theta(t) would.
- Requires (a, sigma, theta, r); a MarketSnapshot carries a discount rate, not a modelled short rate.
Fingerprint. fp:v1:blake3:c1a2e3a12c21252c0c1b3472530cb9854e694735129ceceb96e7764fbb12b44b — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_bond_option_black
rates.bond_option_black · v1 · ga-validated.
Source. Black (1976)
Conventions.
- Act/365F day count
- Black-76 on the forward bond price
Limitations.
- Black on a forward bond price, so it prices the option and not the term structure behind it. A model that evolves rates is
rates.bond_option_hull_white. - Six matrix vectors, tolerance 3e-4 on a unit-notional price.
Fingerprint. fp:v1:blake3:2571d28f701e7a98053591aaeaceaf9af90c62c226104741a600bd972923a660 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_callable_bond_hull_white
rates.callable_bond · v1 · ga-validated.
Source. Hull-White trinomial lattice, two-stage displacement
Conventions.
- Act/365F to maturity and to each schedule date
- Call and put dates are Bermudan: each is mapped to the nearest tree step and is exercisable only there
- A 200-step trinomial lattice; mean reversion fixed at 0.03
curve_dv01carries a scalar short-rate bump, not a curve bump, so aggregating it across pricers mixes two risk definitions
Limitations.
- The schedule was American-from-the-earliest-date until August 2026: adding call dates was bit-identical and only the first moved the price, overstating the issuer's option by roughly a third of its value on a five-year bond.
market.rate_curveis not read. The lattice builds its own term structure from the scalar short rate, so a real sloped or inverted curve is discarded.price_callable_bond_fittedbootstraps from a caller's discount factors and is not reachable from the facade.- Mean reversion and the step count are compile-time constants: the pricer accepts no parameters, so neither can be calibrated or refined by a caller.
- A call date is honoured up to half a step early — about 4.6 days on a five-year trade at 200 steps.
- Coupons are
face * coupon / frequencywith no day count applied. Validated with an empty call and put schedule, where the lattice must reproduce a straight bond and Hull-White's own analytic bond price is exact: 18 vectors inclosed_form_callable_bond_vectors.rs, worst 55% of the measured lattice band. The reference is the model's curve, not a flat one —B(tau) < tauunder mean reversion makes the two diverge with maturity, by 1.30 points at five years and 14.09 at twenty, so a flat-discount reference makes the engine look 2% wrong when it is not. The band is the measured O(1/n) lattice error: 0.0254 at 200 steps on a ten-year bond, halving exactly per doubling, with Richardson agreeing with the analytic price to eight significant figures. Exercise itself is not covered. - Delta, gamma, theta and rho are reported as zero and were never computed; only the scalar-rate DV01 and the vega are real.
Fingerprint. fp:v1:blake3:61cd76cfb7457a200232ead94415aa020e3f3bab055cdaa7e0b6d72ecf8f9dd3 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_callable_range_accrual_hull_white
rates.callable_range_accrual · v1 · experimental.
Source. Hull & White (1990, 1994) trinomial short-rate lattice
Conventions.
- Act/365F day count
- Corridor accrual is approximated by in-range Hull-White tree steps
- Issuer call dates are Bermudan exercise dates mapped to nearest tree step
- Issuer call redeems at par when continuation exceeds notional
Limitations.
- Reference fixture covers a full-corridor, non-callable reduction to fixed accrual; narrow corridors and callable exercise are not externally benchmarked.
- Runtime uses a 200-step tree and a standard 3% mean reversion; corridor monitoring is time-step based, not daily-calendar exact.
Fingerprint. fp:v1:blake3:58a17ef536eaf58fe177446de15894076fb7cd4390c2614b0beb867604da33fe — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_cap_floor
rates.cap_floor · v1 · ga-validated.
Source. Black (1976)
Conventions.
- Act/360 day count
- Black-76 lognormal forward
Limitations.
- Lognormal forwards; not valid at negative rates without a shift.
- The forward each caplet is struck against was the curve's continuously compounded
forward_rateuntil August 2026, where the payoff needs the simple rate its own accrual multiplies,(DF(start)/DF(end) - 1) / tau. On a flat 4% curve with a quarterly Act/360 accrual that is 4.0000% against a true 3.9649%, which overstated a five-year cap by 4.9% — 80,463 against QuantLib's 76,669 on 10mm. This capability was GA-validated throughout:quantlib_capfloor.csvsupplies the forward as a number, so it exercised the Black formula and never the adapter that feeds it.quantlib_collar.csvnow prices cap and floor throughbuild_pricer, so the curve read is part of what is asserted.
Fingerprint. fp:v1:blake3:d3af4bc390e602f239d6698b126194c83ffa0f65a2659223874e9d693f858be4 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_caplet_black
rates.caplet_black · v1 · ga-validated.
Source. Black (1976)
Conventions.
- Act/360 day count
- Black-76 on the forward rate; the caplet applies its own year fraction, notional and discount factor
Limitations.
- The forward each caplet is struck against was the curve's continuously compounded
forward_rateuntil August 2026, where the payoff needs the simple rate its own accrual multiplies,(DF(start)/DF(end) - 1) / tau. On a flat 4% curve with a quarterly Act/360 accrual that is 4.0000% against a true 3.9649%, which overstated a five-year cap by 4.9% — 80,463 against QuantLib's 76,669 on 10mm. This capability was GA-validated throughout:quantlib_capfloor.csvsupplies the forward as a number, so it exercised the Black formula and never the adapter that feeds it.quantlib_collar.csvnow prices cap and floor throughbuild_pricer, so the curve read is part of what is asserted. - A single caplet under Black, not a term-structure model. Prices one caplet against one forward and one flat volatility; full caps and floors are
rates.cap_floor.
Fingerprint. fp:v1:blake3:eedd005a097040660234f7038e04baa59e1d4949ab634a9c6b634fd5d1251d64 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_cms_cap_black
rates.cms_cap · v1 · ga-validated.
Source. Hagan, Convexity Conundrums (2003), linear terminal-swap-rate form
Conventions.
- Act/365F to the fixing; accrual floored at 1e-6
- Call is a cap, put is a floor; scaled by accrual, notional and DF
- The forward CMS rate is the par swap rate plus a convexity adjustment
Limitations.
- The forward CMS rate came from the standalone
par_swap_ratehelper until August 2026. That accrues every period asdays / 360, whilecms_forward_swap_ratebuilds annual 365-day steps and all three CMS capabilities declare Act/365F: each accrual came out as 365/360, inflating the annuity by 1.39% and depressing the rate by the same proportion — 5.59 bp on a 4.08% ten-year forward, flat across 2y, 5y and 10y tenors. Flat in the tenor is the signature of a convention error rather than a discretisation one. A spread subtracts two such rates so the error does not cancel; both legs shrink by 1.37% and so does their difference. - The convexity adjustment cancelled its own tenor until August 2026, returning 0.9 bp for every swap. It now runs 2.6 bp at a two-year tenor to 23.3 bp at thirty, at a 3% forward, 20% volatility and a five-year fixing.
- Single flat volatility for the swap-rate distribution and the adjustment. No smile, and no replication-based adjustment.
- The reference swap is built as an annual schedule from the fixing date, so an off-cycle or non-annual CMS is approximated by it.
- Hagan's timing term was structurally zero until August 2026:
forward_cms_ratepassesT_pay = T_fix, which is right for an in-arrears CMS and wrong for a payment-lagged one, andCMSCapletcarries apayment_datethe caller sets freely. Both adapters now useforward_cms_rate_paid_at. At a 3% forward, 20% volatility and a five-year fixing on a ten-year swap the convexity term is 9.19 bp and the omitted timing term ran 0.44 bp at a three-month lag (4.8%) to 1.75 bp at a year (19%). - Priced through
build_priceragainst 28 Hagan linear-TSR vectors inclosed_form_cms_vectors.rs, agreeing to 1.2e-13 of notional. The band is scaled by notional rather than by price because a deep out-of-the-money option is a small number formed by cancelling large ones: its absolute residual is flat at ~2e-7 on 10mm whether the value is 46,051 or 487. Covers caps and caplets, calls and puts, strikes either side of the forward, 2y-30y tenors, payment lags from zero to a year, andConvexityModel::None.
Fingerprint. fp:v1:blake3:82c88b956d53a6c6febb0fc43a87397f60d36c636eb1ccf6862bd019c1c16a73 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_cms_caplet_black
rates.cms_caplet · v1 · ga-validated.
Source. Hagan, Convexity Conundrums (2003), linear terminal-swap-rate form
Conventions.
- Act/365F to the fixing; accrual floored at 1e-6
- Call is a cap, put is a floor; scaled by accrual, notional and DF
- The forward CMS rate is the par swap rate plus a convexity adjustment
Limitations.
- The forward CMS rate came from the standalone
par_swap_ratehelper until August 2026. That accrues every period asdays / 360, whilecms_forward_swap_ratebuilds annual 365-day steps and all three CMS capabilities declare Act/365F: each accrual came out as 365/360, inflating the annuity by 1.39% and depressing the rate by the same proportion — 5.59 bp on a 4.08% ten-year forward, flat across 2y, 5y and 10y tenors. Flat in the tenor is the signature of a convention error rather than a discretisation one. A spread subtracts two such rates so the error does not cancel; both legs shrink by 1.37% and so does their difference. - The convexity adjustment cancelled its own tenor until August 2026, returning 0.9 bp for every swap. It now runs 2.6 bp at a two-year tenor to 23.3 bp at thirty, at a 3% forward, 20% volatility and a five-year fixing.
- Single flat volatility for the swap-rate distribution and the adjustment. No smile, and no replication-based adjustment.
- The reference swap is built as an annual schedule from the fixing date, so an off-cycle or non-annual CMS is approximated by it.
- Hagan's timing term was structurally zero until August 2026:
forward_cms_ratepassesT_pay = T_fix, which is right for an in-arrears CMS and wrong for a payment-lagged one, andCMSCapletcarries apayment_datethe caller sets freely. Both adapters now useforward_cms_rate_paid_at. At a 3% forward, 20% volatility and a five-year fixing on a ten-year swap the convexity term is 9.19 bp and the omitted timing term ran 0.44 bp at a three-month lag (4.8%) to 1.75 bp at a year (19%). - Priced through
build_priceragainst 28 Hagan linear-TSR vectors inclosed_form_cms_vectors.rs, agreeing to 1.2e-13 of notional. The band is scaled by notional rather than by price because a deep out-of-the-money option is a small number formed by cancelling large ones: its absolute residual is flat at ~2e-7 on 10mm whether the value is 46,051 or 487. Covers caps and caplets, calls and puts, strikes either side of the forward, 2y-30y tenors, payment lags from zero to a year, andConvexityModel::None.
Fingerprint. fp:v1:blake3:0f275d6cd1f313294858ae69efe40c74e2160dc1df68ec67fedb8365a1db04cf — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_cms_spread_bachelier
rates.cms_spread_bachelier · v1 · ga-validated.
Source. Bachelier (1900); normal-model CMS spread
Conventions.
- Act/365F day count
- Bachelier (normal) on the spread between two convexity-adjusted CMS rates
Limitations.
- The forward CMS rate came from the standalone
par_swap_ratehelper until August 2026. That accrues every period asdays / 360, whilecms_forward_swap_ratebuilds annual 365-day steps and all three CMS capabilities declare Act/365F: each accrual came out as 365/360, inflating the annuity by 1.39% and depressing the rate by the same proportion — 5.59 bp on a 4.08% ten-year forward, flat across 2y, 5y and 10y tenors. Flat in the tenor is the signature of a convention error rather than a discretisation one. A spread subtracts two such rates so the error does not cancel; both legs shrink by 1.37% and so does their difference. - Normal rather than lognormal, which is what makes a negative spread representable — and what makes the volatility an absolute rate rather than a percentage.
- The spread volatility is derived from the snapshot's single volatility scaled by the forward level, not from a spread volatility surface. A desk quoting spread options quotes that surface, and this does not read one.
- Six matrix vectors, tolerance 8 on a 1,000,000 notional.
Fingerprint. fp:v1:blake3:7d1200118041d5e45b233ffccbbe4657b8f458278bb59566a2d858f6e1cb1afc — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_collar
rates.collar · v1 · ga-validated.
Source. Black (1976) per caplet and floorlet
Conventions.
- Long the cap, short the floor; either sign is possible
- Accrual uses the caplet's own day count, the forward comes off an Act/365F curve, and time to expiry is a hardcoded /365 — three clocks in one product
Limitations.
- Each caplet's forward was the curve's continuously compounded
forward_rateuntil August 2026, where the payoff needs the simple rate its own accrual multiplies,(DF(start)/DF(end) - 1) / tau. On a flat 4% curve and a quarterly Act/360 accrual that is 4.0000% against a true 3.9649%. A cap is long the forward and a floor short it, so the legs moved opposite ways and the collar came out 7.2% from QuantLib — in neither day count's direction, which is what stopped it reading as a day-count error. The seventh instance of a mismatch also corrected on the FRA, the vanilla swap, the OIS, the compounding swap, the basis swap and the asset swap. - One flat volatility is passed for both legs. A collar is long a high strike and short a low one, so the skew between them is exactly the economics this cannot express — and the instrument layer accepts two vols that the facade collapses into one.
- The Bachelier branch is selected when any forward or strike is non-positive, and
market.volatilityis then read as a normal volatility in absolute rate terms — 0.008 is 80bp. Until August 2026 the lognormal branch was hardcoded and a negative forward returned exactly zero: on a 10mm quarterly collar with a 0.5% cap and a -1.0% floor at 80bp normal volatility, the values are -1,304 at a -0.40% forward, +1,304 at -0.10% and +4,155 at +0.20%, and all three priced at 0.00. The volatility is taken as normal rather than converted from the lognormal quote, unlikeinflation.cap_floor. Converting through the forward magnitude works there because a 2% inflation forward gives a sensible 40bp; on a -0.4% rate forward it turns a 20% quote into 8bp, eleven standard deviations from a strike 0.9% away, so the collar prices to zero again by a different route. There is nothing to convert: a lognormal volatility is undefined for a negative forward, so whatever the caller supplies is already a normal one. - A per-caplet volatility curve is implemented and not reachable from this route.
- Price only: no DV01 and no vega, on the only optionality product in the linear rates set.
Fingerprint. fp:v1:blake3:e8f3bd9452a7b07ad8fecb0d0980b217a9d6951fbc56eb09b8638f7d0dea983d — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_commercial_paper_discount
rates.commercial_paper · v1 · ga-validated.
Source. Bank-discount purchase price; no single citation
Conventions.
- Bank-discount Act/360 — not the Act/365F the rest of the engine uses
- The discount rate is the instrument's own, not a curve's
issue_dateis a label, not a pricing input: a bank-discount price reads only the days remaining, and a discount note accrues nothing — it pulls to par
Limitations.
- This is a quote restatement, not a valuation. No curve is read at all — measured bit-identical with a steep 20-35% rate curve attached — so the paper cannot be marked to market and contributes no rate risk.
- Matured paper priced at full face until August 2026: the day count clamped at zero, so a note a year past maturity marked at par — above every live price, and it never aged. It now returns the same negative-time error the other facade routes raise, which it could not before because it built its own day count instead of calling
time_to_maturity. - The price is floored at zero, so an extreme discount times tenor returns nothing rather than a negative number.
Fingerprint. fp:v1:blake3:f5c7d439e0f83e143050c84fbeed937b1b1f7be6482b1ea6d8df1f7b0e651797 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_compounding_swap
rates.compounding_swap · v1 · ga-validated.
Source. Compounded floating leg against a fixed leg; no single citation
Conventions.
- Act/365F on both legs; positive to the receiver of fixed
- Three compounding conventions are exposed — none, straight and flat — rather than one being chosen for the caller
Limitations.
- Each sub-period accrues the simple forward
DF(start)/DF(end) - 1, so the straight-compounded leg telescopes back to the growth the curve encodes whatever the sub-period count. fixed_frequencyis carried and never read, and cannot change this price: the fixed leg is simple interest accrued to the payment date and Act/365F is additive, so splitting the accrual sums to the identical cashflow. It would matter only under a compounding fixed leg or a non-additive day count.- Sub-periods are cut by integer division of the payment period, and the schedule is synthesised from the valuation date, so
start_dateis never read. - Every sub-period rate is projected off the curve; observed fixings are not consumed, so a seasoned period is forecast.
Fingerprint. fp:v1:blake3:d85e501e7f6bbf43028edf9194f449043f43ceb3a2bb9672d7c45f3630014d9b — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_currency_swap_dual_curve
rates.currency_swap · v1 · ga-validated.
Source. Two-leg discounted cashflow with an FX conversion; no single citation
Conventions.
- Each leg accrues on its own configurable day count — Act/360 or 30/360 depending on the constructor — while the curve is Act/365F
- Positive to the receiver; the result is in the receive leg's currency
fx_rateis pay currency per unit of receive currency, applied by division- A floating coupon pays the simple forward over the leg's own accrual,
(DF(start)/DF(end) - 1) / yf, plus the leg spread exchange_initial_principalandexchange_final_principalboth reach the price. The initial exchange is applied only when it falls after the valuation date, since one that has already settled is not a future cashflow.
Limitations.
- A swap with
mtm_resetsset is refused, not priced as a plain one. The flag has a public builder, so a caller can reach it, and until August 2026 it was read by no pricing code — the same shape asexchange_initial_principalandexchange_final_principalon this instrument, which cost a full principal of value while they were unread. Modelling a mark-to-market swap needs the periodic notional reset and the FX resettlement cashflow it implies, neither of which this instrument carries, so the route names what is missing rather than returning a plain-swap value under an MTM label. - The leg's day count and the curve's disagree, and unlike the Act/365F siblings the error does not partly cancel.
- No cross-currency basis spread: each leg discounts on its own plain rate curve.
- A failed forward lookup falls back to a zero rate rather than erroring, and a single snapshot is refused outright.
- The floating leg passed the curve's continuously compounded
forward_rateuntil August 2026, where a coupon of the formrate * accrual * notionalpays the simple forward. That overstated a five-year quarterly Act/360 float leg by 0.88% — 159,877 on 100mm at a flat 4% — and this was the tenth route to carry the same mismatch. It partly cancels on a float-float swap and does not on a fixed-float one. - Priced through
build_priceragainst 26 independently derived closed-form vectors inclosed_form_currency_swap_vectors.rs, agreeing bit-exactly. No third-party mirror exists. Covers all four leg-type combinations, both principal-exchange flags, a trade date either side of the valuation date, Act/360 and 30/360 legs, an FX sweep and inverted curve levels.
Fingerprint. fp:v1:blake3:63a27425f92e8ddf6dee5fe42a592b124286068f36264d7618866d29eca98e53 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_deposit
rates.deposit · v1 · ga-validated.
Source. Money-market simple-interest terminal value; no single citation
Conventions.
- Simple interest on the deposit's own rate and its own
day_count, defaulting to Act/360 - Positive: an asset, returning principal plus interest discounted
Limitations.
- Returns the full discounted terminal value, not a PV net of principal, so a deposit at the curve rate is worth about its notional rather than about zero.
- Matured deposits price at zero rather than discounting a terminal value that has already been paid.
- No credit spread over the discount curve.
Fingerprint. fp:v1:blake3:16f2458706ac587ba65af01db6ab6cadea75f6e97e9f568bd52e01c334f6ed22 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_float_bond_option_black
rates.float_bond_option · v1 · ga-validated.
Source. Black (1976) on a forward bond price
Conventions.
- Act/365F to expiry; European exercise only
- With a rate curve on the snapshot the forward clean price is computed from it; without one
spotmust already be the forward - Prices are per 100 face;
face_valuedoes not scale the result
Limitations.
- An American-flagged option was silently priced European until August 2026, despite
with_american_exercise()being a public builder that shipped example code calls. It is now refused. - Discounting is the flat scalar rate even when a curve supplies the forward. Without a curve no forward is derived at all and the caller must supply one, where passing a spot price gives a plausible wrong answer.
- Price only, and no test reached this pricer at all before August 2026, so the forward convention and the exercise style were both unmeasured.
Fingerprint. fp:v1:blake3:89fdfb6839dccf0a97f94881d84e3739b79a1278f8e77af8a5ffebc243932b60 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_fra
rates.fra · v1 · ga-validated.
Source. Standard discounted-settlement FRA arithmetic; no single citation
Conventions.
- The accrual uses the FRA's own
day_count, defaulting to Act/360; the curve itself is Act/365F - Long is positive; settled discounted at the period's own forward
- The forward is taken as
DF(start)/DF(end) - 1over the accrual, so it is a simple rate in the FRA's own convention
Limitations.
- One curve discounts and forecasts; no forecast/discount basis.
- The curve's continuously compounded Act/365F forward was compared directly against the simple Act/360 contract rate until August 2026, overstating the payoff rate by 3.8 bp at a 5% forward on a 91-day FRA. A FRA struck at the curve's own break-even now prices to zero.
- The settled payoff was discounted to the maturity date until August 2026. FRA settlement occurs at the period start; this understated absolute MTM by about 1.2% on a 3x6 FRA at a 5% flat curve.
Fingerprint. fp:v1:blake3:d93116f9faccd5e5862fb62d5697b3852bd6650bbdf8f396d1b1205e5309e54d — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_ois_future
rates.ois_future · v1 · ga-validated.
Source. Hull, Options, Futures and Other Derivatives, futures convexity
Conventions.
- Act/365F; a price index near 100, not a present value
- Convexity applied only when
short_rate_volatilityis supplied
Limitations.
- The settlement rate was the curve's continuously compounded
forward_rateuntil August 2026, where the contract quotes100 - Lon the simple forward its accrual multiplies. On a flat 4% curve that is 4.0000% against a true 4.0200% — 2.0 bp, or 0.02 on the price index, and more than thirty times the 0.06 bp convexity adjustment this capability treats as its main approximation. QuantLib's own Act/365F three-month forward on the same curve is 4.0198%. - The reference rate is a single curve forward over the accrual period, neither daily-compounded nor arithmetically averaged, so a 1M-average and a 3M-compounded contract price alike.
- First-order convexity only, and none at all without a short-rate volatility on the snapshot.
Fingerprint. fp:v1:blake3:32b0e4450ce9f2573fa2aaaa8af35541fdb32b59ca6d5654784869aa068cefec — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_ois_swap
rates.ois_swap · v1 · ga-validated.
Source. Standard OIS discounted cashflow; no single citation
Conventions.
- Act/365F on the curve; ACT/360 accruals on both legs
- Payer positive: floating PV minus fixed PV
- The floating accrual is
DF(start)/DF(end) - 1, the compounded growth factor the curve encodes payment_lagmoves the discounting, not the accrual: a coupon accrues to its period end and settlespayment_lagdays later, defaulting to the market-standard two
Limitations.
- Projects forward accruals off the curve. Observed daily fixings are not consumed, so a seasoned period is forecast rather than realised.
- The leg applied a simple rate on a mismatched day count until August 2026 — 0.8 bp high at a 2% forward, 5.8 bp low at 5%, the two errors partly cancelling. It now satisfies the telescoping identity to under a basis point of notional.
Fingerprint. fp:v1:blake3:6fcbf804c81a26a6352065531f00afc91dba2737f6e187744f447d25aa6b2114 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_option_embedded_float_bond_hull_white
rates.option_embedded_float_bond · v1 · ga-validated.
Source. Hull-White trinomial lattice, two-stage displacement
Conventions.
- Act/365F to maturity and to each schedule date
- Call and put dates are Bermudan: each is mapped to the nearest tree step and is exercisable only there
- A 200-step trinomial lattice; mean reversion fixed at 0.03
curve_dv01carries a scalar short-rate bump, not a curve bump, so aggregating it across pricers mixes two risk definitions
Limitations.
- The schedule was American-from-the-earliest-date until August 2026: adding call dates was bit-identical and only the first moved the price, overstating the issuer's option by roughly a third of its value on a five-year bond.
market.rate_curveis not read. The lattice builds its own term structure from the scalar short rate, so a real sloped or inverted curve is discarded.price_callable_bond_fittedbootstraps from a caller's discount factors and is not reachable from the facade.- Mean reversion and the step count are compile-time constants: the pricer accepts no parameters, so neither can be calibrated or refined by a caller.
- A call date is honoured up to half a step early — about 4.6 days on a five-year trade at 200 steps.
- Each coupon is the node's instantaneous short rate plus the spread — not a term rate. Under Hull-White the simple rate over a reset period exceeds the instantaneous one by about 1 bp at 5% on a quarterly reset and 35 bp at 10% on an annual one, so the gap matters most for long resets at high rates.
reference_rateis carried and never read, so the note prices the same whichever index it names.day_countwas likewise unread until August 2026: every coupon accrued over1 / reset_frequency, which is only right for 30/360, understating an ACT/360 note — the default and the USD floater standard — by 1.11% of each coupon on a ninety-two-day quarter. Validated with an empty call and put schedule, where the note is deterministic at the adapter's volatility floor and has an exact price: 19 vectors inclosed_form_float_bond_lattice_vectors.rs, worst 33% of the measured lattice band. It does not price to par, and that is the convention rather than an error: a textbook floater resets on the term rate, this one pays the instantaneous rate in arrears at the payment node, putting a zero-spread five-year note 2.23 points below par at a 10% annual reset. Modelling only the instantaneous-versus-term departure accounts for about half of that, which is how the in-arrears timing was found. The band is the measured O(1/n) lattice error, 0.0104 at 200 steps on a five-year note, with Richardson agreeing with the closed form to eight significant figures. Exercise itself is not covered. - Delta, gamma, theta and rho are reported as zero and were never computed; only the scalar-rate DV01 and the vega are real.
Fingerprint. fp:v1:blake3:be24f7fbb6f2c9c13ed426ba28c66a47a74a8fb878afdb9ec7fc45acdbc52a5f — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_prdc_lsm
rates.prdc · v1 · experimental.
Source. Garman & Kohlhagen (1983); Longstaff & Schwartz (2001) least-squares Monte Carlo
Conventions.
- Act/365F day count
- FX follows Garman-Kohlhagen drift domestic_rate - foreign_rate
- Issuer call is value-minimising Longstaff-Schwartz exercise at par
- 50,000 Monte Carlo paths, fixed seed "PRDC", quadratic basis. The price carries its own standard error on
Valued::std_error.
Limitations.
- Reference fixture covers the zero-volatility, non-callable coupon-strip reduction; callable exercise and stochastic FX are not externally benchmarked.
- That standard error is the sampling error of the mean given this exercise policy. The policy is fitted in-sample on the same paths it is valued on, which biases the value upward, and a bias is not what a standard error measures: a narrow band says the average is well determined, not that the policy is right.
Fingerprint. fp:v1:blake3:0348686234a95d0bb8d0e1884028aa62d624bd7e4e9cff4d90775beb4e0e0d01 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_stir_future
rates.stir_future · v1 · ga-validated.
Source. Hull, Options, Futures and Other Derivatives, Eurodollar futures convexity
Conventions.
- Act/365F; the returned number is a price index near 100, not a PV
- Convexity is applied only when
short_rate_volatilityis supplied; without one the futures rate equals the forward rate
Limitations.
- The settlement rate was the curve's continuously compounded
forward_rateuntil August 2026, where the contract quotes100 - Lon the simple forward its accrual multiplies. On a flat 4% curve that is 4.0000% against a true 4.0200% — 2.0 bp, or 0.02 on the price index, and more than thirty times the 0.06 bp convexity adjustment this capability treats as its main approximation. QuantLib's own Act/365F three-month forward on the same curve is 4.0198%. - The convexity adjustment is the first-order Gaussian form
0.5 sigma^2 T1 T2: 0.06 bp on a three-month contract three months out, 48.8 bp on one ten years out at a 1% short-rate volatility. Omitting the volatility omits the adjustment. - No IMM roll or business-day adjustment on the rate period.
Fingerprint. fp:v1:blake3:8b41f88795dd33caf8e45b49ab4554509343328778c0f9e5980ae0eaf8e1bdd6 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_swap
rates.swap · v1 · ga-validated.
Source. Standard fixed-versus-float discounted cashflow; no single citation
Conventions.
- Fixed leg accrues 30/360; floating leg accrues Act/360
- Payer positive: floating PV minus fixed PV
- Floating coupons use the simple forward implied by
DF(start)/DF(end) - 1over the leg accrual
Limitations.
- One curve discounts and forecasts. A multi-curve swap with a forecast/discount basis is not representable.
- The identity also assumes valuation at a reset, so it omits the accrual on a period already under way.
- No business-day adjustment, payment lag, fixing calendar or historical fixings on the runtime route.
Fingerprint. fp:v1:blake3:fbb0deaf35fb2c55c45269d0512554761d277514564dd4a381c27905545a3608 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_swaption
rates.swaption · v1 · ga-validated.
Source. Black (1976)
Conventions.
- Act/360 day count
- Black-76 lognormal swap rate
Limitations.
- European exercise; Bermudan requires a lattice or LSM pricer.
- The forward swap rate came from the standalone
par_swap_ratehelper until August 2026. That hardcodes an Act/360 annuity, whileSwaption::europeanbuilds a semi-annual 30/360 fixed leg: over five years the accrual sums differ by 1.44%, and since the rate is(DF_start - DF_end) / annuitythe inflated annuity depressed the forward to 4.0066% against a true 4.0423%. The option's own annuity already used the leg'sday_count, so the rate and the annuity disagreed with each other — a payer priced 5.8% low and a receiver 5.3% high.quantlib_swaption.csvcould not catch it: it supplies the forward and the annuity as numbers, so it validates the Black formula and not the curve read.quantlib_swaption_facade.csvprices throughbuild_pricer.
Fingerprint. fp:v1:blake3:32b1c053045490fbe979f7133192c6685ca2d95be88b1a2dcbdb3385fe681258 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_swaption_lg2f
rates.swaption_lg2f · v1 · ga-validated.
Source. Brigo & Mercurio (2006), Interest Rate Models, eq. 4.31
Conventions.
- Act/365F for the option expiry
- The fixed leg's own payment dates and day count, not evenly spaced periods: a semi-annual leg alternates 184- and 181-day accruals, worth about a basis point on a 10y swaption
- Continuously compounded flat rate from the snapshot as the model's own curve
Limitations.
- Discounts on a flat rate, not a term-structure curve. G2++ is defined by a deterministic shift fitted to a market curve, and this fits it to a single flat rate — correct for the model as specified, and not the curve a desk actually holds.
- Calibration is not implemented: (a, sigma, b, eta, rho) are the caller's own fit. There is no default parameter set, precisely so that no number is produced from a correlation structure nobody chose.
- No vega. The volatility lives in sigma and eta, which are calibration rather than a market quote, so bumping the snapshot volatility returns exactly zero — reported as absent rather than as a zero risk.
Fingerprint. fp:v1:blake3:73ef7098c0d6cac39e6429c27e5b21610643cfb1b01fc8e59facded068654250 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.
rates_target_redemption_note_mc
rates.target_redemption_note · v1 · experimental.
Source. Hull & White (1990); Luo & Shevchenko (2015) for TARN finite-difference benchmark design
Conventions.
- Act/365F day count
- Coupon rule is structured TarnCouponSpec, not the legacy text formula
- Final coupon is truncated so cumulative coupons land on the target
- 100,000 Monte Carlo paths on a fixed seed, with common random numbers for the bumped DV01/vega. The price carries its own standard error on
Valued::std_error; the Greeks do not need one, because common random numbers make the bumped-minus-base difference far better determined than either price.
Limitations.
- Reference fixture covers zero-target and unreachable fixed-coupon reductions; stochastic inverse-floater target timing is not externally benchmarked.
Fingerprint. fp:v1:blake3:9b3b4edb827d60651b192afc59f1d11d84dad73e6df734b9a5d3935e83888524 — identifies this exact pricing routine. It changes when the method changes, so a stored valuation can be traced to the code that produced it.