Impulse responses in a nonstationary model

Hi,
I’m running stoch_simul in a model with a unit root (stochastic growth). I compute both the level and growth rate for investment (called ii and iig in the model file) and I run stoch_simul with a 2 percent shock to the stochastic trend B^u (the shock is called w). The documentation says “The IRFs are computed as the difference between the trajectory of a variable following a shock at the
beginning of period 1 and its steady state value.” Investment should end up at 2% above its initial steady state. I presume the IRF for the level, which starts negative and converges to zero, is relative to the new steady state. So I add 1.02 times the old steady state to the IRF to get the path.

To get the level from the IRF for the growth rate, I thought the path would start at the old steady state and converge to the new one if I accumulate the IRF growth rates. But it converges to a level higher than the new steady state. So this is clearly wrong. But I’m not sure why, or whether the path from the level IRF is correct either. Appreciate any help you can provide. I’ve attached the .mod file and a spreadsheet where I do the calculations and plot the results, both in levels and growth rates. Thank you.

p.s. I’ve updated this post, because I realized that serial correlation of the shock made my previous calculations incorrect. I reran the model without serial correlation, and now the only problem is that the growth rate irf overshoots the new steady state. Sorry for any confusion.

Model2.mod (5.5 KB)
Model2_IRFs.xlsx (93.5 KB)

Use

stoch_simul(irf=1000,order=1) gu ii;
send_irfs_to_workspace;

verbatim;
Bu=cumsum(gu_w)/(1+gamu);
ii=ii_w+Bu
figure
plot(1:options_.irf,ii,'b',1:options_.irf,Bu)
hold on

end;

Your variable gu has steady state 1+gamu=1.0171. If you shock it in logs by 0.02, the increase in will be 2 percent of 1.0171. It’s easiest to normalize gu to an initial value of 1 by dividing it by 1+gamu.
Model21.mod (5.6 KB)

Thank you for the fast and helpful response!

Just a short followup: I changed the stderr in the shocks block to 0.02/(1+gamu), and that seemed to solve the problem: The implied paths of both ii and iig are virtually identical and converge to the new steady state.

However, when I add serial correlation to the gu process (rhou=0.33), something goes wrong. The implied path from the iig_w is smooth and monotonic, very similar to the one with rhou=0, but the implied path from ii_w has an initial large jump followed by a sharp decline. After the first few periods the paths are the same. Obviously I am doing something wrong, and hoping you can help. I’ve attached the .mod file (I’ve changed some of the other parameters from the previous file but that’s not the issue.) Thanks.
Model2.mod (5.5 KB)

I am not sure this is unusual. Your trend immediately jumps on impact and the IRFs are relative to the trend that has already jumped. That should give you that picture.

I think I’ve figured this out, but would appreciate a confirmation. First, with serial correlation (rhou=0.33) the trend jumps initially by less (0.0134,0.0178,…) and gradually reaches 0.02, versus when rhou=0 the trend jumps immediately by 0.02. For both cases (rhou=0 and rhou=0.33) I was adding ii_w to the new steady state (1.02 x original steady state). What seems to work (in the sense of having the implied paths from iig_w and ii_w be essentially the same) is instead to compute Bu period by period and multiply that by the original steady state and add ii_w. So with rho=0.33 this would be (1.0134,1.0178,…,0.02) x original steady state, and add ii_w (which is negative) to that. Then I get a path that is virtually identical to the implied path from iig_w, with no jump, just a monotonic transition to the new steady state.

If this is correct, it’s not quite right in the nonstationary case that the IRFs give the deviation from the steady state. They give the deviation from the current level of the trend. Thanks, and I hope this is useful to others working with nonstationary models.

Exactly, that is what I did in

Whenever you shift the trend concept, i.e. what the steady state corresponds to, you need to account for this shift when backing out the level or the IRF relative to the initial steady state. That’s why I provided an example in DSGE_mod/Aguiar_Gopinath_2007/Aguiar_Gopinath_2007.mod at master · JohannesPfeifer/DSGE_mod · GitHub