Examples#
This gallery walks through every public feature of
financialkit.interest_rate_models: equilibrium and affine short-rate
models, models fitted to today’s curve, bond options, caps, floors and
swaptions, and the Heath-Jarrow-Morton framework. Each script illustrates
one dated breakthrough from the
history page.
See also the narrative tutorial:
Each script in this gallery is self-contained and can be run directly with
python examples/interest_rate_models/<section>/<script>.py.
Sections#
short_rate – Feynman-Kac bond prices by simulation, Feller’s boundary condition, Merton’s Gaussian rate, Vasicek, Cox-Ingersoll-Ross, Duffie-Kan affine models and the two-factor G2++.
curve_fitted – Ho-Lee, Hull-White, the Black-Derman-Toy tree and the futures convexity adjustment.
options – Jamshidian’s bond options and swaptions, caps and floors by Black’s formula, and Black swaptions.
hjm – the Heath-Jarrow-Morton drift condition.
Curve-fitted models#
Arbitrage-free models that take today’s yield curve as an input: Ho-Lee, Hull-White and the Black-Derman-Toy tree, and the convexity gap between futures and forward rates that they predict.
Ho-Lee: the first arbitrage-free term-structure model
Heath-Jarrow-Morton#
Modelling the whole forward curve, and the drift condition that absence of arbitrage imposes on it.
Rate options#
Options on bonds, caps, floors and swaptions: Jamshidian’s closed form and decomposition in Gaussian short-rate models, and Black’s formula in the LIBOR and swap market models.
Jamshidian’s decomposition: swaptions in one-factor models
Brace-Gatarek-Musiela: caps and floors by Black’s formula
Short-rate models#
Models of the instantaneous short rate that produce their own yield curve: Merton, Vasicek and Cox-Ingersoll-Ross, the affine family that contains them, and the two-factor G2++, all checked against Feynman-Kac Monte Carlo.