Ramsey Policy
Posted: Sat Apr 16, 2016 1:59 pm
Hi,
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:
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.
Thank you.
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: Select all
var pai, c, n, r, a;
varexo u;
parameters beta, rho, epsilon, omega, phi, gamma;
beta=0.99;
gamma=3;
omega=17;
epsilon=8;
phi=1;
rho=0.95;
model;
a = rho*a(-1)+u;
1/c = beta*r/(c(+1)*pai(+1));
pai*(pai-1)/c = beta*pai(+1)*(pai(+1)-1)/c(+1)+epsilon*phi*n^(gamma+1)/omega-exp(a)*n*(epsilon-1)/(omega*c);
exp(a)*n = c+(omega/2)*(pai-1)^2;
end;
initval;
r=1;
end;
steady_state_model;
a = 0;
pai = beta*r;
c = find_c(0.96,pai,beta,epsilon,phi,gamma,omega);
n = c+(omega/2)*(pai-1)^2;
end;
shocks;
var u; stderr 0.008;
end;
planner_objective(ln(c)-phi*((n^(1+gamma))/(1+gamma)));
ramsey_policy(planner_discount=0.99,order=1,instruments=(r));
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 - beta*pai*(pai-1)/c-epsilon*phi*(c+(omega/2)*(pai-1)^2)^(gamma+1)/omega+(c+(omega/2)*(pai-1)^2)*(epsilon-1)/(omega*c);
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.
Thank you.