Timed/Announced Shocks
 Posted: Sat Sep 26, 2015 5:48 pm
Posted: Sat Sep 26, 2015 5:48 pmhey everyone,
Anyone knows the commands for a timed shock? for example 0.2 at period X, Y, Z?
Thanks
			Anyone knows the commands for a timed shock? for example 0.2 at period X, Y, Z?
Thanks
Forums for asking questions, posting comments and uploading examples related to Dynare
http://www.dynare.org/phpBB3/
 Posted: Sat Sep 26, 2015 5:48 pm
Posted: Sat Sep 26, 2015 5:48 pm Posted: Sun Sep 27, 2015 8:18 am
Posted: Sun Sep 27, 2015 8:18 am Posted: Sun Sep 27, 2015 9:14 am
Posted: Sun Sep 27, 2015 9:14 am Posted: Sun Sep 27, 2015 9:46 am
Posted: Sun Sep 27, 2015 9:46 am Posted: Mon Sep 28, 2015 4:15 pm
Posted: Mon Sep 28, 2015 4:15 pm//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