LoslegenKostenlos loslegen

Calculate approximate convexity for a bond

Recall from the video that we can improve the estimate of the bond price by adding a convexity term to the duration effect. The convexity term accounts for how bowed the price/YTM curve is for the bond.

In this exercise, you will calculate the approximate convexity for a bond with $100 par value, 10% coupon, 20 years to maturity, and 10% yield to maturity when you expect a 1% change in yield and add that to the duration effect. Recall that the approximate convexity formula is

$$(P(up) + P(down) - 2 * P) / (P * \Delta y ^ 2)$$

where \(P\) is the price of the bond, \(P(up)\) is the price of the bond when yields increase, \(P(down)\) is the price of the bond when yields decrease, and \(\Delta y\) is the expected change in yield.

The objects px, px_up, and px_down from the earlier exercise are preloaded in your workspace.

Diese Übung ist Teil des Kurses

Bond Valuation and Analysis in R

Kurs anzeigen

Anleitung zur Übung

  • Calculate approximate convexity by incorporating the px, px_up, and px_down objects into the formula listed above. You will also need to input an appropriate value for dy.

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Calculate approximate convexity
convexity <- (___ + ___ - 2 * ___) / (___ * (___)^2)
convexity
Code bearbeiten und ausführen