Why does the Nelson–Siegel–Svensson model give me different parameters on different computers for the same data?
4 views (last 30 days)
Show older comments
MathWorks Support Team
on 28 Mar 2019
Answered: MathWorks Support Team
on 18 Apr 2019
I am trying to fit the Nelson-Siegel-Svensson model to my data using the "fitSvensson" command, but I get different fitting parameters when I run the same code on different computers.
Why are these results not consistent and are there any steps I can take to ensure that I always get the same fitting parameters for my data?
Accepted Answer
MathWorks Support Team
on 19 Apr 2019
Nelson-Siegel-Svensson model is particularly hard to fit to data, as multiple combinations of fitting parameters can result in models with a similar 'goodness of fit' to the data (see Gilli et al. "Calibrating the Nelson-Siegel-Svensson Model").
Fitting the Svensson model to data if fundamentally a nonlinear optimization problem and in this particular case very minor variations in how the optimal parameters are calculated can result in very different local optima being found. These variations can be as minor as differences in how computers store numbers in their memory.
The best way to limit variation in fitting parameters using the "fitSvensson" function is to specify tight bounds on the acceptable fitting parameters. This will force the solver to converge to a specific local optimum.
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!