Skip to content
All library documents

Correct Bond Convexity Derivatives with the Chain Rule

Article Quant Q&A · Author: AK88

Summary

The note derives bond price sensitivity to yield for a bond with semiannual coupons and corrects a missing chain-rule factor. Differentiating the discounted cash-flow formula with respect to yield introduces a factor of one half in the first derivative and one quarter in the second derivative. The corrected second derivative is the bond’s convexity under the stated yield convention.

The answer generalizes the scaling to a bond paying coupons multiple times per year, using the payment frequency in place of the semiannual factor. The evidence is an algebraic correction to the proposed formulas; no numerical example or independent comparison is supplied. The result depends on the price formula’s assumptions, including a single yield applied consistently to cash flows and time measured in years. Readers should check conventions before comparing values from different references, since convexity definitions may include normalization by price or other scaling.

Key ideas

  • Differentiating yield through the periodic discount factor requires the chain rule.
  • For semiannual coupons, the first derivative includes a factor of one half and the second includes one quarter.
  • For payment frequency f, the corresponding second-derivative scaling is by the square of f.
  • Convexity formulas should be compared only after aligning yield and normalization conventions.

Tags

Full text
# Derivation of convexity formula


# Derivation of convexity formula












Let's say that I have a bond that pays coupon on a semi-annual basis. Therefore, the price of this bond can be calculated using the following formula:

$$ P = \sum_{i=1}^N \frac{CF_i}{(1 + YTM/2)^{2t_i}} $$

First derivative of the above is:

$$ \frac{\partial P}{\partial YTM} = \frac{1}{(1 + YTM/2)} \sum_{i=1}^N \frac{-2t_iCF_i}{(1 + YTM/2)^{2t_i}} $$

Second derivative (aka convexity) of the Price function is:

$$ \frac{\partial^2 P}{\partial YTM} = \frac{1}{(1 + YTM/2)^2} \sum_{i=1}^N \frac{({4t_i}^2+2t_i)CF_i}{(1 + YTM/2)^{2t_i}} $$

And the generalized form of the convexity formula for bonds that pay multiple coupons per year is:

$$ \frac{\partial^2 P}{\partial YTM} = \frac{1}{(1 + YTM/f)^2} \sum_{i=1}^N \frac{({(ft_i)}^2+ft_i)CF_i/f}{(1 + YTM/f)^{ft_i}} $$

I am getting slightly different results when I compare my results with Bionic Turtle. Is there any mistake in my derivation?

Thank you!

## Answer by gdlamp (score 3, accepted)

https://quant.stackexchange.com/a/37372

You have left out the chain rule term in the first derivative and second derivative.

First derivative should be: $$\frac{\partial P}{\partial YTM} = \frac{1}{2(1+YTM/2)} \sum_{i=1}^N \frac{-2 t_i CF_i}{(1+YTM/2)^{2 t_i}} $$

Second derivative should be: $$\frac{\partial^2 P}{\partial YTM^2} = \frac{1}{4(1+YTM/2)^2} \sum_{i=1}^N \frac{(4 t_i^2 + 2t_i) CF_i}{(1+YTM/2)^{2 t_i}} $$

With the "f" instead of "2": $$\frac{\partial^2 P}{\partial YTM^2} = \frac{1}{f^2(1+YTM/f)^2} \sum_{i=1}^N \frac{(( f t_i)^2 + f t_i) \cdot CF_i}{(1+YTM/f)^{f t_i}} $$

Hope this helps!

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.