MATLAB: Is it possible to fit an interest rate curve using the Nelson-Siegel or Svensson parametric models in MATLAB

Financial Derivatives Toolboxnelsonseagullsiegalsiegelsvensson

I can fit a spline to the forward interest rate curve with the IRDATACURVE function, but am not sure on how to fit a Nelson-Siegel or Svensson parametric model, which is more typical of industry standards.

Best Answer

It is possible to fit an interest rate curve with the Nelson-Siegel or Svensson parametric models using the FITNELSONSIEGEL and FITSVENSSON methods of the IRFUNCTIONCURVE class in the Fixed-Income Toolbox V1.7 (R2009a).
For an example on how to use these methods, please refer to the MATLAB documentation page for each of these functions by typing the follownig command on the MATLAB Command Prompt:
doc fitNelsonSiegel
% or
doc fitSvensson