Sub topic 17
Convexity: The Curvature of the Price-Yield Curve
This chapter assumes you can price a bond as a present value. It also assumes you know Macaulay, modified, and effective duration, and the first-order estimate ΔP/P ≈ −ModDur × Δy. Convexity corrects that estimate for the curvature that duration ignores.
Why duration alone is not enough
Modified duration is the slope of the price-yield curve at the current yield. A slope is a straight-line approximation, and the price-yield curve is not a straight line. It bends, and it bends upward, so it is convex to the origin.
For a large yield change, the tangent line drawn from duration lies below the true curve on both sides. That has two consequences:
- When yields fall, duration underestimates the price gain.
- When yields rise, duration overestimates the price loss.
Convexity measures how much the curve bends away from the tangent. Mathematically, it is the second derivative of price with respect to yield, divided by price.
Computing convexity
For a bond with cash flows CF at periods t = 1 … n and a periodic yield y, the analytical formula is:
Convexity = Σ [ t(t+1) × CF_t / (1+y)^(t+2) ] / (P × m²)
Here P is the bond price and m is the number of periods per year. The m² divisor converts convexity from periods squared to years squared, so it matches an annualized yield change.
Convexity is also estimated by repricing the bond. This approximate (effective) convexity needs only three prices: the current price V₀, the price V₋ after yields fall by Δy, and the price V₊ after yields rise by Δy:
Effective convexity = (V₋ + V₊ − 2V₀) / (V₀ × Δy²)
Effective convexity works for bonds with embedded options, where cash flows change with rates and the analytical formula does not apply.
Worked example: a 3-year 5% annual-pay bond
Consider a 3-year, 5% annual-coupon bond priced at a 4% yield. The code below computes its price, durations, and convexity, then compares estimates against exact repricing.
def bond_price(face, coupon_rate, ytm, years, freq=1):
n = int(years * freq)
c = face * coupon_rate / freq
y = ytm / freq
return sum(c / (1 + y) ** t for t in range(1, n + 1)) + face / (1 + y) ** n
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
def approx_pct_change(modified, convexity, dy):
return -modified * dy + 0.5 * convexity * dy ** 2
price, mac, mod, conv = risk_measures(100, 0.05, 0.04, 3)
print(round(price, 4), round(mac, 4), round(mod, 4), round(conv, 4))
for dy in (0.01, -0.01):
duration_only = -mod * dy
with_convexity = approx_pct_change(mod, conv, dy)
actual = bond_price(100, 0.05, 0.04 + dy, 3) / price - 1
print(dy, round(duration_only, 5), round(with_convexity, 5), round(actual, 5))The first line prints a price near 102.775, Macaulay duration near 2.861, modified duration near 2.751, and convexity near 10.41. The comparison for a ±100 bp move is:
| Yield change | Duration only | Duration + convexity | Actual change |
|---|---|---|---|
| +1.00% | −2.751% | −2.699% | −2.700% |
| −1.00% | +2.751% | +2.803% | +2.804% |
Duration alone is symmetric: it gives the same size of price change for a rise and a fall. The true changes are not symmetric. The gain from a fall is larger than the loss from an equal rise. The convexity term, 0.5 × 10.41 × 0.01² ≈ 0.052%, is positive in both directions, so it raises the estimate when yields fall and shrinks the loss when they rise.
What drives convexity
Convexity behaves much like duration, with some differences:
- Maturity: Longer maturity means higher convexity. Convexity grows faster than duration as maturity lengthens, roughly with the square of the time to cash flows.
- Coupon: Lower coupon means higher convexity for the same maturity. A zero-coupon bond has the highest convexity for its maturity.
- Yield level: Lower yield means higher convexity. The curve is steeper and more curved at low yields.
- Cash flow dispersion: For equal duration, a bond whose cash flows are spread widely (such as a barbell of short and long payments) has higher convexity than one whose cash flows are bunched (a bullet).
For an annual-pay zero-coupon bond, convexity is n(n+1)/(1+y)². A 10-year zero at 5% has convexity of about 110/1.1025 ≈ 99.8, which is much higher than the 10.4 above.
Positive and negative convexity
An option-free bond always has positive convexity. The price-yield curve bends upward, and investors benefit from the asymmetry. All else equal, investors prefer higher convexity, so the market charges a higher price for it. That means a higher-convexity bond is priced richer, with a lower yield, than a lower-convexity bond with the same duration.
Embedded options change the picture:
- Callable bonds: When yields fall, the issuer is likely to call the bond, so the price rises less than it otherwise would. The price is capped near the call price. At low yields the curve flattens and bends downward, giving negative convexity. At high yields, where the call is unlikely, it is still positively convex.
- Putable bonds: The put floors the price when yields rise. A putable bond has convexity at least as high as the equivalent option-free bond.
- Mortgage-backed securities: Prepayments speed up when yields fall, shortening the cash flows and producing negative convexity.
A callable bond's effective duration also shortens as yields fall, which is the same effect seen as a change in the slope.
Effective convexity for bonds with options
Use the repricing formula whenever cash flows depend on the yield path. Prices come from a model that accounts for the option, and only the benchmark curve is shifted.
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_convexity
# A callable bond: the price gain from a fall is smaller than the loss from a rise
print(effective_measures(100.0, 101.5, 97.5, 0.01))This prints an effective duration of 2.0 and an effective convexity of −100.0. The negative convexity shows because the up-move loses 2.5 points while the down-move gains only 1.5.
Common errors
- Forgetting the one-half. The second-order term is ½ × convexity × Δy², not convexity × Δy².
- Mixing units. Enter Δy as a decimal (0.01), not as a percentage (1), in both terms.
- Using the wrong sign on the duration term. It is negative: yields up, price down. The convexity term is positive for option-free bonds.
- Using analytical convexity on an option bond. Use effective convexity.
- Not annualizing. For semiannual bonds, divide by m² (4 for semiannual pay) so convexity matches an annual yield change.
Exercise
A bond has modified duration of 7.0 and convexity of 60. Yields rise by 50 bp. Estimate the percentage price change using duration alone, then using duration plus convexity.
Show answer
Duration alone: −7.0 × 0.005 = −3.500%. Convexity adjustment: 0.5 × 60 × 0.005² = 0.00075 = +0.075%. Combined estimate: −3.500% + 0.075% = −3.425%.
Exercise
A callable bond is priced at 100 at its current yield. If yields fall by 100 bp, its price becomes 102; if yields rise by 100 bp, its price becomes 94. Compute its effective duration and effective convexity, and say what the sign of the convexity indicates.
Show answer
Effective duration = (102 − 94) / (2 × 100 × 0.01) = 4.0. Effective convexity = (102 + 94 − 200) / (100 × 0.01²) = −4 / 0.01 = −400. The negative sign means the bond has negative convexity: the price rises by less (2) than it falls (6) for a yield move of the same size, as the issuer's call option caps the price gain.