I’m trying to work out how to run the Ramsey_Policy in dynare. The problem that I am having is that I do not quite understand what it means to specify the steady state of the model CONDITIONAL on the instruments used. I tried to follow the Michel Juillard’s set of notes and implement his example (see attached file).
The code for a generic model provided in the notes is as follows:
[code]var pai, c, n, r, a;
parameters beta, rho, epsilon, omega, phi, gamma;
a = rhoa(-1)+u;
1/c = betar/(c(+1)pai(+1));
pai(pai-1)/c = betapai(+1)(pai(+1)-1)/c(+1)+epsilonphin^(gamma+1)/omega-exp(a)n(epsilon-1)/(omega*c);
exp(a)n = c+(omega/2)(pai-1)^2;
a = 0;
pai = betar;
c = find_c(0.96,pai,beta,epsilon,phi,gamma,omega);
n = c+(omega/2)(pai-1)^2;
var u; stderr 0.008;
function c = find_c(c0,pai,beta,epsilon,phi,gamma,omega)
c = csolve(@nk_ss,c0,],1e-8,100,pai,beta,epsilon,phi,gamma,omega);
function r = nk_ss(c,pai,beta,epsilon,phi,gamma,omega)
r = pai*(pai-1)/c - betapai(pai-1)/c-epsilonphi(c+(omega/2)(pai-1)^2)^(gamma+1)/omega+(c+(omega/2)(pai-1)^2)(epsilon-1)/(omegac);[/code]
The problem is that dynare does not recognise the command @nk_ss and the code cannot be implemented (see error message below) even if I name the .mod file as nk_ss:
Starting Dynare (version 4.4.3).
Starting preprocessing of the model file …
ERROR: nk_ss.mod: line 35, col 12: character unrecognized by lexer
Error using dynare (line 174)
DYNARE: preprocessing failed
I have read the dynare manual and I understand that you need to omit he Taylor rule in the model (if it applies), that commands “steady” are incompatible with ramsey_policy, I know how the policy objective is specified and what the ramsey_policy options are. The only thing I do not understand is how the steady state has to be specified (hence the example above cannot be implemented, and I am using unstable version of dynare 4.4.3). I tried looking into other topics on similar issues, but running my model with just initval doesn’t work. Then specifying the instrument in the initval, whereas the rest of the model in steady_state_model block leads to singularity (as in other topics here). So I could really use some help in trying to find these conditional steady states, because I am sure that this is the root of all problems. There isn’t a lot of material out there. Andy Levin’s codes are also outdated and don’t work on recent versions of Dynare.