Module stores
Expand description
The market stores a Python caller pins — survival, inflation, base correlation, FX volatility — and the bond handle three products are written on.
Each class is a frozen handle over the core’s own type. The one accessor
each store carries is the passive instantiation a pricer uses — the
same trait method under f64 — so a number read here is a number the
valuation would have read.
Structs§
- PyBase
Correlation - A base-correlation skew across an index’s capital structure.
- PyCms
Spread Correlation Curve - The market’s correlation between two swap indices’ rates by option expiry in years — linear between pillars, flat beyond them — or one flat mark with no pillar.
- PyCpi
VolSurface - A zero-coupon CPI option volatility surface over expiry × annualised
zero-coupon strike — what a zero-coupon inflation cap, floor or collared
CPI notional reads, pinned per price index. Lognormal is Black-76 on the
forward index ratio
I(T)/I(T0)at strike(1+k)^τ; normal is Bachelier on the same ratio, the vol in ratio units. Read at the time from the first of the month of (valuation − lag) to maturity − lag, ACT/365F. - PyCredit
VolSurface - The Black volatility of a credit name’s forward CDS spread by option expiry, in years: linear in total variance between quoted expiries, flat beyond them.
- PyFixed
Rate Bond - A fixed-rate bullet bond — the underlying a callable, a forward and a total-return swap are written on. Not an instrument: the core values a plain bond only through the products written on it.
- PyFuture
Option VolSurface - A listed bond future’s option vol surface over listed expiry dates ×
strikes per 100 face — what every option exercising into that contract
reads, pinned per contract with
MarketContext.with_future_option_vols. Lognormal is a Black-76 price vol; normal a Bachelier price vol in points per year. Sticky-strike: linear in vol between strikes, linear in total variance between expiries, flat beyond every edge; time isday_count(ACT/365F unless stated) fromreference. - PyFx
VolSmile - An FX volatility surface: one smile per expiry, quoted as market
strangles under a delta convention.
One expiry’s smile:
(quote, vol)nodes, the quote spelled as the market spells it —"25P","ATM","25C"— held from the lowest strike’s quote to the highest’s. A value of its own, so a caller can build one from the market’s three quotes or from nodes, read its nodes back, and hand it to a surface. - PyFx
VolSurface - An FX volatility surface: one smile per expiry.
- PyInflation
Curve - An inflation index-level curve.
- PyRate
VolSurface - A rate volatility surface on an expiry × tenor grid — the swaption vols a swaption reads, and the yield vols a bond option reads — optionally carrying a smile in absolute rate strikes, which a cap reads.
- PyRepo
Spread Curve - A repo spread: the simple spreads a desk marks — GC against the overnight
curve, a special against GC — at dated pillars, linear between them and
flat outside, accruing on a money-market
basis. Pinned withMarketContext.with_repo_spreadover a base, it adds in simple-rate space,1/P = 1/P_base + s·τ, and its pillars report risk on the repo axis. - PySpread
Curve - A spread curve: a continuously compounded spread over a date, applied on
top of the discounting a security is priced on. Dated, its pillars are
free parameters and report risk on the
security_spreadaxis; flat, it is declared data and reports none. - PySurvival
Curve - A survival curve: an issuer’s or an index’s probability of surviving to a date.
- PyYield
Moments 🔒 - A bond’s dirty price and its first two yield derivatives at one yield, from one second-order pricing pass. Every yield-space measure is a ratio of these, so a caller wanting duration, convexity and DV01 together prices once and reads three.
- PyYoy
VolSurface - A year-on-year inflation optionlet volatility surface over expiry ×
absolute YoY strike — what a YoY cap, floor or collared YoY coupon reads,
pinned per price index. Normal (Bachelier) or lognormal (Black), a
lognormal one optionally
displacement-shifted (a displacement of one prices on1 + rate). Each optionlet reads it at the time from the first of the month of (valuation − lag) to its period end − lag, ACT/365F.
Enums§
- PyCms
Spread 🔒Correlation Input - A CMS spread correlation as a caller hands it to the market: a number (the flat mark) or a term structure.
- PyDelta
Convention 🔒 - How an FX delta is quoted:
SpotorFwd, each plain or premium-adjusted (PaSpot,PaFwd). - PyLevel
Interpolation 🔒 - How an inflation curve reads an index level between its nodes:
Linearin the level, orLogLinear(linear in its logarithm). - PySmile
Input 🔒 - One smile of a surface as Python spells it: the market’s quote quadruple, or a built smile at its expiry.
- PyStrike
Axis 🔒 - What a cube’s strikes measure: an
Absoluterate, or aSpreadToAtmover the forward. - PyVol
Convention 🔒 - How a rate volatility is quoted:
Normal(basis-point) orLognormal. - PyYield
Convention 🔒 - The convention a quoted yield is stated under: a street convention
(
UsStreet,UkGilt,DeGovt, or the bond’s ownDefault), a fixed compounding (Annual…Monthly,Continuous,Simple), or one of the two conventions that are not a discounting relationship (Ise,JapaneseSimple). Everyyield_conventionparameter takes the member or its spelling ("ust","semiannual","jgb").
Functions§
- on_
strike_ 🔒axis - A surface moved onto the strike axis the caller named. Reading a smile at spreads to the at-the-money forward is the swaption market’s convention, so it is named at construction rather than derived from the numbers, which cannot tell a 1% strike from a 100bp spread.
- parse_
yield_ 🔒basis - The yield basis a quote is stated on, from the convention a caller named.