Where you are. You can price a bond at any yield and recover the yield from any price. That answers what a bond is worth right now. A holder’s more urgent question is different and forward-looking: rates might move a quarter point next week, and what will that do to me? You could reprice and find out. Duration tells you before you reprice, in one number, and that is why every risk system in the world carries it.
Two bonds, the same move
Two bonds, both paying a 4% coupon, both trading at par because the market yield is also 4%. One matures in two years, the other in ten.
Rates rise by one percentage point. Both fall in price, because that is the seesaw. But they do not fall by the same amount, and the difference is not small: the two-year loses roughly two percent of its value, the ten-year roughly eight. Four times the damage from an identical move.
Nothing about their coupons differs. Nothing about their credit differs. What differs is how far away the money is - and specifically how far away the big final payment is, which lesson 5 pointed out carries most of a bond’s value.
The idea in one paragraph
Duration is how much a bond’s price moves when its yield moves, expressed per unit of price so that bonds of different sizes can be compared. It answers the question a holder actually has - what will a rate move cost me - without repricing anything, and it is a single number, which means a portfolio’s sensitivity is just a weighted sum of its holdings’ durations. Mathematically it is the derivative of price with respect to yield, but you never need to differentiate anything to get it: nudge the yield a basis point each way, reprice, and measure the difference. The measured answer is the number, and the finite difference is honest about being an approximation in a way the closed form quietly is not.
Measure it, do not derive it
The definition is a derivative; the practice is a difference. Price the bond one basis point above its current yield, price it one basis point below, take the difference and divide by the size of the move, then divide by the price to make it comparable.
That is the whole computation, four lines in the exercise, and it works on any instrument you can price - including ones with no formula at all, which is exactly why module 5’s options desk reaches for the same technique when it needs sensitivities to volatility and time.
Run it on the two bonds and the hook’s numbers appear: about 1.9 for the two-year, about 8.1 for the ten-year, the ratio a little over four.
The straight line, and where it stops being true
Duration is a tangent: a straight-line approximation to a curve, taken at today’s yield. For small moves that is excellent. For large ones it drifts, and it drifts in a direction that happens to favour the holder.
Look at the curve. It bends away from the tangent on both sides, so for a large rate rise the actual price is a little higher than duration predicted, and for a large fall it is a little higher too. That bend has a name - convexity - and it is why a large move is never quite as bad, and always slightly better, than duration alone suggests.
Check yourself
1. Two bonds, same coupon, same issuer, maturities of two and ten years. Why does the longer one fall four times as far on the same rate move?
Because its money is further away, so a change in the discount rate compounds against it over more periods, and because most of a bond’s value sits in its final payment. The longer that final payment is delayed, the harder any rate change hits its present value.
2. Duration is defined as a derivative but the exercise never differentiates anything. Why is a finite difference acceptable here?
Because you can already price the bond at any yield, so nudging the input and observing the output measures the same slope directly. It also works for instruments with no closed-form price, which is why the technique carries into module 5’s option sensitivities.
3. Rates move three percentage points. Duration says your bond loses twenty-four percent. Should you expect exactly that?
No: expect to lose slightly less. Duration is the tangent, and the curve of price against yield bends away from it, so large moves are always a little kinder than the straight-line estimate. The gap between the two is convexity, and it grows with the size of the move.
4. Why is a single sensitivity number so much more useful to a risk system than the ability to reprice?
Because it adds. A portfolio’s rate sensitivity is the weighted sum of its holdings’ durations, so thousands of positions collapse to one number that can be watched, limited and hedged. Repricing everything answers the question only after the move; duration answers it in advance and in aggregate.
Do this
Measure both bonds’ sensitivity and confirm the ratio.
python3 code/duration.py
The starter leaves you modified_duration, the finite difference: price a basis point either side of the current yield, take the difference over the size of the move, divide by the price. The assertions bracket each bond’s answer and check that the ten-year is roughly four times the two-year. Success prints both sensitivities as the cost of a hundred basis point move, and the line:
duration is a sensitivity, not a date: it says what a rate move does to your price, which is the only thing a holder feels
The completed version is in solutions/duration.py.
What you can now do. You can measure any bond’s exposure to rates and say what a move will cost before it happens, using a technique that transfers to any instrument you can price. So far, though, you have discounted every payment at a single rate, as if money had one price regardless of when it comes back. It does not, and the next lesson replaces that single number with a curve.