Skip to main content

Module marketdata

Module marketdata 

Expand description

MarketContext data that sits below curves: observed fixings and FX spot rates.

These are inputs a curve reads while calibrating and a coupon reads while projecting, so they cannot live in the seam that owns curves: a market layer that straddled curves would be acyclic only at submodule granularity, two layers wearing one name. This is the lower one.

Everything here follows the same rule as a curve, and for the same reason. Storage holds f64 and carries no AD state; a lift produces a mode view that borrows it; a substituted lift takes a caller’s parameter vector so a risk pass can register handles without touching what it borrowed. These are market inputs, so they are differentiable — a fixing and an FX spot each carry their own risk axis, which is precisely what distinguishes them from the contract terms a trade holds.

Modules§

base_correlation
Base correlation: asset correlation as a function of the tranche attachment point — the market-standard parameterisation for index tranches, quoted per index and stored beside its survival curve.
cms_spread_correlation
The market’s CMS spread correlation for a pair of swap indices: one flat mark, a term structure by option expiry, or a 2-D surface by expiry and strike.
credit_vol
Credit vol: the Black volatility of a forward CDS spread by option expiry, quoted per credit name — a single name’s entity or an index’s code — and stored beside its survival curve.
fixings
Observed index fixings.
future_option_vol
A listed future’s option vol surface: listed expiry dates × absolute strikes, the market input an option on a bond future reads its vol from.
fx
FX spot rates.
fx_vol
FX volatility surfaces: delta-quoted smiles per expiry, as a market-data store.
inflation_vol
Year-on-year inflation optionlet volatility: the vol a YoY caplet, floorlet or a collared YoY coupon reads.
rate_vol
Rate volatility surfaces: at-the-money vols on an expiry × tenor grid, as a market-data store.
sabr
A SABR rate smile surface, parameterised by the at-the-money vol a desk quotes.

Structs§

UnknownFixingIndexError
The detail behind MarketDataError::UnknownFixingIndex.

Enums§

MarketDataError
A market-data lookup that cannot be answered.