Page 1 of 1

Timed/Announced Shocks

PostPosted: Sat Sep 26, 2015 5:48 pm
by iramadan
hey everyone,

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

Thanks

Re: Timed/Announced Shocks

PostPosted: Sun Sep 27, 2015 8:18 am
by jpfeifer
What do you mean with timed? Are you talking about perfect foresight simulations? Or news shocks? Or a sequence of surprise shocks?

Re: Timed/Announced Shocks

PostPosted: Sun Sep 27, 2015 9:14 am
by iramadan
news shocks i believe, announcing a series of fiscal reforms schedule to be specific

Re: Timed/Announced Shocks

PostPosted: Sun Sep 27, 2015 9:46 am
by jpfeifer

Re: Timed/Announced Shocks

PostPosted: Mon Sep 28, 2015 4:15 pm
by iramadan
Thank you for the link,
I did follow the example provided but made a simple change,
Code: Select all
//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


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

Thank you Dr. Pfeifer