addpath C:\dynare\4.6.0\matlab

clear all;
clc;
dynare ModelC_order2.mod;


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 columns
% set shocks for pure news 
shock_matrix(1,strmatch('et',M_.exo_names,'exact')) = 0.5; %set tax shock to 0.5
shock_matrix(1+10,strmatch('ei',M_.exo_names,'exact')) = 0.25; %10 periods later use counteracting shock of 0.25
y2 = simult_(M_,options_,initial_condition_states,oo_.dr,shock_matrix,2);
y_IRFmodel025c = y2(:,M_.maximum_lag+1:end)-repmat(oo_.dr.ys,1,options_.irf); %deviation from steady states

save y_IRFmodel025c;


clear all;
clc;
dynare ModelC_order2.mod;

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 columns
% set shocks for pure news 
shock_matrix(1,strmatch('et',M_.exo_names,'exact')) = - 0.5; % only tax shock.
shock_matrix(1+10,strmatch('ei',M_.exo_names,'exact')) = 0; 
y2 = simult_(M_,options_,initial_condition_states,oo_.dr,shock_matrix,2);
y_IRFmodel025csolo = y2(:,M_.maximum_lag+1:end)-repmat(oo_.dr.ys,1,options_.irf); %deviation from steady states

save y_IRFmodel025csolo;

clear all;
clc;

load y_IRFmodel025c;
load y_IRFmodel025csolo;


dynare ModelC_order2.mod;


clear all;
clc;
dynare ModelC_order2.mod;

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 columns
% set shocks for pure news 
shock_matrix(1,strmatch('et',M_.exo_names,'exact')) = -0.5; % only tax shock.
shock_matrix(1+10,strmatch('ei',M_.exo_names,'exact')) = 0; 
y2 = simult_(M_,options_,initial_condition_states,oo_.dr,shock_matrix,2);
y_IRFmodel025csolo = y2(:,M_.maximum_lag+1:end)-repmat(oo_.dr.ys,1,options_.irf); %deviation from steady states

save y_IRFmodel025csolo_negative;



