Independent project · Jun 2026
Interest Rate Derivatives Pricing Engine (Swaptions)
An end-to-end fixed-income engine in pure Python/NumPy — no SciPy: every numerical routine (bootstrap root-find, cubic spline, monotone-convex interpolation, NSS fit, inverse-normal CDF, quasi-random sequences) implemented directly. Bootstraps Treasury zero curves from FRED, calibrates Hull-White, prices European and Bermudan swaptions by Monte Carlo, and runs hedging backtests and stress tests.
NumPyHull-WhiteMonte CarloLongstaff-SchwartzYield CurvesFRED
Bootstrapped zero curve, forwards, and NSS fit
Zero rate
Instantaneous forward
NSS fit
Hull-White calibration: market vs. model ATM swaption vols
2Y tenor
5Y tenor
10Y tenor
2s10s slope across the dataset (the 2022–2024 inversion)
2s10s slope (10Y − 2Y)
Charts render the project's actual published result files, exported unmodified from the source repository.
Approach & findings
- Bootstrapped daily zero curves from 2,206 FRED Treasury par-yield dates (2018–2026, 11 pillars) under the no-arbitrage par condition, with log-linear, natural-cubic-spline, and Hagan–West monotone-convex interpolation; max pillar reprice error 0.31 bp, NSS fit RMSE 5.8 bp.
- Calibrated Hull-White (a = 0.063, σ = 125 bp) to a 4×3 ATM swaption normal-vol surface via Jamshidian decomposition: fit RMSE 2.75 bp, max error 4.9 bp; the model reprices the initial discount curve to ~1e-16 by construction (Brigo–Mercurio reconstruction).
- Vectorized Monte Carlo with antithetic + control variates and Halton QMC: matches the Jamshidian analytic to 0.022 bp at 200k paths (CV), QMC error 0.0005 bp at 16k paths; Longstaff-Schwartz prices the Bermudan at an 80.4 bp early-exercise premium over the European.
- Walk-forward delta-hedging backtest (1Y×5Y receiver, 262 days): DV01-neutral swap hedge cut daily P&L volatility 26.1× (14.6 bp/day → 0.56 bp/day), with theta/delta/gamma/vega attribution reconciling to ~1 bp/day residual.
- Risk & stress: bump-and-reprice key-rate DV01s that sum to the parallel DV01 exactly, curve/vol/historical-replay scenarios (COVID, 2022 hikes, SVB), 1-day historical VaR/CVaR, and reverse stress; 22 independent cross-component identity checks pass.
Results
- Hull-White fit RMSE
- 2.75 bp
- MC vs analytic error
- 0.022 bp
- Bermudan exercise premium
- 80.4 bp
- Hedge variance reduction
- 26.1×