Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 37

Convexity: Second Derivative of Price-Yield

Recommended resources

Introduction

In our previous lesson, we established that Modified Duration, while a powerful measure of interest rate sensitivity, provides only a linear approximation of a bond's price change. We saw that for any significant change in yield, this first-order approximation systematically underestimates the bond's true price due to the inherent curvature of the price-yield relationship.

This lesson directly addresses that curvature. We will formally define Convexity, the measure that quantifies this non-linear relationship. Leveraging your background in calculus, we will derive Convexity as the second derivative of the price-yield function. This will give us the second-order term from the Taylor series expansion we discussed, laying the mathematical groundwork for a much more accurate risk model.


What is Convexity? The Intuition of Curvature

In the last lesson, we identified an "approximation error" when using duration. This error is not random; it is the direct result of the price-yield function's curvature. Convexity is the name we give to this curvature.

Bond Price versus Yield to Maturity with Duration Approximation and Convexity Error
This graph illustrates the non-linear relationship between a bond's price and its yield. The duration approximation is a tangent line, and the "Duration Error Region" represents the error this linear model introduces. This error is precisely what convexity helps us quantify and correct.

As the image shows, a bond's price doesn't fall or rise in a straight line as yields change; it follows a curve. Convexity is a measure of how much it curves. A bond with higher convexity will have a more pronounced curve, meaning the linear approximation from duration will be less accurate for a given change in yield.


Formal Definition: The Second Derivative

To move from intuition to a formal definition, we return to the Taylor series expansion of the bond price function around an initial yield :

In our last lesson, we focused on the first-order term involving . Now, we focus on the second-order term.

We define Dollar Convexity as the second derivative of the price function with respect to yield. It measures the change in the slope of the price-yield curve in dollar terms.

Just as we scaled dollar duration by price to get Modified Duration, we scale Dollar Convexity by price to get a standardized, percentage-based measure. This is simply called Convexity (or sometimes Effective Convexity).

The following reading provides a concise summary of these concepts, linking the Taylor series directly to the definitions of Dollar Convexity and the scaled Convexity measure.

Convexity

These lecture slides by Professor Carpenter of NYU Stern offer a clear, step-by-step introduction to the concept of convexity.

Please read through the first few slides to solidify the definitions: Slide 2 ("Convexity"): Note the definition of convexity as a measure of curvature and its relationship to the second derivative. Slide 3 ("Taylor Series"): Review the Taylor series approximation formula presented. Slide 4 ("Dollar Convexity"): See the formal definition of Dollar Convexity as the second derivative of the price function. Slide 5 ("Convexity"): Understand the motivation for the scaled (and more common) Convexity measure.


Deriving the Convexity Formula

Now for the core task: deriving the analytical formula for convexity. This requires taking the second derivative of the bond pricing formula. Given your background, this process of applying basic differentiation rules to a financial formula should be straightforward.

Let's start with the price of a bond that pays annual coupons:

Step 1: First Derivative (Recap)

In our lesson on duration, we found the first derivative of price with respect to yield:

Step 2: Second Derivative

To find the Dollar Convexity, we differentiate again with respect to . Applying the power rule to each term in the summation gives:

This is the formula for Dollar Convexity for a bond with annual coupons.

Step 3: Final Convexity Formula

To get the final formula for Convexity, we simply divide by the bond's price, :

The following resource provides a formal derivation in its appendix. Reviewing this will confirm our work and show how it's presented in financial literature.

Relative Impact of Duration and Convexity

This paper by Brooks and Livingston provides the mathematical formulas and their derivations.

First, look at Section II, "Duration and Convexity" to see the final formula for the second derivative (equation 5). Then, turn to Appendix A. Follow the derivation from equation (A-1) through to (A-4). This shows the step-by-step differentiation that yields the formula for the second derivative, just as we performed above.


Generalizing for Coupon Frequency

In practice, bonds usually pay semi-annual or quarterly coupons. We must adjust our formula for a coupon frequency of times per year. This involves careful application of the chain rule.

The price formula becomes:

Let , , and . The derivatives are with respect to , not . Using the chain rule, .

The second derivative is then:

Applying the same differentiation we did earlier, but this time to the price function expressed in terms of , , and , gives us the general formula for Dollar Convexity:

And the corresponding scaled Convexity is simply times this value. This generalized formula is what you will implement in code.


Conclusion

In this lesson, we have formally defined and derived the formula for bond convexity. We have moved from an intuitive understanding of curvature to a precise mathematical tool grounded in calculus.

Key Takeaways:

  • Convexity is a measure of the curvature in the price-yield relationship of a bond.
  • It is formally defined as the second derivative of the price function with respect to yield, scaled by the price: .
  • The positive convexity of a standard bond means that a duration-only model will always underestimate the bond's price, regardless of whether yields rise or fall.
  • We derived the analytical formula for convexity, which can be calculated directly from a bond's cash flow structure and yield.

Now that we have derived the formulas for both first-order (Modified Duration) and second-order (Convexity) risk, we are ready to combine them. In the next lesson, we will construct a second-order price approximation model using both duration and convexity. We will then implement this in Python and empirically demonstrate its superior accuracy compared to the linear model.