Bond Risk Measures and Immunization › Modified Duration
Quantitative FinanceAll chapters Bond Risk Measures and Immunization › Modified DurationOne section · Sections in this chapter4 / 13 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
While Macaulay duration measures weighted-average time, we need a measure that directly quantifies price sensitivity. Practitioners and risk managers care about when cash flows arrive and how much a bond's price will change when interest rates move. Modified duration provides this essential link between the time-weighted concept of Macaulay duration and the practical concern of price volatility.
Modified duration measures the percentage change in bond price for a one percentage point change in yield. It equals Macaulay duration divided by , where is the compounding frequency.
The derivation of modified duration comes from calculus, specifically from examining how the bond price function responds to small changes in yield. This mathematical derivation reveals that the connection between time-weighted cash flows and price sensitivity is not accidental. Rather, it emerges naturally from the structure of the present value formula.
Starting with the bond price formula,
Taking the derivative with respect to yield ,
This derivative is the dollar price sensitivity per unit change in decimal yield; multiply it by a small yield change to approximate the dollar price change. To express this in percentage terms, we divide both sides by the price :
where the last step recognizes that is exactly the definition of Macaulay duration.
The derivation above differentiates with respect to a per-period yield, so its duration is in periods. For nominal annual yield compounded times per year, differentiating introduces . With now in years, this gives modified duration with respect to the quoted annual decimal yield:
where:
- : modified duration
- : Macaulay duration
- : the annual yield to maturity
- : the number of compounding periods per year (e.g., for semi-annual)
The negative sign in the derivative confirms the inverse relationship between price and yield. Modified duration is expressed as a positive number with the understanding that price and yield move in opposite directions. When we use modified duration to estimate price changes, we explicitly include the negative sign.
The price change approximation using modified duration is:
or equivalently:
where:
- : the change in bond price
- : the current bond price
- : modified duration
- : the change in yield (expressed as a decimal, e.g., 0.01 for a 1% change)
The negative sign confirms that price and yield move in opposite directions: when yields rise (), prices fall (). This approximation is essentially a first-order Taylor expansion of the price function around the current yield. It uses the slope of the price-yield curve at the current point to estimate prices at nearby yields.
def modified_duration(
face_value, coupon_rate, years_to_maturity, yield_rate, frequency=2
):
"""Calculate modified duration of a bond."""
mac_dur = macaulay_duration(
face_value, coupon_rate, years_to_maturity, yield_rate, frequency
)
return mac_dur / (1 + yield_rate / frequency)# Calculate both durations for our 10-year, 5% coupon bond
face_value = 1000
coupon_rate = 0.05
maturity = 10
yield_rate = 0.05
mac_dur = macaulay_duration(face_value, coupon_rate, maturity, yield_rate)
mod_dur = modified_duration(face_value, coupon_rate, maturity, yield_rate)
price = bond_price(face_value, coupon_rate, maturity, yield_rate)
print("Bond: 10-year, 5% coupon at 5% yield")
print(f"Price: ${price:.2f}")
print(f"Macaulay Duration: {mac_dur:.4f} years")
print(f"Modified Duration: {mod_dur:.4f}")Bond: 10-year, 5% coupon at 5% yield Price: $1000.00 Macaulay Duration: 7.9894 years Modified Duration: 7.7946
The modified duration of 7.79 tells us that for each 1% (100 basis point) increase in yield, we expect the bond price to decrease by approximately 7.79%. Since the bond is priced at par ($1,000), this translates to roughly a $77.90 price change per 100 basis points of yield movement. This gives portfolio managers a quick way to assess interest rate exposure: multiply the modified duration by the expected yield change to estimate the percentage price impact.
Testing the Duration Approximation
We can verify that modified duration provides a reasonable approximation for small yield changes:
# Test duration approximation for various yield changes
yield_changes = [-0.02, -0.01, -0.005, 0.005, 0.01, 0.02]
print("Duration Approximation vs. Actual Price Change")
print("=" * 70)
print(f"{'Yield Change':>12} {'Actual Price':>14} {'Approx Price':>14} {'Error':>12}")
print("-" * 70)
for dy in yield_changes:
new_yield = yield_rate + dy
actual_price = bond_price(face_value, coupon_rate, maturity, new_yield)
# Duration approximation
approx_change = -mod_dur * price * dy
approx_price = price + approx_change
error = (approx_price - actual_price) / actual_price * 100
print(
f"{dy * 100:>+12.1f}% {actual_price:>14.2f} {approx_price:>14.2f} {error:>+12.3f}%"
)Duration Approximation vs. Actual Price Change
======================================================================
Yield Change Actual Price Approx Price Error
----------------------------------------------------------------------
-2.0% 1171.69 1155.89 -1.348%
-1.0% 1081.76 1077.95 -0.352%
-0.5% 1039.91 1038.97 -0.090%
+0.5% 961.93 961.03 -0.094%
+1.0% 925.61 922.05 -0.384%
+2.0% 857.88 844.11 -1.605%The approximation works well for small changes but introduces noticeable error for larger movements. This error arises because duration is a linear approximation of a curved (convex) relationship. When we use duration alone, we are essentially drawing a tangent line to the price-yield curve at the current point and using that straight line to estimate prices at other yields.
For a 2% yield increase, duration underestimates the new price and overstates the bond's loss. For a 2% yield decrease, it understates the bond's price gain. This systematic pattern motivates the need for convexity. The actual price is always higher than the linear approximation, regardless of whether rates rise or fall.