Modified Duration

In this lecture we calculate the convexity for an annual-paying bond.

We do it first by building up an Excel grid, showing how each element of convexity is calculated.

Because Excel (rather strangely) does not have its own built-in CONVEXITY function (similar to DURATION or MDURATION), we also cover how to build your own personal convexity function within Excel’s VBA development environment.

The code for that demonstration function, for you to copy and paste, can be found below:

Public Function AndysAnnualConvexity(dYTM As Double, _
                                     dCouponRate As Double, _
                                     iBondMaturity As Integer, _
                                     dFaceValue As Double) As Double
Dim dConvexity As Double
Dim dAnnualPayment As Double
Dim dPresentValue As Double
Dim dTotalPVs As Double
Dim dTotalConvexity As Double

dConvexity = 0
dAnnualPayment = 0
dPresentValue = 0
dTotalPVs = 0
dTotalConvexity = 0

Dim dCouponPayment As Double

dCouponPayment = dCouponRate * dFaceValue

Dim dYearCounter As Double

dYearCounter = 1

Do While dYearCounter <= iBondMaturity

    dAnnualPayment = dCouponPayment
    
    If dYearCounter = iBondMaturity Then
    
        dAnnualPayment = dAnnualPayment + dFaceValue
        
    End If
    
    dPresentValue = dAnnualPayment / _
                    (Application.WorksheetFunction.Power(1 + dYTM, dYearCounter))
    
    dTotalPVs = dTotalPVs + dPresentValue
    
    dConvexity = (1 / (Application.WorksheetFunction.Power(1 + dYTM, 2))) * _
                 (dPresentValue) * _
                 (Application.WorksheetFunction.Power(dYearCounter, 2) + dYearCounter)
                 
    dTotalConvexity = dTotalConvexity + dConvexity
    
    dYearCounter = dYearCounter + 1
    
Loop

AndysAnnualConvexity = (dTotalConvexity / dTotalPVs)

End Function

In our next lecture, we will implement convexity to predict future bond prices.

The full YouTube playlist of Securities Investment 101 lecture videos can be found by clicking here.

Please read our disclaimer.

{ 0 comments }

In a non-mathematical way, and before our next lecture on actually calculating convexity, we try to explain why convexity has to be taken into account, particularly for large interest rate moves in either direction.

At the limit, interest rates moving down have a proportionally larger and larger effect on bond prices. Similarly, interest rates moving up have a proportionally smaller and smaller effect on bond prices.

Taken together at the limit of infinitely small interest rate moves, these two effects create convexity in the bond price, when measured against changing interest rates.

The flat-sloped tangential line of Modified Duration will then tend to underestimate price moves up, when interest rates move down, and will tend to overestimate price moves down, when interest rates move up.

This is the calculus principle behind convexity.

In our next lecture, we will actually calculate convexity.

The full YouTube playlist of Securities Investment 101 lecture videos can be found by clicking here.

Please read our disclaimer.

{ 0 comments }

Modified Duration, Lecture 023, Securities Investment 101

December 5, 2013

We conclude our lectures on ‘Duration’, before we move on to ‘Convexity’, with an explanation of ‘Modified Duration’ and its importance in predicting how individual bond prices will change on specific interest rate changes. In passing, we cover the ‘MDURATION’ Excel function, and also dabble a little in different coupon payment frequencies, such as Annual, […]

Read the full article →