Anticipated and unanticipated shock

Hello everybody,
I have a model , that I attach the file,and now I want to examine my model once with unanticipated shock epsilonm=-gammapinfl-gammaygyg-rhom(-1)-gammaopo for periods t=1 to 4
and for other periods this shock is :epsilonm=rhomepsilonm(-1)+epsah
my model with anticipated shock :
epsilonm=0 for t=1 to 4
epsilonm=rhom
epsilonm(-1)+epsah for other periods
but I don’t know how do I write this equation in dynare? and where do I write this equation in dynare?
calib7.mod (6.27 KB)

What you should do is define two separate shocks. One surprise shock and then a set of news shocks that are anticipated for the number of periods you want. Then use the simult_ function to simulate the model with the shock combination you desire. See github.com/JohannesPfeifer/DSGE_mod/blob/master/RBC_news_shock_model/RBC_news_shock_model.mod