Language Reference

FORWARD Function

calculates a column vector of forward rates given vectors of spot rates and times

FORWARD( times,spot_rates)

The FORWARD function returns an n x 1 vector of (per-period) forward rates.



times
is an n x 1 column vector of times in consistent units. Elements should be nonnegative.
spot_rates
is an n x 1 column vector of corresponding (per-period) spot rates. Elements should be positive.

The FORWARD function transforms the given spot rates as
f_1=s_1
   f_i = (    \frac{(1+s_i)^{t_i}}{(1+s_{t_{i-1}})^{t_{i-1}}}    )^{\frac{1}{t_i-t_{i-1}}}   - 1;  i = 2, ... ,n

For example, consider the following statements:

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

These statements produce the following output:

  
    FORWARD 
  
        0.05 
   0.0700952 
   0.0902839 
   0.1105642 
   0.1309345
 

Previous Page | Next Page | Top of Page