I have a closed economy model and am trying to compare impulse responses and welfare under a Taylor rule and the optimal Ramsey policy. I have an analytical (recursive) solution for the steady state.
I would like to make the comparison such that the steady state is the same under the two regimes. But if i try to do this by specifying the desired steady state value of the instrument in the initval block, and the rest of the steady state under the “steady_state_model” block, i get an error:

Error using print_info (line 142)
Ramsey: The solution to the static first order conditions for optimal policy could not be found. Either the
model doesn’t have a steady state, there are an infinity of steady states, or the guess values are too far
from the solution

Error in stoch_simul (line 95)
print_info(info, options_.noprint, options_);

Error in ramsey_policy (line 42)
info = stoch_simul(var_list);

Error in onecountrymodel_nov17_2 (line 561)
ramsey_policy(var_list_);

Error in dynare (line 223)
evalin(‘base’,fname) ;

Error in onecountrymodel_osr_nov10 (line 54)
dynare onecountrymodel_nov17_2.mod noclearall nostrict

If I specify the entire steady state under the initval bloack, the program runs and I get a Ramsey welfare and a impulse responses, but the steady state is different from the Taylor one, which is not what i want (I want to compare the irfs and welfare starting from the same steady state).
Any help would be greatly appreciated! Dynare and matlab parameter file is attached. onecountrymodel_nov17_2.mod (8.6 KB) onecountrymodel_osr_nov10.m (2.3 KB)

I am not sure I understand the problem. The steady state of the Ramsey problem is generally different from the steady state of the Taylor rule case (which corresponds to an optimal simple rule). There is generally no way to enforce that the two economies under different policies have the same steady state. It may be optimal for the Ramsey planner to pick a different steady state.

Mechanically, what you need to do with the steady state file is provide a conditional steady state. For any given input for the instrument, you need to provide the steady state for all other variables. That is distinct from a normal steady state file where you simply compute the steady state for all variables, including the instrument.

Thanks a lot Johannes. This helps clarify things. Just to check if i follow…

Indeed, the model has a collateral constraint (which is the main object of interest) which binds for low enough values of inflation (which is imposed in the Taylor version of the model), and the Ramsey planner chooses a steady state with high inflation so that the constraint is not relevant (there are no costs of high steady state inflation or any other mechanism that counteracts this).

This is what I am trying to do, although not through a separate steady state file but within the mod file by specifying the desired value of the instrument in the initval block and the recursive steady state conditional on the instrument in the steady_state_model block. But dynare does not compute the steady state. If the collateral constraint is turned off (by putting parameter tau=0), then it does compute. So is it correct that there is no way to make the Ramsey planner settle on the “wrong” steady state? (which makes sense i guess, since if the planner starts from this suboptimal steady state and is asked to respond to a shock, its not clear whether that would be a response to the shock or a move towards the desired steady state)

Your intuition is right. But you should be able to find a Ramsey steady state. If you have a proper conditional steady state file, you still need to provide an initial value for the instrument. Trying different values for the instrument often helps finding a steady state after all. But be careful, there may be more than 1 steady state.

I have a followup question on optimal policy. Is there a way to implement the optimal simple rule (osr) routine without entering the equations in linear-quadratic form? Something analogous to the routine for Ramsey optimal policy? I would like to avoid taking first and second order approximations by hand if possible .

The challenge is not the linear model. Using order=1 is sufficient. The problem is that you need to have a quadratic objective. Dynare cannot compute this for you at the moment.