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.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Bond Valuation and Analysis in Python
अभ्यास निर्देश
- Find the convexity adjustment for a 10 year zero coupon bond and print the result.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# 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: ", ____)