Filter löschen
Filter löschen

lsqnonlin First order optimality?

5 Ansichten (letzte 30 Tage)
DIMITRY
DIMITRY am 30 Jul. 2015
Kommentiert: Alan Weiss am 30 Jul. 2015
Hi Friends,
I have an optimisation to run on two options premiums to fit a yield curve by after. how to spec the tolerance of my optim using an initial set of parameters:
initial = [0.07 0.5 0.01 0.006 -0.7];
then I have create a substract of the premium between theorical and observable as
diff = [ 0.0000 0.0001 0.0011 0.0024 0.0155 0.0320]
Hence I have created a lsqnonlin based on this substract [x,resnorm,FVAL,Exitfalg,output] =... lsqnonlin(@Calibration_Criteria, initial, lb, ub, options);
with the optimset as options = optimset('disp','iter','MaxIter', 1000,'TolFun',1e-5);
but I can catch a starting tolerance treshold with the 'TolFun' option as I have only one tolerance before stepping out at the first iteration.
Error message : first order optimality measure is less than options TolFun I have try to scale the TolFun as the same level the initial point without success
Please help.

Antworten (1)

Alan Weiss
Alan Weiss am 30 Jul. 2015
I am sorry, but I have a hard time understanding your problem. The message you get is not an error message, it is an exit message telling you why the solver stopped. Did you examine the solution and find that it was inadequate in some way? That particular exit message means that the solver believes that it found a good solution.
If you want the solver to take more iterations for some reason, you could set TolFun to a smaller value, such as 1e-10. But don't set it too small.
Alan Weiss
MATLAB mathematical toolbox documentation
  1 Kommentar
Alan Weiss
Alan Weiss am 30 Jul. 2015
I am sorry, but I have a very hard time understanding you. Perhaps you could find some help in this section of the documentation.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation

Melden Sie sich an, um zu kommentieren.

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by