Skip to content
Projects / Phase 4.1 · Quick Wins

Bond Price and Duration Explorer

How does a yield change affect a bond, how good are the quick risk numbers, and does a DV01 hedge actually remove the risk?

Background

A bank funds itself with deposits and holds fixed-rate government bonds against them. When yields rise those bonds lose value, and the treasury or asset–liability management (ALM) team has to say by how much. Rate-risk limits, hedge accounting and the reports to the Asset-Liability Committee are written in duration, convexity and DV01: the change in value for a one basis point move in yield.

A hedge can be flat in DV01 and still lose money. Short and long yields rarely move by the same amount, so the shape of the yield curve changes from day to day. On those days a report can show zero rate risk while the position takes a real loss.

Why build it

This Python project starts with a single bond and asks how a change in yield moves its price, and how far the quick duration and convexity estimates can be trusted for small moves and for stress moves. It then hedges a 10-year position with a 2-year bond and tests the hedge on real U.S. Treasury yield curve moves from 2026.

Rates and ALM teams care most about the risk a hedge leaves behind, and here you measure it yourself. The project is a compact piece of fixed-income work to show for rates quant, ALM quant and bank treasury roles. It also leads naturally into yield curve hedging with key-rate durations.

Headline result

A bond price, duration, DV01 and convexity calculator. A DV01-matched 2-year hedge removes only 58% of a 10-year position’s daily P&L variance on real 2026 curve moves; the rest is almost entirely 10Y–2Y slope risk.

Figures

  • Cumulative 2026 P&L of unhedged and DV01-hedged 10-year positions, and hedged daily P&L against the 10Y-2Y slope change
    The DV01 hedge removes only 58% of daily P&L variance; what remains is slope P&L, about −USD 7.7k per bp of steepening.
  • Price change of a 10-year bond under parallel yield shocks: exact, duration-only and duration-plus-convexity, with approximation errors
    Duration alone understates price after large shocks either way, by about 3–4 per 100 face at ±300 bp; convexity closes most of the gap.

Data used

  • Illustrative bond terms
  • U.S. Treasury daily par yield curve, Jan–Sep 2026

Topics covered

  • Bond duration and convexity
  • DV01 and price sensitivity
  • Macaulay and modified duration
  • DV01-matched hedging
  • Yield curve slope risk
  • Asset–liability management (ALM)
  • U.S. Treasury par yield curve data

Members open the full write-up, notebook, tested code and data in the project reader.