Timed/Announced Shocks

hey everyone,

Anyone knows the commands for a timed shock? for example 0.2 at period X, Y, Z?

Thanks

What do you mean with timed? Are you talking about perfect foresight simulations? Or news shocks? Or a sequence of surprise shocks?

news shocks i believe, announcing a series of fiscal reforms schedule to be specific

[code]//initialize IRF generation
initial_condition_states = repmat(oo_.dr.ys,1,M_.maximum_lag);
shock_matrix = zeros(options_.irf,M_.exo_nbr); %create shock matrix with number of time periods in colums
// set shocks for pure news
shock_matrix(1,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 0.2;
shock_matrix(2,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 0.2;
shock_matrix(3,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 0.2;
shock_matrix(4,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 0.2;
shock_matrix(5,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 0.4;
shock_matrix(6,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 0.4;
shock_matrix(7,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 0.4;
shock_matrix(8,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 0.4;
shock_matrix(9,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 0.6;
shock_matrix(10,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 0.6;
shock_matrix(11,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 0.6;
shock_matrix(12,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 0.6;
shock_matrix(13,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 0.8;
shock_matrix(14,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 0.8;
shock_matrix(15,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 0.8;
shock_matrix(16,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 0.8;
shock_matrix(17,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 1;
shock_matrix(18,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 1;
shock_matrix(19,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 1;
shock_matrix(20,strmatch(‘subhfl’,M_.exo_names,‘exact’)) = 1;

C2 = simult_(initial_condition_states,oo_.dr,shock_matrix,1);
C_IRF = C2(:,M_.maximum_lag+1:end)-repmat(oo_.dr.ys,1,options_.irf); %deviation from steady state[/code]

as i wanted the policy change to last 4 quarters instead of just 1.

Thank you Dr. Pfeifer