File Exchange

image thumbnail

Evaluate Nelson-Siegel function

version 1.0 (1.86 KB) by

(or fit one to a yield curve)

9 Downloads

Updated

View License

Functions NELSONFUN and NELSONFIT evaluate and fit (with non-linear least-squares) the Nelson-Siegel function, a popular yield-curve approximation device.

Comments and Ratings (11)

xiaoshi zhu

yi huo

yi huo (view profile)

I have been read the Nelson Siegel Model article,and I think I can realize the model,and I attempte to write program to fit it

Vincent

thx in advance

Hello, Could you please let me know how the nelsonsse and lsbetas work?

Thanks in advance.

Yirong Zhu

aasifalimd

Qin

Qin (view profile)

is there something wrong in the code?
I cannot run it.
function[f] = nelsonsse(tau)
[b,f] = lsbetas(tau); %#ok
end

function[b,varargout] = lsbetas(tau)
i = x(:)/tau;

is this part has some mistakes?

Hello,
Great work...
Just a question: Do you know what scilab function ( used with wich parameters) could replace your fminbnd in order to get the fit.
I just can t get the propper algorithm on scilab...

Antonio Juambeltz

I expect this is a very interesting point for us in the Ministry of Finance in Uruguay.

Wu-Fu Han

Dimitri Shvorob

Note NELSONFIT's default (and easy-to-change) behavior of searching for tau in (0,10) and adjust the range if measuring time in days or months. (The Nelson-Sielgel function is homogeneous of degree 0 in x/tau).

Updates

1.0

BSD

MATLAB Release
MATLAB 7.2 (R2006a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video