File Exchange

image thumbnail

Evaluate Nelson-Siegel function

version 1.0.0.0 (1.86 KB) by Dimitri Shvorob
(or fit one to a yield curve)

9 Downloads

Updated 04 Apr 2016

View License

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

Cite As

Dimitri Shvorob (2020). Evaluate Nelson-Siegel function (https://www.mathworks.com/matlabcentral/fileexchange/18160-evaluate-nelson-siegel-function), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (12)

Zhou

xiaoshi zhu

yi huo

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

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.0.0

BSD

MATLAB Release Compatibility
Created with R2006a
Compatible with any release
Platform Compatibility
Windows macOS Linux