I'm simulating new keynesian model with stiky wages and stiky prices.
It's a deterministic model in which is required to solve it expressing the variables as deviations from the steady states (so we have to express the exogenous and endogenous variables as exp^(lvar) ?), with the exception of i (interest rate), and inflation. Since we have both the inflation on prices and on wages, do we have to put the two inflations as log or just the inflation on prices?
moreover, how is it possible to shock a parameter just for n periods? (I've tried with the attached code (for eta) but it doesn't work)
how is possible to shock a exogenous
variable?: I have to shock the exogeneous shifter d. but we don't know the initial value, and the value of the shock. I only know that the shock must be positive.
thank you for your help
- Code: Select all
var lc, lh, pp, lpw, lw, lgdp, ly, i, lg,e;
varexo ld,lz,eps_eta ;
parameters sigma, beta, teta, chi, tau, ni, gamma, phi, psi, phip, phiy,eta ;
eta=0.2;
sigma = 1 ;
beta = 0.997;
teta = 7.67;
chi = 3.5;
tau = 0.2;
ni = 0.28;
gamma = 100;
phi = 50 ;
psi = 90 ;
phip = 1.5;
phiy = 0.125;
model;
1=beta*exp(ld(+1))*(1+(i*4))/(1+pp)*((exp(lc)/exp(lc(+1)))^(sigma));
gamma*pp(-1)*(1+pp(-1))= teta*((exp(lw)/exp(lz))-1)+beta*exp(ld(+1))* ((exp(lc)/exp(lc(+1)))^sigma) * (exp(ly(+1))/exp(ly))*gamma*pp*(1+pp);
chi*((exp(lh))^(ni))*((exp(lc))^sigma)+(1-tau)*(1-chi)*exp(lw)+(phi/psi)*(exp(-(exp(lpw)))-1)*(1+exp(lpw))=beta*exp(ld(+1))*(phi/psi)*(exp(-psi*exp(lpw(+1)))-1)*(1+exp(lpw(+1)))*(exp(lh(+1))/exp(lh))*((exp(lc)/exp(lc(+1)))^sigma);
(exp(lw)/exp(lw(-1)))=(1+exp(lpw))/(1+pp(-1));
i*4= max(0,(1/(beta*exp(ld(+1))))-1+phip*pp(-1)+phiy*ln((exp(lgdp))/(exp(ly))));
exp(ly)=exp(lz)*exp(lh);
exp(lgdp)=(1-(gamma/2)*(pp(-1)^2))*exp(ly);
exp(lgdp)= exp(lc)+exp(lg);
exp(lg)= eta*exp(ly);
e=eta+eps_eta;
end;
steady;
check;
steady_old=oo_.steady_state;
shocks;
var eps_eta;
periods 0:4;
values 0.05;
end;
simul(periods=100);
steady_new=oo_.steady_state;