<< movav Financial module svennson >>

Financial module >> Financial module > nelson_siegel

nelson_siegel

Estimate the parameters for the Nelson Siegel model of spot interest rates (least square method). Finally draw the actual spot rate curve and the interporalted curve

SYNOPSIS

[uopt [,rf]]=nelson_siegel(t,r,u0 [,tf]);

Description

The Nelson Siegel model assumes that the spot interest rate follows the function (of time)

f(t)=u1+(u2+u3)*u4/t*(1-e^(-t/u4))-u4*e^(-t/u4)

The function estimates the parameters u1, u2, u3, and u4 with the least square method. It is also possible to foresee some rates for given dates.

Parameters

t
dates corresponding to the spot interest rates
r
spot interest rate curve
u0
initial values for the parameters (it must be a vector of four elements)
tf
optional parameter: (column vector) the dates for which we want to use the model in order to foresee the interest rates

Output

uopt
vector containing the estimated values of the parameters
rf
optional output: the foreseen interest rates (for the dates in vector "tf")

Example

First we define the dates and the interest rates (taken from the Euribor curve)

-->t=[ 0.0192308 0.0384615 0.0576923 0.0833333 0.1666667 0.25 0.3333333 0.4166667 0.5 0.5833333 0.6666667 0.75 0.8333333 0.9166667 1];

-->r=[0.00944 0.00949 0.0097 0.01009 0.01213 0.01405 0.01486 0.01534 0.016 0.01636 0.01662 0.01687 0.01716 0.01742 0.01766 ];

Now we can use the function and also foreseen the interest rates for 2 years, 3 years, and 4 years

-->[uopt,rf]=nelson_siegel(t,r,ones(4,1),[2 3 4]')

Gradient

1.0D-11 *

- 1.2365855

0.0194767

- 0.8091640

0.0844415

Objective function

0.0000010

rf =

0.0178524

0.0178558

0.0178501

uopt =

0.0178308

- 0.0094562

0.0097015

0.3151036

The figure shows the actual interest rates, the estimated ones and the foreseen ones.

Authors

Francesco Menoncin - Brescia University - 2010

See Also


<< movav Financial module svennson >>