Struct MarketState
struct MarketState {
terms: IdStore<CurveId, Term>,
vols: IdStore<VolSurfaceId, VolSurface>,
observations: Observations,
marks: IdStore<MarkId, Mark>,
}Expand description
The stored state a lift reads, as four families by shape — what the machinery branches on, not the asset class, which stays a label derived from each input’s risk axis. The walk is the families in this order, each family in its identity’s own order.
| family | holds | keyed by | lifted as |
|---|---|---|---|
terms | rate curves (4 roles), survival curves + recovery, inflation curves | CurveId | the curve’s parameters; the recovery its own span |
vols | FX, swaption, cap, bond-yield, credit, YoY and CPI vol surfaces | VolSurfaceId | one parameter per node |
observations | FX spots, published fixings | — | always yielded, even when empty |
marks | base, CMS spread and basket correlations, recovery floors, copula degrees of freedom, watched scalars | MarkId | per mark; walked last |
Equality is derived: a store cannot join this struct and stay out of it.
Fields§
§terms: IdStore<CurveId, Term>Every term structure — the four rate-curve roles, the survival curves
with their stated recovery, the inflation curves — in one store keyed
by curve identity. The identity’s own order is the lift order: every
discount curve, then every projection, then every credit, repo,
spread and inflation curve, each role by its key; no per-role store
exists to be reordered on its own. The identity’s role decides which
arm of Term sits under it, as for vols and marks.
vols: IdStore<VolSurfaceId, VolSurface>Every vol surface — FX by pair; swaption, cap and bond yield by
currency; credit by name; year-on-year and zero-coupon inflation by
price-index code — in one store keyed by surface identity. The
identity’s own order is the lift order, and the identity decides
which arm of VolSurface sits under it: the verbs insert each with
its own, so a reader asking for another arm meets a defect in this
store, never a caller’s.
observations: ObservationsThe facts already printed — spots and fixings — which no identity keys and which are always yielded, even when empty, so a market that later gains one moves no other input.
marks: IdStore<MarkId, Mark>Every model mark — base correlation per credit index, CMS spread
correlation per pair of swap-index codes (the pair in the order
correlation_pair puts it),
basket correlation by the caller’s key, tranche recovery floor and
double-t degrees of freedom per credit index, and the watched
exogenous scalars by label — in one store keyed by mark identity, in
the identity’s order, walked last so a market that gains a mark
moves no other input. Each is lifted: one parameter per base-
correlation point or CMS pillar, two per copula, one otherwise, on the
correlation axis (floors on the recovery axis, exogenous scalars on
none). The identity decides the Mark arm under it, as for vols.
Trait Implementations§
§impl Clone for MarketState
impl Clone for MarketState
§fn clone(&self) -> MarketState
fn clone(&self) -> MarketState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more