Bond Pricing & Duration
Price fixed-coupon bonds and calculate Macaulay duration, modified duration, convexity and DV01 from explicit cash flows.
Download working, transparent fixed-income models. Test bond duration, yield-curve shocks, sovereign auction tails and portfolio rate risk — then adapt the Python, Jupyter and CSV templates to your own research.
Real, inspectable calculations — not static mockups. Each template ships with source code, a runnable notebook and documented assumptions.
Price fixed-coupon bonds and calculate Macaulay duration, modified duration, convexity and DV01 from explicit cash flows.
Interpolate tenor yields and test parallel rate shocks or a pivot-based steepener against a documented synthetic curve.
Compare auction stop yields with when-issued yields, calculate tails in basis points and classify tails versus throughs.
Estimate first- and second-order P&L under a parallel yield shock using modified duration and convexity for each position.
Change the assumptions and inspect the output before downloading the underlying model. All calculations run locally in your browser.
Semiannual coupons; settlement on coupon date. Price excludes accrued interest and credit risk.
Synthetic yields, not live observations. Simple linear shock model, not a forecast.
Use the source in lessons, notebooks, research articles, financial websites or your own applications. Source attribution is appreciated but not required by the MIT license. Sample data is provided for testing, not for investment decisions.
If you publish research based on these models, consider citing the original methodology and linking back to BondStats so readers can reproduce your analysis.