next up previous contents index
Next: Term structure models. Up: Term Structure algorithms. Previous: Using the currently observed   Contents   Index

Subsections

Term structure approximations.

Instead of explicitly modeling the term structure, one may want to approximate it by a flexible functional form. The following three are examples of this, proposed in respectively Nelson and Siegel (1987), Bliss (1989) and McCulloch (1971). The first two model the yield, McCulloch model the discount factor (or bond price) directly.

The Nelson and Siegel(1987) functional form.


\begin{displaymath}
r(s) =
\beta_{0}
+ (\beta_{1}+\beta_2)
\left[ \frac{1-e^...
...
\right]
+ \beta_{2}
\left[
e^{-\frac{t}{\lambda}}
\right]
\end{displaymath}



// file nels_sie.cc
// author: Bernt A Oedegaard
// purpose: Calculate the term structure proposed by Nelson and Siegel
// Parsimonious Modeling of Yield Curves, Journal of Business, (1987)

#include <math.h>

double term_structure_yield_nelson_siegel(double t,
					  double beta0, double beta1, double beta2,
					  double lambda ) { 
   if (t==0.0) return beta0;
   double tl = t/lambda; 
   double r = beta0 + (beta1+beta2) * ((1-exp(-tl))/tl) + beta2 * exp(-tl);  
   return r; 
}; 


Bliss (1989)

In Bliss (1989) a further development of Nelson and Siegel (1987) was proposed.

\begin{displaymath}
r(t) =
\gamma_{0}
+ \gamma_{1}
\left[ \frac{1-e^{-\frac{...
...{\frac{t}{\lambda_{2}}} -
e^{-\frac{t}{\lambda_{2}}}
\right]
\end{displaymath}

This has 5 parameters to estimate: $\{\gamma_0,\gamma_1,\gamma_2,\lambda_1,\lambda_2\}$.



// file termstru_yield_bliss.cc
// author: Bernt A Oedgaard 

#include <math.h>

double term_structure_yield_bliss(double t, double gamma0, double gamma1, double gamma2,
			double lambda1, double lambda2) {
    double r; 
    double t1 = t/lambda1; 
    double t2 = t/lambda2; 
    r = gamma0 
	+ gamma1 * ( (1-exp(-t1)) / t1 ) 
	+ gamma2 * ( ( 1-exp(-t2)) / t2 )  
	+ gamma2 * ( -exp(-t2)); 
    return r;
}; 


Cubic spline.

The cubic spline parameterization was first used by McCulloch (1971) to estimate the nominal term structure. He later added taxes in McCulloch (1975). The cubic spline was also used by Litzenberger and Rolfo (1984).


\begin{displaymath}d(t)=1 + b_1 t + c_1 t^2 + d_1 t^3 + \sum_{j=1}^K F_j
(t-t_j)^3 1_{\{t<t_j\}} \end{displaymath}

Here $1_{\{A\}}$ is the indicator function for an event $A$, and we have $K$ knots.

To estimate this we need to find the $3+K$ parameters:

\begin{displaymath}\{b_1,c_1,d_1,F_1,\cdots,F_K\} \end{displaymath}

If the spline knots are known, this is a simple linear regression.



// file: cu_spline.cc
// author: Bernt A Oedegaard

#include <math.h>
#include <vector.h>

double term_structure_discount_factor_cubic_spline(double t,
						   double b1,
						   double c1,
						   double d1,
						   const vector<double>& f,
						   const vector<double>& knots)
{ 
    //  calculate the discount factor for the spline functional form. 
    double d = 1.0  
	+ b1*t   
	+ c1*(pow(t,2))   
	+ d1*(pow(t,3)); 
    for (int i=0;i<knots.size();i++) { 
      if (t >= knots[i]) { d += f[i] * (pow((t-knots[i]),3)); } 
      else { break; }; 
    }; 
    return d;   
}; 



next up previous contents index
Next: Term structure models. Up: Term Structure algorithms. Previous: Using the currently observed   Contents   Index
Bernt Arne Odegaard
1999-09-09