Skip to content

Commit

Permalink
RBC_news_shock_model.mod: fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesPfeifer committed May 18, 2017
1 parent e6147ce commit 280c548
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RBC_news_shock_model/RBC_news_shock_model.mod
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ stoch_simul(order=1,irf=40);
//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
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('eps_z_news',M_.exo_names,'exact')) = 1; %set news shock to 1 (use any shock size you want)
Expand Down

1 comment on commit 280c548

@shouwangsp
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dear Professor,

I have two questions.
First, in your paper, "Born, Peter and Pfeifer, 2013, JEDC, 'Fiscal news and macroeconomic volatility'", you analyzed two news shock, which are 4-period news shock and 8-period news shock. If I want to replicate your paper's implication results, is it necessary to generate two news-shock variables in Dynare like

.......
varexo eps_z_news_4 eps_z_news_8 ;
.......
// exogenous TFP process
z=rhoz*z(-1)+eps_z_surprise+eps_z_news_4(-4)+eps_z_news_8(-8)

or can I make use of this file's form directly?
If it is necessary, when I analyze the pure news shock, shall I write a code like this:

shock_matrix(1, strmatch('eps_z_news_4', M_.exo_names,' exact'))=1;
shock_matrix(1, strmatch('eps_z_news_8', M_.exo_names,' exact'))=1;
shock_matrix(1+4, strmatch('eps_z_surprise', M_.exo_names,' exact'))=-1;
shock_matrix(1+8, strmatch('eps_z_surprise', M_.exo_names,' exact'))=-1;

Second, consider the case that at period t, we anticipated a positive shock that will happen at period t+8, but at period t+4, we anticipated the shock is negative at period t+8. How shall we analyze this case through Dynare? Can I write like this:

shock_matrix(1, strmatch('eps_z_news_4', M_.exo_names,' exact'))=-1;
shock_matrix(1, strmatch('eps_z_news_8', M_.exo_names,' exact'))=1;
shock_matrix(1+8, strmatch('eps_z_surprise', M_.exo_names,' exact'))=-1;

Best regards,

Samson

Please sign in to comment.