Optimising for most efficient lambda in Nelson Siegel factor

Hi, I hope you're well. I am currently writing Nelson Siegel optimisation code. Using the NS formula I'm just running an ordinary least squares regression using a fixed lambda of .7308.
However, i've found that this throws up a lot of problems when running against convex curves. I've tried varying teh lambda and this helps so now i want to run a loop that finds the optimal lambda for each yiled curve. I was thinking of using fminsearch but am unsure of how to define the function as I have no no fixed variable. Any help would be greatly appreciated.

Answers (0)

Categories

Asked:

on 15 Aug 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!