BondStats.
BONDSTATS / DEVELOPER TOOLS / MODEL REPOSITORY RELEASE 01

Fixed Income.
Source Included.

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.

4 executable modelsPython 3 · Standard libraryJupyter notebooksCSV sample inputsMIT-licensed code

01 / Model library

Real, inspectable calculations — not static mockups. Each template ships with source code, a runnable notebook and documented assumptions.

MODEL 01 / FIXED INCOME

Bond Pricing & Duration

Price fixed-coupon bonds and calculate Macaulay duration, modified duration, convexity and DV01 from explicit cash flows.

Bond mathCash-flow PVDuration
MODEL 02 / MACRO

Yield Curve Scenario Engine

Interpolate tenor yields and test parallel rate shocks or a pivot-based steepener against a documented synthetic curve.

Yield curvesRate shocksInterpolation
MODEL 03 / PRIMARY MARKETS

Sovereign Auction Tail

Compare auction stop yields with when-issued yields, calculate tails in basis points and classify tails versus throughs.

Auction analysisBasis pointsCSV
MODEL 04 / RISK

Portfolio Interest-Rate Risk

Estimate first- and second-order P&L under a parallel yield shock using modified duration and convexity for each position.

Portfolio riskDV01Convexity

02 / Scenario console

Change the assumptions and inspect the output before downloading the underlying model. All calculations run locally in your browser.

INTERACTIVE / BOND ANALYTICS

Fixed-Coupon Bond

Estimated bond price—
Modified duration
—
DV01
—

Semiannual coupons; settlement on coupon date. Price excludes accrued interest and credit risk.

INTERACTIVE / MARKET SCENARIOS

Yield Curve Shock

3M2Y10Y30Y
Illustrative 10Y yield after shock—
10Y yield change
—
Base 10Y yield
4.10%

Synthetic yields, not live observations. Simple linear shock model, not a forecast.

Methodology & limitations. These are educational, deterministic research models. Yield curve inputs and auction samples are synthetic; they are not live BondStats market data. Bond price assumes regular coupon periods. Portfolio sensitivity uses a local duration/convexity approximation and does not capture credit spreads, optionality, curve twists or liquidity risk. Validate models before professional use.

Built to be reused

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.