The Mathematical Framework Behind Bond Duration
The calculator uses Macaulay Duration -- the weighted average time until a bond's cash flows are received, where each cash flow is weighted by its present value relative to the bond's total price.
Coupon payment per period:
coupon payment = (face value x annual coupon rate) / frequency
For a $1,000 bond at 5% paid semi-annually: $1,000 x 0.05 / 2 = $25.
Bond price (sum of discounted cash flows):
bond price = SUM(coupon / (1 + YTM/freq)^t) + face value / (1 + YTM/freq)^(years x freq)
Macaulay Duration:
duration = SUM((t/freq) x PV(cash flow_t)) / bond price
Modified Duration adjusts for compounding:
modified duration = macaulay duration / (1 + YTM/freq)
Convexity captures the curvature of the price-yield relationship:
convexity = SUM(t x (t+1) x PV(cash flow_t) / (1 + YTM/freq)^2) / (bond price x freq^2)
Worked Example: 10-Year Bond at 6% YTM
Consider a $1,000 bond with a 5% coupon, semi-annual payments, 10 years to maturity, and a 6% YTM:
| Metric | Value |
|---|---|
| Bond Price | $925.61 |
| Macaulay Duration | 7.89 yrs |
| Modified Duration | 7.6650 |
| Convexity | 71.79 |
| DV01 | $0.7095 |
The bond trades at a $74.39 discount to face value because the 5% coupon is below the 6% market yield. Its duration of 7.89 years (vs. 8.08 at 4% YTM) is shorter because the higher discount rate reduces the present-value weight of distant cash flows.
When Duration Gives Misleading Results
Callable bonds: Standard Macaulay or Modified Duration assumes cash flows are fixed. A callable bond may be redeemed early if rates fall, so its actual duration is shorter than calculated. Use effective duration (which models the option) for callable bonds.
Large rate moves: Duration is a first-order approximation -- accurate for small yield changes but overestimates price drops (and underestimates price gains) for shifts above ~50 bps. Convexity corrects this. For the default bond, a 1% rate rise predicts a ~7.92% decline via duration alone, but the actual price drops from $1,081.76 to $1,000.00 (-7.56%), because convexity cushions the fall.
Floating-rate and very short bonds: Instruments that reset to market rates quickly have durations near zero. Duration analysis adds little value here; credit quality and liquidity matter more.
