Interpreting IRFs in Third-Order DSGE Model with Uncertainty Shocks

Dear all,

I am working on solving a DSGE model with uncertainty shocks using stoch_simul with order=3 in Dynare. However, I am struggling to interpret the impulse response functions (IRFs) generated for two shocks (xxt and epsilon). Despite reading multiple forum discussions, I remain confused about some key aspects.

You can find my shock processes, the size of shocks, and the IRF command settings at the bottom.

I have three questions.

  1. When I run stoch_simul, I obtain two sets of IRFs: one labeled “orthogonalized shock to xxt” and the other “orthogonalized shock to epsilon”.
  • Do these IRFs represent the isolated effects of each shock, or do they reflect the combined effects of both shocks?
  • Since a third-order approximation includes interaction terms, does this mean it is impossible to fully isolate the impact of each shock?
  1. I came across a forum post suggesting the use of simult_ to generate IRF with multiple shocks. How does using simult_ differ from stoch_simul in generating IRFs, particularly at higher-order approximations?

  2. The appendix of Born and Pfeifer (2014) states that Generalized IRFs (GIRFs), rather than standard IRFs, should be used for models solved with higher-order perturbations.

  • Does stoch_simul generate GIRFs or standard IRFs?
  • How about simult_?

I would appreciate any insights or clarifications on these issues. Thank you in advance for your help!

% shock process
xx=(1-rhox)*xxss+rhox*xx(-1)+exp(sigma_xx)*xxt;
sigma_xx=(1-rhosigma)*sigma_xx_bar+rhosigma*sigma_xx(-1)+etasigma*epsilon;

% shocks 
shocks;
var xxt; stderr 1;  
var epsilon; stderr 1;
end;

% simulation
stoch_simul(order=3,pruning,periods=1000,irf=100,k_order_solver);

% adding two shocks at once
initial_condition_states = repmat(oo_.dr.ys,1,M_.maximum_lag);
shock_matrix = zeros(options_.irf,M_.exo_nbr);

shock_matrix(1,strmatch('xxt',M_.exo_names,'exact')) = 1; 
shock_matrix(1,strmatch('epsilon',M_.exo_names,'exact')) = 1; 

y2 = simult_(M_,options_,initial_condition_states,oo_.dr,shock_matrix,3);
y_IRF = y2(:,M_.maximum_lag+1:end)-repmat(oo_.dr.ys,1,options_.irf); 
  1. These IRFs represent the effect of each shock separately. However, due to state dependence at higher order, it needs to be specified what that separation means.
  2. Dynare internally uses simult_.m to construct the IRFs at higher order. Using it yourself allows more flexibility.
  3. IRFs at higher order are always GIRFS. The ones by Dynare are “ergodic” GIRFs where the effect of future and past shocks is integrated out via simulations. An alternative would be conditioning on all past and future shocks being 0. They are called IRFs at the stochastic steady state. See DSGE_mod/Basu_Bundick_2017/Basu_Bundick_2017.mod at master · JohannesPfeifer/DSGE_mod · GitHub
    In contrast, the IRFs you generate with simult_.m are strange because they have a simultaneous level and volatility shock. Is that the type of GIRF you want?

Thank you! My second question is resolved. However, I still have some questions.

  1. What does “the effect of each shock separately” actually mean?
    I initially thought that it would be equivalent to specifying the shock blocks as below:
shocks;
var xxt; stderr 1;  
end;

However, the results seem different. In particular, applying this shock block produces irfs with the same shape but different magnitudes compared to the ones obtained through listing two shocks in shock block. Interestingly, if I linearize the model at first order and apply 1 standard deviation shock to xxt, the resulting irfs are identical.

  1. I want to compare two scenarios:
    (1) when there is only an xxt shock
    (2) when both xxt and epsilon shocks occur simultaneously
    I thought my code correctly implementing the second scenario, isn’t it?
  1. It means that for the purpose of the impulse, the other shocks are set to 0. But for the purpose of GIRFs these shocks are not set to 0 for all other periods (they are integrated out). If you would compute IRFs at the stochastic steady state, agents would still account for the possibility of future shocks. If you manually shut off a shock by settings its variance to 0, none of that will be true.
  2. Yes, that is correct. But there is a third condition: you are starting at the deterministic steady state.
  1. Thank you for the explanation. Given this understanding, do the following two scenarios theoretically produce the same results? I mean, since both scenarios set epsilon to zero, does running simulation at first and third order theoretically yield the same irf, or is their similarity merely coincidental?
%%% Scenario 1
shocks; 
var vt; stderr 1;  
var epsilon; stderr 0;
end;
stoch_simul(order=1,pruning,periods=1000,irf=100,k_order_solver);

%%% Scenario 2
shocks; 
var vt; stderr 1;  
var epsilon; stderr 0;
end;
stoch_simul(order=3,pruning,periods=1000,irf=100,k_order_solver);
  1. I believe my analysis should start from the ergodic steady state rather than the deterministic steady state. Should I first compute the ergodic mean in the absence of shocks and then run the simulation again starting from that point? Could you give me a hint on how to properly implement this?
  1. They cannot return the same results unless nonlinearities are not important. In that case, the higher-order solution will be close to linear.
  2. The standard way to proceed is to follow the approach outlined in
    DSGE_mod/Basu_Bundick_2017/Basu_Bundick_2017.mod at master · JohannesPfeifer/DSGE_mod · GitHub

This would start IRFs at the stochastic steady state.

Thank you so much.

Based on previous discussions, I understand there are two ways to compute IRFs when analyzing uncertainty shocks with a higher-order approximation.

First, ergodic GIRF which is automatically generated by dynare when using stoch_simul command. Second, IRFs at the stochastic steady state which can be computed manually following the dynare code shared eariler.

I think the first approach is more realistic as it average out all possible states while the second approach starts only at stochastic steady state.

However, I’ve noticed that many research papers use the second approach instead of ergodic GIRFs.
Why do many papers prefer the second approach?
And which method would you recommend?

The GIRFs at the stochastic steady state have the advantage that they can be computed based on just one simulation. GIRFs are a lot harder to interpret. In the context of pruning, they also have the advantage that the decomposition into the first to third order effects is unique.

But the main determinant is path dependency. People have been using that type of IRF without really justifying that choice.

I appreciate your insights!
Could you recommend any academic papers that theoretically discuss the differences between ergodic GIRFs and IRFs computed at the stochastic steady state?

The closest you will probably get is the Appendix to Born/Pfeifer (2014): Risk Matters: The Real Effects of Volatility Shocks: Comment

Hi,
After reviewing the comments, I attempted to compute GIRFs at the stochastic steady state following the Basu and Bundick replication code you provided.
I conducted three experiments
(1) 1 standard error level shock – blue line
(2) 1 standard error volatility shock – red line
(3) 1 standard error level and volatility shock – green line
To implement this, I modified shock_mat in the provided replication code to match my experiements

However, my results seem counterintuitive and unexpected.
Although the GIRFs from (1) (level shock) and (2) (volatility shock) exhibit opposite shapes, adding both shocks together in (3) generates GIRFs that resemble (1) but with a larger magnitude.
Intuitively, since the volatility shock produces the opposite response of the level shock, I expected the combined response in (3) to be smaller than (1) due to some offsetting effect. However, instead of offsetting, the response appears to be amplified.
Additionally, the fact that (1) and (2) exhibit opposite shapes is also counterintuitive to me.

Do you have insights into why this might be happening? Any help would be greatly appreciated!

Depending on the exact specification, (3) means that the volatility shock immediately scales up the level that. That would explain why you are getting IRFs that look like a larger level shock.