Consecutive and identical shocks

Hello everyone!
Please, I need some help. I would like to perform identical and consecutive unanticipated monetary policy shocks, but I am not sure how to implement it. For example, in a zero steady state environment, the monetary authority set the interest rate igual to 2% annualized for 4 period consecutive, after 4 stochastic shocks not anticipated by the agents.

I believe that my question is the same that the topic below:

But yet, I do not figure out how to do it.

Thanks in advanced.

What is the context of your model? Should it be fully nonlinear? Taking stochastics into account? Or are your shocks essentially MIT shocks?

Dear Pfeifer.
I am using a linear Gali and Monacelli model-based with a different phillips curve.Hence, I would like to asses the impact of a 3 period forward guidance shock in comparison to an unanticipated 3 period stochastic shock.
Is it possible?

Is the model truly linear or with a ZLB constraint?

truly linear, without constraint.

Then you can use a stochastic model at order=1 which will be certainty equivalent. The simultaneous shock can be simulated using the simult_-function. The forward guidance can be implemented as a sequence of news shocks. See https://github.com/JohannesPfeifer/DSGE_mod/blob/master/RBC_news_shock_model/RBC_news_shock_model.mod

Ok! Thanks.
So, in order to implement a Forward Guidance shocks, I have to use:

Nominal_Interest = rhor*(Nominal_Interest(-1)-Nominal_Interestnat(-1)) + (1-rhor)*(rpi*Inflation_H + ry*(gap_gdp)) + Nominal_Interestnat  + e_r_news; (taylor rule)
 e_r_news= e0+e1(-1)+e2(-2);

shock_matrix = zeros(options_.irf,M_.exo_nbr); %create shock matrix with number of time periods in columns
// set z to 1 for three periods via news shocks

shock_matrix = zeros(options_.irf,M_.exo_nbr);  
shock_matrix(1,strmatch('e0',M_.exo_names,'exact')) = 1; 
shock_matrix(1,strmatch('e1',M_.exo_names,'exact')) = 1;
shock_matrix(1,strmatch('e2',M_.exo_names,'exact')) = 1;

?

And when it comes to 3 periods unanticipated shocks with same size?

Yes, that looks correct.

Ok, but the 3 periods unanticipated shocks? How to implement?

shock_matrix = zeros(options_.irf,M_.exo_nbr); %create shock matrix with number of time periods in columns

shock_matrix = zeros(options_.irf,M_.exo_nbr);  
shock_matrix(1,strmatch('e0',M_.exo_names,'exact')) = 1; 
shock_matrix(2,strmatch('e0',M_.exo_names,'exact')) = 1; 
shock_matrix(3,strmatch('e0',M_.exo_names,'exact')) = 1; 

Thank you Pfeifer!
You are always helpful!