Ramsey: The maximum number of iterations has been reached. Try increasing maxit

Hello everyone,

I am struggling with the Ramsey Optimal Policy in my model. Following your mod file example (Ramsey_example), I set one instrument (omega) with one missing equation. I wrote down the steady_model block as suggested, but in the end the routine returned me the following error:

Ramsey: The maximum number of iterations has been reached. Try increasing maxit.

I am a bit puzzled, as the initval of my instrument is equal to zero, so I think that the conditional steady state should not be the problem.
Could you please help me out?

Thank you very much,
Have a nice day!

rams.mod (7.3 KB)

Change to

initval;
omega=0.5;
end;

to see that your conditional steady state only works for omega=0.

Ok, thanks.

I am really sorry but I am not very used to this Ramsey procedure, what would you suggest in order to solve my problem?
If I got the idea, the problem is in my steady state. Am I wrong?

Thanks again for the help

The problem is that your steady state file does not work for arbitrary values of omega. It must work the following way: given any feasible values for omega, return the steady state for all other variables.

Thank you very much.

Just to clarify a bit for me: does this mean that I have to express al the variables in my steady state file as a function of the instrument?

Thanks

In a sense, yes. Dynare gives you a value for omega, you need to compute the rest as a function of this value.

Thanks again Professor. One last question. I modified the steady state as you suggested, but the problem persists. When i run the model without ramsey, it works smoothly, but if I add the Ramsey policy lines, the following error appears again:

Ramsey: The maximum number of iterations has been reached. Try increasing maxit.

What can be the problem, in your opinion?
Thanks again for the help and the patience!
principal_model_level_subsidy.mod (7.2 KB)
rams1.mod (7.4 KB)

Your problem here is the implicit limit you want Dynare to take:

planner_objective((S^(1-sigma)/(1-sigma))-chi*((n^(1+sigma))/(1+sigma)));

for sigma=1 has a division by 0. Use

planner_objective(log(S)-chi*((n^(1+sigma))/(1+sigma)));

and it will work.

Thank you again Professor, your suggestion was really useful! I modified the model following your last message and now it works.

Thanks again,
Good afternoon

Note that I had a typo above that I fixed.

Hello @jpfeifer,

I’ve run into the same error - ‘‘Ramsey: The maximum number of iterations has been reached. Try increasing maxit’’ - in a model with two goods: durables and nondurables when I use an analytical expression of the loss function. The model works fine otherwise with a Taylor rule. I’d really appreciate your advice on how to potentially fix this.

Thank you very much!

nonlinear.mod (4.8 KB)
nonlinear_steadystate.m (2.3 KB)

P.S. I deleted the previous post due to a typo in the code