Continuous Time

Continuous Time Discounting

In the previous section we used discrete time to discount the bond. In wholesale markets practitioners often use continuous time by virtue that timing can be messy and discrete units of time are less discernible. When modeling discrete time, we think of distinct time periods p = 1, 2, . . . .

We are accustomed to framing the relation between value of an asset at some specified date and time using a per-period discount rate. The interest rate r is equal to the percentage change in value per period. With bank accounts and amortization it may be more convenient to consider discrete time because payment on mortgages or coupon fall on discrete dates.

A more “realistic,”representation may come in the form of continuous time and continuous time discounting may help overcome issues when calendar dates don't map easily into discrete intervals. Below, we present C++ code for discounting a Bond like the previous page but in continuous time.

// ContinuousBondPrice  

//  

// Created by Brian Byrne on 01/03/2018.  

#include <cmath>  

#include <iostream>  

usingnamespace std;  

double  

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

{  

  // store the value of the bond  

  double BV = 0.;  

  // add in coupons  

   

  double cpn = (cr / m) * Face;  

  for (int i = 1; i <= m*T; i++)  

    {  

       

      BV = BV + cpn * exp(-r*i/m);  

  

    }  

  // finally add principle  

  

  BV = BV + Face * exp(-r*T);  

  return BV;  

}  

  

int  

main ()  

{  

  double Face = 100;  

  double cr = 0.14;  

  double r = 0.12;  

  int m = 2;  

  double T = 3;  

  

  cout << " The Present Value of the Continuous bond is " << PVB (Face, cr, r, m, T) << endl;  

  //system ("PAUSE");  

  

}  

ContinuousBondPrice

Estimating the Duration of a Bond in continuous time with C++ code

// This code is working  

// main.cpp  

// ContinuousBondDuration  

//  

// Created by Brian Byrne on 01/03/2018.  

#include <cmath>  

#include <iostream>  

usingnamespace 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*exp(-r*i/m);  

 BV2 = BV2 + cpn*exp(-rr*i/m);  

 }  

 // finally add principle  

  

 BV1 = BV1 + Face* exp(-r*T);  

 BV2 = BV2 + Face* exp(-rr*T);  

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

return Dur;  

}  

int main()  

{  

double Face = 100;  

double cr = 0.08;  

double r =0.11;  

int m = 1;  

double T =5;  

  

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

<<endl;  

 system ("PAUSE");  

  

} 

ContinuousBondDuration

In this video clip below, we investigate the ability of duration to capture the effect of a change of interest rates on the value of a bond.

Deducing the term structure of Interest rates using bootstrapping

The zero curve or zero coupon yield curve maps interest rates on zero-coupon bonds to different maturities straddling time. Typically bonds do pay coupons but this complicates applying the appropriate discount rate for a given time period. Analysts typically resolve this by estimating the Zero-coupon bond equivalents and reduce bonds to having a single payment at a given maturity. A common technique for manual estimation involves bootstrapping i.e. stripping coupons sequentially. The zero curves enable you to price arbitrary cash flows, fixed-income instruments, and derivatives. Zero curves are separately constructed for government securities and for inter-bank markets.

Zero-coupon bonds are available for a limited number of maturities, so you typically construct zero curves with a combination of bootstrapping and interpolation techniques in order to build a continuous curve. Once you construct these curves, you can then use them to derive other curves such as the forward curve and to price financial instruments. Below, we follow John C Hull : Options, Futures and Other Derivatives. We the take John's technique and then automate it by employing Ordinary Least Squares.