fixed-income · yield-curve · python
Fixed Income Studio
Python toolkit and browser studio for U.S. Treasury curve analysis: Nelson-Siegel, Svensson, Vasicek and CIR fits on live public data, Diebold-Li dynamics, ACM term premia and a bond calculator.
Overview
A Python toolkit and a browser studio for U.S. Treasury curve analysis. It started as a Nelson-Siegel model and grew into the full workflow: fit the curve, model its factors over time, estimate short-rate models, and split long yields into expected short rates and a term premium. Curves come from treasury.gov, FRED's public export and the Federal Reserve Board's GSW tables, so it runs with no configuration.
What it does
- Curve Fitter: Nelson-Siegel, Svensson, Vasicek and CIR on today's curve or pasted quotes, with factors, forwards, residuals and fit statistics.
- Historical Factors: Diebold-Li forecasts with 90% bands and rolling-origin backtests.
- Treasury vs TIPS: nominal and real factors side by side, with breakeven inflation.
- Short-Rate Models: Vasicek or CIR estimated by OLS or exact MLE, calibrated to today's curve, physical and risk-neutral long-run means compared.
- Term Premium: ACM term premia on the GSW zero curve since 1961, benchmarked against the Fed Board's Kim-Wright series.
- Curve Analytics: carry and roll-down, spreads and butterflies, rich/cheap ranking, PCA, and a bond calculator with duration, convexity, DV01 and z-spread.
- Every tab is backed by a JSON endpoint, and the same models are importable from Python.
Stack
Python · Flask · Plotly · NumPy · SciPy · FRED API.
Status
Open source (MIT), with CI on every push.