Serving the Quantitative Finance Community

 
User avatar
stt106
Topic Author
Posts: 0
Joined: November 18th, 2007, 2:07 pm

Levenberg-Marquardt in matlab

June 13th, 2008, 1:54 pm

I have got a matlab code for L-M algorithm but i can't apply it for the model i want to minimise.The model i want to minimise is EWMAsigma(n)= lambda * sigma(n-1) + (1- lambda)* R(n)^2where everything is known except lambda.sigma is volatility and R is the log-return of stock price.I think the code is correct and well written. If anyone can give me a hand on how to apply the code to the above model, it will be highly appreciated.
 
User avatar
GypCasino
Posts: 0
Joined: June 11th, 2008, 11:05 pm

Levenberg-Marquardt in matlab

June 13th, 2008, 10:35 pm

Before you try that routine, I would suggest using one of the built-in nonlinear optimizers in MATLAB. Basically just write a .m file that accepts lambda as an argument and returns your objective function. And pass the name of that function and an initial guess for lambda to the optimizer. If that is working for you then you could start testing that coded L-M.
 
User avatar
AvH
Posts: 0
Joined: March 3rd, 2008, 11:45 am

Levenberg-Marquardt in matlab

June 15th, 2008, 6:46 pm

The built-in function lsqnonlin (available in the optimization toolbox) can also use the LM-algorithm.See http://www.mathworks.com/access/helpdes ... onlin.html