Problems with mixing shocks?

Dear Professor Pfeifer,

I feel a little confused in understanding the mixing shocks. I searched the forum and did not find the explicit solution. Would you please give some advice ? Thank you for your time !

I intend to add a permanent deterministic shock into the stochastic model by using varexo_det. This permanent deterministic shock is a new tax that will be implemented in the future (e.g. 4 periods after this moment ). The model also includes some other stochastic shocks. And now I want to compare the irfs under these stochastic shocks with and without this permanent deterministic shock embeded. How should I make this realized ? ( I searched similar posts in the forum. It seems the permanent deterministic shock will not impact the irfs ? Then how to depict ( or reflect ) the impact of this deterministic shock ?)

I see that the forecast command is used after stoch_simul, but I do not quite understand how to interpret the results of forecast. What is the economic connotation of these blue lines ? Is there any paper could be the reference ?

And if I want to use forecast command, is it necessary to make the into level form ( my original model is in log-level form, i.e. exp(variable) )?

Any reply will be appreciated. Thanks again !

  1. This is a limitation of Dynare at the current stage. But if you are working with an first order approximation, you can model the anticipated deterministic shock as a news shock in a unit root process. That way it will be permanent and anticipated.
  2. Did you see

3. No, the model needs not be in levels. Log-levels is fine.

Thank you Professor Pfeifer, and sorry to bother you again.

To the first question:
I feel a little confused. How to model the anticipated deterministic shock (e.g. tau) as a news shock in a unit root process ? Is there any example that I can learn from ? And in this case, do you mean not using varexo_det command ? Then what is the advantage of using varexo_det command in a stochastic model ? What is the purpose of setting shocks-block as bellow ?

shocks;
var e_R; stderr 0.1;
var tau;
periods 4;
values 0.01;
end;

To the second question:
I’ve read the paper before. It says: " The middle lines depict the point forecasts for the endogenous variables, starting at the last observation of the sample and going as many steps into the future as specified in the forecast-option."
But I have no idea how should I illustrate these bule lines practically. Does these lines forecast the path of variables in the future? What factors impact these lines (Why the deterministic shock I add into stochastic model does not impact these lines )?

Sincerely looking forward to your reply. Thanks again for your time !

@jpfeifer Professor, would you please give some advice? Thank you very much !

  1. A news shock example is at https://github.com/JohannesPfeifer/DSGE_mod/blob/master/RBC_news_shock_model/RBC_news_shock_model.mod
    Instead of having an autocorrelation coefficient smaller than 1 you can set it to 1 to achieve a permanent shock. You don’t need varexo_det here.
  2. I am not sure I understand the question. The IRFs in stoch_simul will not reflect varexo_det because only varexo are shocked one at a time. Why is the forecast-command relevant? It allows you to simulate paths for endogenous variables taking deterministic shocks into account. You need to outline what you want to achieve.

@jpfeifer
Dear Professor Pfeifer,
Thank you for your support !
I read the code you gave, while I am still confused on how to add the anticipated deterministic shock as a news shock in to the stochastic context.
In my case, the anticipated deterministic shock is a new type of tax that will implement 4 periods later, which means the tax rate is 0 now (indicated by tau=0 in the model) and will be 2% ( i.e. tau=0.02 ) in 4 periods.
You say I should model the anticipated deterministic shock as a news shock in a unit root process. Does it mean the fomular like:
model;
tau=tau(-1) + e_tau(-4);
end;
And how to set the value of e_tau then? In stochastic context, the following code seems incorrect ?
shocks;
var e_tau=0.02;
end;

Please point out the if I was doing sth wrong. Thank you for your time and I really appreciate your help !

Hope to get your advice, Thank you Professor !

Yes,

is correct. The shocks-block is irrelevant. You have to use the simult_-function to perform the simulation manually. It would be something along the lines of

shock_matrix = zeros(options_.irf,M_.exo_nbr); %create shock matrix with number of time periods in columns
// set news shock
shock_matrix(1+4,strmatch('e_tau',M_.exo_names,'exact')) = 0.02; 
y2 = simult_(initial_condition_states,oo_.dr,shock_matrix,1);
y_IRF = y2(:,M_.maximum_lag+1:end)-repmat(oo_.dr.ys,1,options_.irf); %deviation from steady state