This repo calibrates a recombining binomial short-rate tree to a zero-coupon discount curve and prices ZCBs via backward induction.
- Risk-neutral pricing on a short-rate lattice
- Sequential calibration to match market discount factors
- Clean implementation + tests
Short rate:
r[t,j] = a[t] * exp((2j - t) * sigma * sqrt(dt))
Calibration chooses a[t] so that model ZCB prices match market discounts.
pip install -r requirements.txt
python -m pytest -q
python examples/run_demo.py- European call on a ZCB
- Caplet/Floorlet pricing
- Forward vs Futures difference under stochastic rates
- Swaps / swaptions on the tree