Dear Johannes,

Is there a way to have stochastic shocks together with deterministic shocks in the same model?

I have read the code for RBC_news_shock_model.mod, which seems to be able to do that, however I have some questions:

- By defining

z=rhoz*z(-1)+eps_z_surprise + eps_z_news(-8);

shocks;

var eps_z_news=1; //8 period anticipated TFP news shock

var eps_z_surprise=1; //TFP surprise shock

end;

you’re assuming that both shocks are stochastic after period 8, right?

Then having eps_z_news(-8) makes this part of the shock deterministic (then known)?

- In the second part, with

shock_matrix(1,strmatch(‘eps_z_news’,M_.exo_names,‘exact’)) = 1;

shock_matrix(1+8,strmatch(‘eps_z_surprise’,M_.exo_names,‘exact’)) = -1;

you are assuming that the deterministic shock only hits in period 1, then in period 9 the stochastic hits with value -1.

If I wanted to assume that the deterministic shock is 1 in each period from 1 to 8, then I should simply do this

shock_matrix(2,strmatch(‘eps_z_news’,M_.exo_names,‘exact’)) = 1;

shock_matrix(3,strmatch(‘eps_z_news’,M_.exo_names,‘exact’)) = 1;

etc…

right ?

- Let’s say I want to do the same thing but assuming that there are two different exogenous variables: one with 8 known values (z1 in the labor FOC), and the other a pure stochastic (z2 in the production function).

exp(z1)*psi*exp(c)^{sigma}*1/(1-exp(l))=exp(w);

exp(y)=exp(z2)*exp(k(-1))^{alpha}*exp(l)^{(1-alpha)};

z1=rhoz1*z1(-1)+eps_z1;

z2=eps_z2;

shocks;

var eps_z1=1; //8 period anticipated labor supply shock

var eps_z2=1; //TFP surprise TFP shock

end;

This code should work and assume that z1 shock is deterministic until period 8, after period 8, this becomes a stochastic shock without persistance, while z2 is stochastic from period 0 and persistant with rhoz1 right?

Thanks for your answer!

Verónica