Finance & Economics · Fixed Income · Fixed Income
Convexity Calculator
Calculates the convexity of a bond to measure the curvature of the price-yield relationship, improving duration-based price change estimates.
Calculator
Formula
P is the current bond price, y is the yield per period (e.g. semi-annual yield if coupons are semi-annual), C_t is the cash flow (coupon or principal) at time t, n is the total number of periods, and t is the time period index. The result is convexity in units of periods squared; divide by the square of periods per year to express it in years squared.
Source: Fabozzi, F.J. — Fixed Income Mathematics, 4th Edition (McGraw-Hill, 2006), Chapter 4.
How it works
Duration gives a linear approximation of how a bond's price changes when interest rates move. However, the true price-yield relationship is curved — not straight — and that curvature is measured by convexity. When yield changes are large, the linear duration estimate becomes materially inaccurate, and convexity provides a vital correction term. The fuller price change approximation is: ΔP ≈ −D_mod × ΔY × P + ½ × Convexity × (ΔY)² × P, where the second term captures the curvature effect. Bonds with higher convexity benefit more when yields fall and lose less when yields rise.
The formula for convexity is computed by summing each cash flow C_t multiplied by t(t+1), discounted at the periodic yield (1+y)^t, then dividing the entire sum by P × (1+y)². This gives convexity in period-squared units. To convert to year-squared units — the standard market convention — the result is divided by m², where m is the number of coupon periods per year. Modified duration is calculated as the Macaulay duration (the present-value-weighted average time to cash flow) divided by (1 + y/m), providing the first-order sensitivity in years.
Practitioners use convexity in bond portfolio immunisation, liability-driven investing (LDI), and relative value analysis. A portfolio with higher convexity for the same duration is generally preferable because it outperforms in both rising and falling rate environments. Mortgage-backed securities often exhibit negative convexity due to prepayment risk, making convexity analysis even more critical in those markets. Central banks, pension funds, insurance companies, and proprietary trading desks all rely on convexity metrics when constructing and stress-testing fixed income portfolios.
Worked example
Consider a bond with the following characteristics: Face Value = $1,000, Annual Coupon Rate = 6%, YTM = 5%, Years to Maturity = 10, and Semi-Annual coupon payments (m = 2).
Step 1 — Determine periodic inputs: The semi-annual coupon payment is $1,000 × 6% / 2 = $30. The semi-annual yield is 5% / 2 = 2.5%. The total number of periods is 10 × 2 = 20.
Step 2 — Calculate bond price: Discount each $30 coupon for periods 1 through 20, plus the $1,000 principal at period 20. The resulting bond price is approximately $1,077.95 (the bond trades at a premium because the coupon rate exceeds the yield).
Step 3 — Compute convexity in periods²: For each period t from 1 to 20, compute C_t × t × (t+1) / (1.025)^t. Sum these values and divide by P × (1.025)² ≈ $1,077.95 × 1.050625. This yields a period-squared convexity of approximately 261.8.
Step 4 — Convert to years²: Divide by m² = 4 to get approximately 65.45 years². This is the market-standard convexity figure.
Step 5 — Modified Duration: The Macaulay duration works out to roughly 7.80 years, giving a modified duration of approximately 7.61 years.
Step 6 — Estimate price change for a +100 bps yield shock: ΔP ≈ −7.61 × 0.01 × $1,077.95 + 0.5 × 65.45 × (0.01)² × $1,077.95 ≈ −$82.04 + $3.53 ≈ −$78.51. The convexity correction adds back $3.53, showing it materially reduces the estimated price loss.
Limitations & notes
This calculator assumes a flat yield curve — the same yield applies to all cash flows regardless of maturity. In practice, yield curves are rarely flat, and a full term-structure model would discount each cash flow at its own spot rate. The convexity figure produced here is therefore an approximation that works best for parallel yield-curve shifts. Additionally, this calculator handles only plain-vanilla fixed-rate bonds: it does not account for embedded options (callable bonds, putable bonds), floating-rate coupons, inflation linkage, step-up coupons, or mortgage prepayment risk. Bonds with embedded options can exhibit negative convexity in certain rate environments, which requires option-adjusted spread (OAS) and option-adjusted convexity methods. The price-change estimate using duration and convexity remains a second-order Taylor approximation and may still be inaccurate for very large yield movements (e.g., 200–300+ bps). Day-count conventions, settlement lags, and accrued interest are also not modelled here; for exact pricing, dedicated bond analytics systems should be used.
Frequently asked questions
What does bond convexity actually measure?
Bond convexity measures the rate of change of duration as yields change — in other words, it quantifies the curvature of the price-yield relationship. A higher convexity means the bond's price rises more when yields fall and drops less when yields rise, compared to a bond with lower convexity but the same duration. It is expressed in units of years squared.
Why is convexity important for bond investors?
Duration alone gives a linear estimate of price sensitivity to yield changes, which becomes increasingly inaccurate for larger yield moves. Convexity provides the second-order correction that significantly improves the price change estimate. For large yield shocks (50 bps or more), ignoring convexity can lead to materially mispriced hedges and under- or over-estimated portfolio risk.
What is the difference between Macaulay duration, modified duration, and convexity?
Macaulay duration is the present-value-weighted average time to receive a bond's cash flows, measured in years. Modified duration adjusts it by (1 + y/m) to give the first-order percentage price sensitivity per unit yield change. Convexity is the second derivative of price with respect to yield (divided by price), capturing the curvature that modified duration misses.
What is negative convexity and which bonds exhibit it?
Negative convexity occurs when a bond's price rises less than duration predicts as yields fall, and falls more than duration predicts as yields rise. It is most common in callable bonds — where the issuer can redeem at a fixed price, capping price appreciation — and in mortgage-backed securities, where borrowers prepay faster when rates drop. Our calculator applies to plain-vanilla bonds only and will always produce positive convexity.
How do I use convexity to estimate bond price changes?
Use the approximation: ΔP ≈ (−Modified Duration × ΔY + 0.5 × Convexity × ΔY²) × P, where ΔY is the change in yield expressed as a decimal (e.g., 0.01 for 100 bps). The first term is the duration effect and the second is the convexity correction. For a 100 bps increase in yield, a bond with convexity of 65 years² would have its estimated price loss reduced by roughly 0.5 × 65 × 0.0001 = 0.33% relative to the duration-only estimate.
Last updated: 2025-01-15 · Formula verified against primary sources.