Duration

Duration of a Bond

Investors in Fixed Income instruments are generally concerned with credit risk. For Sovereign debt in good standing - credit risk is not always key. In principle, governments can monetize debt if needs be. Interest rate risk may provide a more useful prism for investigating fixed income portfolios. Bond prices and interest rates move in opposite directions. Factors that affect interest rates like inflation may be more salient or inflation targeting strategies enunciated by government officials. From the previous page, we observed that when interest rates fall, the value of fixed income investments rises, and when interest rates go up, bond prices fall in value. The impact of interest rate changes on bonds can be gauged by using duration. Below, we set out a VBA function for estimating duration. This is accomplished by introducing a loop into the VBA code we used previously to estimate the value of a bond.

VBA Code

' PV of Bond using Loop

Function PVBmloop(cpr, r, T, Face, m)

coup = Face * cpr / m

Price = 0

For i = 1 To m * T

Price = coup * (1 + r / m) ^ (-i) + Price

Next i

PVBmloop = Price + Face * (1 + r / m) ^ (-m * T)

End Function

' Duration

Function PVBmDur(cpr, r, T, Face, m)

coup = Face * cpr / m

Price = Face * (1 + r / m) ^ (-m * T)

Dur = Face * T * (1 + r / m) ^ (-m * T)

For i = 1 To m * T

Price = coup * (1 + r / m) ^ (-i) + Price

Next i

For i = 1 To m * T

Dur = coup * (i / m) * (1 + r / m) ^ (-i) + Dur

Next i

PVBmDur = Dur / Price

End Function

Interpreting the Bond Duration and what it means

In the video below, we use the duration estimation to approximate the effect of a change of Yield (or Interest rate) on the value of the Bond. Duration only offers an approximation and in this sense is limited. The true change and duration predicted change in Bond Price will differ and less accuracy results as the magnitude of the interest rate change increases.

C++ Code for Duration

Below we present an alternative approach for estimating Duration. That is we back out or reverse engineer the Duration measure. See image above. This departs from the approach we introduced using VBA. Consider the following C++ code which estimate the value of two identical bonds with an interest rate differential of 0.0001%. From these we impute the duration:

// This code is working

// main.cpp

// DiscreteBondPrice

//

// Created by Brian Byrne on 10/12/2015.

#include <cmath>

#include <iostream>

using namespace std;

double PVBdur(double Face,double cr,double r, int m, double T)

{

// store the value of the bond

double BV1=0.;

double BV2=0.;

double Dur = 0.;

double rr = r + 0.000001;

// add in coupons

int TNC=T*m;

double cpn = (cr/m)*Face;

for(int i=1;i<=TNC; i++)

{

BV1 = BV1 + cpn*pow((1+r/m),-i);

BV2 = BV2 + cpn*pow((1+rr/m),-i);

}

// finally add principle

BV1 = BV1 + Face*pow((1+r/m),-T*m);

BV2 = BV2 + Face*pow((1+rr/m),-T*m);

Dur = ((BV2 - BV1)/BV1)*(1+r/m)/(r-rr);

return Dur;

}

int main()

{

double Face = 1000;

double cr = 0.06;

double r =0.056;

int m = 2;

double T =3;

cout << " The Duration of the Discrete bond is " << PVBdur(Face, cr, r, m, T) <<endl;

system ("PAUSE");

}

Hopewell and Kaufman (1973)

Point out an important consideration when considering bonds. The duration of bonds eventually plateau for ever increasing maturities so long as the coupon rate is positive.

Hopewell and Kaufman (1973) estimate Macauley Duration and find that it does not increase linearly and monotonically with Maturity.

Duration can be estimated alternatively by changing the discount rate or yield by a small magnitude. In the example given here, the discount rate is changed by one basis point. Table 1 of Hopewell and Kaufman is reproduced yielding similar numbers for duration.