CommencerCommencer gratuitement

Convexity adjustment

Finding the convexity adjustment of a bond is the next step in using both duration and convexity to predict changes in bond prices. In this exercise, you are going to calculate the convexity adjustment for a 10 year zero coupon bond with a yield of 5% and face value of USD 100.

Recall that the formula for the convexity adjustment is given by:

\( Convexity \ Adjustment = 0.5 \times \ Dollar \ Convexity \times 100^2 \times (\Delta y)^2\)

numpy_financial has already been imported for you as npf.

Cet exercice fait partie du cours

Bond Valuation and Analysis in Python

Afficher le cours

Instructions

  • Find the convexity adjustment for a 10 year zero coupon bond and print the result.

Exercice interactif pratique

Essayez cet exercice en complétant cet exemple de code.

# Find price of 10 year zero coupon bond with a 5% yield, shift yields, and reprice
price = ____
price_up = ____
price_down = ____

# Calculate convexity and dollar convexity of the bond
convexity = ____
dollar_convexity = ____

# Find the convexity adjustment and print the result
convexity_adjustment = ____
print("Convexity adjustment: ", ____)
Modifier et exécuter le code