Dear all,

In the optimizer when mode_compute=4 (Sims’s csminwel), there is a indicator for convergence called retcodehat. It has several possible values, which are 0 (normal step); 1 (zero gradient); 3 (smallest stepsize still improves too slow); 4,2 (back and forth adjustment of stepsize didn’t finish); 5 (largest step still improves too fast); 6 (no improvement found); 7 (‘warning: possible inaccuracy in H matrix’).

In my experience, 0 and 6 are the most frequent ones I got. I have been puzzling which one indicates convergence?

Thanks a lot!

Bing

1 should indicate regular convergence, because the derivative at this point is 0

Hi, please referred to the attached optimization package downloaded from Chris Sims’s webpage. It is the option mode_compute=4 in Dynare. If you run the example in the folder, you will do the optimization twice. The first time is based on numerical gradient with the convergence indicator “retcodehat” equal to 3. The second time is based on analytic gradient with the indicator “retcodehat” equal to 0. In my experience, 0 and 6 are often obtained. 1 is very rare. So I am just wondering if 0 indicates convergence.

Thanks!

Best,

Bing

optimization.rar (8.8 KB)