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

Term structure calculations.

Some useful transformations. Let $r(t)$ be the yield on a $t$-period discount bond, and $d(t)$ the discount factor for time $t$ (the current price of a bond that pays $1 at time $t$. Then

\begin{displaymath}d(t) = e^{-{r(t)}t} \end{displaymath}


\begin{displaymath}r(t) = \frac{-\log(d(t))}{t} \end{displaymath}

Also, the forward rate for borrowing at time $t_1$ for delivery at time $T$ is calculated as

\begin{displaymath}f_t(t_1,T) = \frac{- \log\left(\frac{d(T)}{d(t_1)}\right) }{T-t_1}
= \frac{ \log\left(\frac{d(t_1)}{d(T)}\right) }{T-t_1} \end{displaymath}

The forward rate can also be calculated directly from yields as

\begin{displaymath}f_d(t,t_1,T)=r_d(t,T)\frac{T-t}{T-t_1} - r_d(t,t_1) \frac{t_1-t}{T-t_1}\end{displaymath}



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

#include "math.h"

double term_structure_yield_from_discount_factor(double dfact, double t) {
    return (-log(dfact)/t); 
}

double term_structure_discount_factor_from_yield(double r, double t) {
    return exp(-r*t);
};

double term_structure_forward_rate_from_disc_facts(double d_t, double d_T,
						   double time) {
    return (log (d_t/d_T))/time;
};

double term_structure_forward_rate_from_yields(double r_t1, double r_T, 
					       double t1, double T) { 
    return (r_T*(T/(T-t1))-r_t1*(t1/T));
};



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