Sub topic 12
Modified Duration: Price Sensitivity to Yield
This chapter assumes you can price a bond as a present value, know what yield to maturity (YTM) means, and have seen Macaulay duration as a weighted average time to cash flows. Here you turn that time measure into a sensitivity measure: how many percent a bond's price moves when its yield moves.
From Time to Sensitivity
Macaulay duration is measured in years. A 2.86-year Macaulay duration does not directly say how much the price falls when yields rise. Modified duration does.
Modified duration (ModDur) is the approximate percentage change in a bond's price for a 1.00 (100%) change in its yield to maturity, with the sign flipped so that the number is positive:
ModDur = MacDur / (1 + y/m)Here y is the annual YTM and m is the number of coupon periods per year. Dividing by 1 + y/m comes from differentiating the price formula with respect to yield. Each discount factor (1 + y/m)^-t has a derivative that carries an extra 1/(1 + y/m), which is where the divisor comes from.
The price change estimate is:
%ΔPrice ≈ -ModDur × ΔYieldThe minus sign reflects the inverse price-yield relationship. A positive ModDur means a rising yield lowers the price.
Worked Example
Take a 3-year bond with a 5% annual coupon and par of 100, priced at a 4% YTM.
- Price:
5/1.04 + 5/1.04² + 105/1.04³is about 102.7751. - Macaulay duration: the PV-weighted average time is about 2.861 years.
- Modified duration:
2.861 / 1.04is about 2.751.
If the YTM rises by 50 basis points (0.50%, or 0.005):
%ΔPrice ≈ -2.751 × 0.005 = -1.376%The estimated new price is about 102.7751 × (1 - 0.01376), or 101.36.
The next block computes these figures. It reuses the risk_measures function from the Topic Spine, so it also returns convexity, which a later chapter covers.
def risk_measures(face, coupon_rate, ytm, years, freq=1):
n = int(years * freq)
c = face * coupon_rate / freq
y = ytm / freq
cfs = [(t, c + (face if t == n else 0)) for t in range(1, n + 1)]
price = sum(cf / (1 + y) ** t for t, cf in cfs)
macaulay = sum(t * cf / (1 + y) ** t for t, cf in cfs) / price / freq
modified = macaulay / (1 + y)
convexity = sum(t * (t + 1) * cf / (1 + y) ** (t + 2) for t, cf in cfs) / price / freq ** 2
return price, macaulay, modified, convexity
price, mac, mod, conv = risk_measures(100, 0.05, 0.04, 3)
print(f"price={price:.4f} macaulay={mac:.4f} modified={mod:.4f}")
dy = 0.005
estimate = -mod * dy
print(f"duration-only estimate: {estimate:.4%}")
new_price, *_ = risk_measures(100, 0.05, 0.04 + dy, 3)
print(f"actual change: {new_price / price - 1:.4%}")The estimate is about -1.38%. The actual change is about -1.37%. The two differ slightly because the price-yield curve is not a straight line.
The Semiannual Case
Most bonds in practice pay semiannually. Two details matter:
- Macaulay duration must be expressed in years. If you work with periods, divide by
m. - The divisor uses the periodic yield
y/m, not the annual yield.
For example, suppose a semiannual bond has a Macaulay duration of 4.00 years and a 6% annual YTM. Then ModDur = 4.00 / (1 + 0.06/2) = 4.00 / 1.03 = 3.883.
Why the Estimate Is Only an Approximation
Modified duration is the slope of the price-yield curve at the current yield, scaled by price. A slope describes a straight line, but the curve bends. That has three consequences.
- Small yield changes: the straight line stays close to the curve, so the estimate is accurate.
- Large yield changes: the error grows with the square of the yield change.
- Direction of the error: the curve lies above its tangent line. For a yield increase, duration overstates the price drop. For a yield decrease, it understates the price gain.
The estimate always errs in the same direction for a standard bond with no embedded options. It predicts a smaller gain and a bigger loss than actually occur. Convexity corrects this, and a later chapter covers it.
| Yield change | Duration-only estimate | Effect on the true price |
|---|---|---|
| Down 1% | Understates the gain | True price rises more |
| Up 1% | Overstates the loss | True price falls less |
| Very small | Close to exact | Negligible error |
Interpreting the Number
Modified duration tells you the approximate percentage move per 1% yield change, so a value of 2.75 means about 2.75% per 100 basis points. You can compare it across bonds. A bond with ModDur 7 is about twice as sensitive to yield changes as a bond with ModDur 3.5, whatever their prices.
Some points to keep in mind:
- It describes a parallel change in the bond's own YTM. It does not cover changes in credit spread unless those flow into the YTM.
- It is a first-order estimate. It assumes cash flows do not change when yields change.
- It is a statistic at the current yield. As yield or time changes, the value changes.
Where Modified Duration Does Not Work
The formula MacDur / (1 + y/m) assumes fixed, known cash flows. Bonds with embedded options break that assumption. A callable bond may be redeemed early when yields fall, and a mortgage-backed security may prepay faster. For these, the cash flows depend on the yield, and a formula built on a fixed cash flow schedule misstates the sensitivity. Use effective duration instead, which reprices the bond after small yield shifts:
def effective_measures(p0, p_down, p_up, dy):
"""p_down is the price after yields fall by dy, p_up after yields rise by dy."""
eff_duration = (p_down - p_up) / (2 * p0 * dy)
eff_convexity = (p_down + p_up - 2 * p0) / (p0 * dy ** 2)
return eff_duration, eff_convexityFor an option-free bond, effective duration and modified duration are nearly equal. Their difference becomes important only when cash flows are uncertain.
Common Errors
- Forgetting the minus sign, which produces a price that rises when yields rise.
- Mixing units: using 50 for 50 basis points instead of 0.005.
- Using the annual yield in the divisor for a semiannual bond.
- Applying modified duration to a callable or prepayable bond.
- Trusting the estimate for a 300 basis point shift without a convexity adjustment.
Exercise
A bond has a Macaulay duration of 5.00 years and an annual-pay YTM of 8%. Find its modified duration and estimate the percentage price change if the YTM rises by 25 basis points.
Show answer
ModDur = 5.00 / 1.08 = 4.630. The estimate is -4.630 × 0.0025 = -0.01157, or about -1.16%.
Exercise
A semiannual-pay bond has a Macaulay duration of 6.00 years and a YTM of 5% (annual rate, compounded semiannually). What is its modified duration, and why does a duration-only estimate overstate the price decline when yields rise?
Show answer
ModDur = 6.00 / (1 + 0.05/2) = 6.00 / 1.025 = 5.854. The estimate overstates the decline because the price-yield curve is convex. The curve lies above its tangent line, which is what modified duration measures, so the true price falls by less than the straight-line estimate.