by ramram » Thu Mar 21, 2013 3:34 pm
Thank you very much jpfeifer
well, to expose the whole problem, my aim is to simulate monetary rule (similarly to Taylor one). In particular, I would like to find the two parameters: alpha (weight of the output gap) and beta (weight of the inflation). I have a model with two equations (demand and supply equation) +the monetary rules and I would like to reproduce shocks from this model and get the optimal parameters (alpha and beta) that minimize a loss function. I have written the program below in my script and I have run the file.mod but it didn't work.
i would be gratreful If you have any idea or suggestion.
regards
The program
var y, pi, tc, br, oil;
varexo ey, epi, etc, eoil;
parameters a, b1, b2, c, d1, d2, e1, e2, f, g, h, alpha, beta;
a=0.64;
b1=0.67;
b2=-0.74;
c=0.23;
d1=0.55;
d2=0.3;
e1=-0.29;
e2=-0.32;
f=0.03;
g=0.07;
h=0.18;
alpha=0.5;
beta=0.5;
model;
y=a*y(-1)+b1*pi(-1)+b2*pi(-2)+c*br(-1)+ey;
pi=d1*pi(-1)+d2*pi(-2)+e1*y(-1)+e2*y(-2)+f*oil(-1)+g*br(-1)+epi;
tc=h*tc(-1);
br=alpha*y+beta*pi;
end;
initval;
y=1;
pi=1;
tc=1;
br=1;
oil=1;
end;
steady;
The loss function
E(L)=sigma*E(pi)^2+teta E(y)^2