Serving the Quantitative Finance Community

 
User avatar
Habib
Topic Author
Posts: 0
Joined: January 15th, 2003, 11:57 pm

MATLAB - fmincon to minimize sum of error^2

January 1st, 2005, 4:54 am

Hi,I am trying to estimate the parameters of the Garch option pricing model using fmincon.This is complicated by using the Monte Carlo to simulate the stock path till maturity.I have a function that returns the sum of error squared between the actual option price and the estimated price.There are 3 variables , and all must be +ve, also I have the following inequality ,x(3)+x(2)+x(2)*C < 1The function have been tested with parameters is DUAN paper and it gave the same result, So the function is working. But when I start with different initial parameter values it fails to converge with the following error:fmincon (npsol): Possible error. Solver information for Inform = 1:Optimal solution found but not to requested accuracyAny ideas how to setup fmincon would be greatly appreciated !!!Thanks
 
User avatar
damel
Posts: 3
Joined: January 8th, 2006, 12:02 pm

MATLAB - fmincon to minimize sum of error^2

April 21st, 2006, 7:32 pm

Hi,you have to relax following parameters:- TolFun: Termination tolerance on the function value.- TolCon: Termination tolerance on the constraint violation.- TolX: Termination tolerance on x.They are set on a default value (I think 1e-006).Try to put greater values.I guess the message says that you are out of the bounds of your tolerance.Bye!