Exercise

Finding the convexity of a bond

Calculating the convexity of a bond is an important step in predicting bond price changes and measuring the interest rate risk of a portfolio in a more comprehensive way.

In this exercise, you are going to find the convexity of a 20 year bond that pays a 6% annual coupon, has a yield to maturity of 5%, and face value of USD 100.

Recall that the formula for convexity is given by:

\( Convexity = \frac{ P(down) \ + \ P(up) \ - \ 2 \times P }{P \ \times \ (\Delta y)^2} \)

numpy_financial has already been imported for you as npf.

Instructions

100 XP
  • Find the price of a 20 year bond with 6% coupon and 5% yield
  • Find the price of the same bond for a 1% higher and 1% lower level of yields.
  • Find the convexity of the bond and print the result.