FORWARD Function

FORWARD (times, spot_rates) ;

The FORWARD function computes a column vector of (per-period) forward rates, given vectors of spot rates and times. The arguments to the function are as follows:

times

is an $n \times 1$ column vector of times in consistent units. Elements should be nonnegative.

spot_rates

is an $n \times 1$ column vector of corresponding (per-period) spot rates. Elements should be positive.

The FORWARD function transforms the given spot rates as

\begin{equation*}  f_1=s_1 \end{equation*}
\begin{equation*}  f_ i = \left(\frac{(1+s_ i)^{t_ i}}{(1+s_{t_{i-1}})^{t_{i-1}}}\right)^{\frac{1}{t_ i-t_{i-1}}} - 1; \quad i = 2,\ldots ,n \end{equation*}

For example, the following statements compute forward rates:

time = T(do(1, 5, 1));
spot = T(do(0.05, 0.09, 0.01));
forward = forward(time, spot);
print forward;

Figure 24.136: Forward Rates

forward
0.05
0.0700952
0.0902839
0.1105642
0.1309345