Bond convexity

Convexity is the sensitivity measure of the duration of a bond to yield changes. Think of convexity as the second derivative of the relationship between the price and yield:

Bond convexity

Bond traders use convexity as a risk management tool to measure the amount of market risk in their portfolio. Higher convexity portfolios are less affected by interest rate volatilities than lower convexity portfolio, given the same bond duration and yield. As such, higher convexity bonds are more expensive than lower convexity ones, everything else being equal.

The implementation of a bond convexity is given as follows:

""" Calculate convexity of a bond """
from bond_ytm import bond_ytm
from bond_price import bond_price


def bond_convexity(price, par, T, coup, freq, dy=0.01):
    ytm = bond_ytm(price, par, T, coup, freq)

    ytm_minus = ytm - dy    
    price_minus = bond_price(par, T, ytm_minus, coup, freq)
    
    ytm_plus = ytm + dy
    price_plus = bond_price(par, T, ytm_plus, coup, freq)
    
    convexity = (price_minus+price_plus-2*price)/(price*dy**2)
    return convexity

We can now find the convexity of the 5.75 percent bond discussed earlier that will mature in 1.5 years with a par value of 100 and a bond price of 95.0428:

>>> from bond_convexity import bond_convexity
>>> print bond_convexity(95.0428, 100, 1.5, 5.75, 2)
2.63395939033

The convexity of the bond is 2.63. For two bonds with the same par value, coupon, and maturity, their convexity may be different, depending on its location on the yield curve. Higher convexity bonds will exhibit higher price changes for the same change in yield.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.174.253