next up previous contents index
Next: Fixed Income modelling, with Up: Term Structure algorithms. Previous: Term structure approximations.   Contents   Index

Subsections

Term structure models.

The previous section discussed methods that can be viewed as ways of nonparametrically estimating the term structure function. We next look at economic models of the term structure.

The Vasicek model.

Proposed by Vasicek (1977).



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

#include "math.h"

double term_structure_discount_factor_vasicek(double time,
					      double r,
				    double a, double b, double sigma){
    double A,B;
    double sigma_sqr = sigma*sigma;
    double aa = a*a;
    if (a==0.0){
	B = time;
	A = exp(sigma_sqr*pow(time,3))/6.0;
    }
    else {
	B = (1.0 - exp(-a*time))/a;
	A = exp( ((B-time)*(aa*b-0.5*sigma_sqr))/aa -((sigma_sqr*B*B)/(4*a)));
    };
    double d = A*exp(-B*r);
    return d;
}


The original Cox Ingersoll Ross model.

The term structure model described in Cox et al. (1985) is one of the most commonly used in academic work, because it is a general equilibrium model that still is ``simple enough'' to let us find closed form expressions for derivative securities.

Calculating discount factors.

The short interest rate.

\begin{displaymath}dr(t) = \kappa (\theta-r(t))dt + \sigma \sqrt{r(t)} dW \end{displaymath}

The discount factor for a payment at time T.

\begin{displaymath}d(t,T) = A(t,T)e^{-B(t,T)r(t)} \end{displaymath}

where

\begin{displaymath}\gamma = \sqrt{(\kappa+\lambda)^2+2\sigma^2} \end{displaymath}


\begin{displaymath}A(t,T) =
\left[
\frac{2\gamma e^{\frac{1}{2}(\kappa+\lambda...
...da(T-t)}-1)+2\gamma}
\right]^{\frac{2\kappa\theta}{\sigma^2}}
\end{displaymath}

and

\begin{displaymath}B(t,T) =
\frac{ 2e^{\gamma(T-t)}-1 }
{ (\gamma+\kappa+\lambda)(e^{\lambda(T-t)}-1)+2\gamma}
\end{displaymath}

Five parameters
  1. $r$ - The short term interest rate.
  2. $\kappa$ - The mean reversion parameter.
  3. $ \lambda$ - ``market'' risk parameter.
  4. $\theta$ - the long-run mean of the process.
  5. $\sigma$ - the variance rate of the process.

Computer algorithm.



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

#include <math.h>                     // mathematics library

double term_structure_discount_factor_cir(double t,
				double r,
				double kappa,
				double lambda,
				double theta,
				double sigma)
     // this is the original CIR formulation of their term structure.
{
    double sigma_sqr=pow(sigma,2);
    double gamma = sqrt(pow((kappa+lambda),2)+2.0*sigma_sqr);
    double denum = (gamma+kappa+lambda)*(exp(gamma*t)-1)+2*gamma;
    double p=2*kappa*theta/sigma_sqr;
    double enum1= 2*gamma*exp(0.5*(kappa+lambda+gamma)*t);
    double A = pow((enum1/denum),p);
    double B = (2*(exp(gamma*t)-1))/denum;
    double dfact=A*exp(-B*r);
    return dfact;
};



The estimated CIR model used by Brown and Dybvig.

If the Cox et al. (1985) model is estimated from a cross-section of bond prices, all the parameters are not identifiable from the data. As shown in Brown and Dybvig (1986), it is only possible to separately identify four factors $\{ r, \phi_1, \phi_2, \phi_3\}$.


\begin{displaymath}d_t(s) = A(s)e^{-B(s)r(t)} \end{displaymath}

\begin{eqnarray*}
A_t(s) & = &
\left[\frac{\phi_1e^{\phi_2s}}{\phi_2(e^{\phi_1s...
...lambda+\phi_1)/2 \\
\phi_{3} & = &2\kappa\theta/{\sigma^2} \\
\end{eqnarray*}



Discount factor.



// file esti_cir.cc
// author Bernt Arne Oedegaard

#include <math.h>

double term_structure_discount_factor_estimated_cir( double t,   // time to maturity.
						   double r,	// short interest rate.
						   double phi1,
						   double phi2,
						   double phi3)
{
  double tmp = (phi2*(exp(phi1*t)-1.0)+phi1);
  double A = (phi1*exp(phi2*t))/tmp;
  A = pow(A,phi3);
  double B = (exp(phi1*t)-1.0)/tmp;
  double dfact =  A*exp(-B*r);
  return dfact;
}



next up previous contents index
Next: Fixed Income modelling, with Up: Term Structure algorithms. Previous: Term structure approximations.   Contents   Index
Bernt Arne Odegaard
1999-09-09