Language Reference

SPOT Function

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

SPOT( times,forward_rates)

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



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

The SPOT function transforms the given spot rates as
s_1=f_1
   s_i = (    \pi_{j=1}^{j=i}(1+f_j)^{t_j - t_{j-1}}    )^{\frac{1}{t_i}}    -1;  i=2, ... ,n
where, by convention, t_0=0.

For example, the following code produces the output shown:

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

  
       SPOT 
  
         0.05 
    0.0549882 
    0.0599686 
    0.0649413 
    0.0699065
 

Previous Page | Next Page | Top of Page