Finance Training

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 }

Calculating Duration, Lecture 021, Securities Investment 101

November 25, 2013

Before we delve deeper into the mysteries of duration and convexity, now is a good opportunity to actually calculate duration, at least in its form as an average weighted cashflow period, known as Macaulay’s Duration. We do this both the long way, from first principles, and by using Excel’s built-in ‘DURATION’ command. Previous video, Securities […]

Read the full article →