Module sabr
Expand description
The SABR rate smile: the surface, the spec and fit that build one from a grid, the forwards a fit reads, and one point of the smile.
Structs§
- PySabr
Fit - A fitted SABR surface and the diagnostics of each slice that built it.
- PySabr
Spec - How a grid is fitted to SABR: the formula, β and the shift, all stated, and the acceptance — the RMS vol error as a fraction of a slice’s mean quote — with the Halton restarts a slice may spend reaching it.
- PySabr
VolSurface - A SABR rate smile over expiry × tenor: σ_ATM, ρ and ν at each node, β and
the shift stated once, α implied at each read from the ATM vol at the
read’s own forward. Pinned with
with_swaption_volsorwith_cap_volsbeside a grid.
Enums§
- PySabr
Formula 🔒 - The expansion a SABR smile is read under: Hagan’s lognormal
(
HaganLognormal), Hagan’s normal (HaganNormal), or the normal β = 0 form that reads a negative forward (NormalBetaZero).
Functions§
- __
pyfunction_ 🔒 ⚠alpha_ from_ atm - __
pyfunction_ 🔒 ⚠calibrate_ sabr - __
pyfunction_ 🔒 ⚠calibrate_ sabr_ with_ atm - __
pyfunction_ 🔒 ⚠caplet_ forwards - __
pyfunction_ 🔒 ⚠sabr_ vol - __
pyfunction_ 🔒 ⚠swaption_ forwards - alpha_
from_ 🔒atm - The α that reproduces
atm_volatforwardunderformula. - calibrate_
sabr 🔒 - Fits SABR to every node of the smiled
grid, each at its forward —forwards[expiry][tenor]— underspec. - calibrate_
sabr_ 🔒with_ atm - Fits SABR on a dense ATM matrix
atmwith a sparse smilecube: σ_ATM from the matrix at every node, ρ and ν fitted at the cube’s nodes and read onto the matrix’s. Every cube node must be a matrix node. - caplet_
forwards 🔒 - Each caplet’s expiry (years) and forward on
marketfor the cap on the termindexfromeffectivetotermination, filtered to the rows the caplet stripper strips; the forwards one per row. - register 🔒
- Registers the SABR classes and functions.
- sabr_
vol 🔒 - One point of a SABR smile: the vol at
strikeforforwardandexpiry_years, informula’s convention. - swaption_
forwards 🔒 - The forward swap rate per
(expiry, tenor)onmarket: the par rate of the swaptemplatedrafts starting each expiry after spot and running each tenor. One row per expiry, one value per tenor.