Weird Second Order IRFS, Different results while plotting the same shock's irfs

Dear All,

I’m calculating a second order DSGE model, I get the irfs out.

I’m encountering a weird situation and wondering why.

See the figure, the black line the one using the following shocks coding, listing only 1 shock out; the blue line is the results using the shocks coding, listing all shocks out; while all other parts of the mods all the same. The figure that I plotted out using only the es_ne shock, the plotting code is also below.

I believe that these two shocks coding should lead to the same irfs figures, but it turns out to be not!!!See the figure.

I check these twice, there is indeed no difference between these two files, merely the difference at the shocks. I think that even the second one listing all shocks out but I only use the es_ne shock’s result to plot, so it should not bring any difference. But the results shows the difference between these two ways of shocks coding. I never encountered this in the past when solving for 1-order linear models.

Can anyone tell me why? I really want to know the reasons and want to fix it!

%code1_listing_only1shocks
steady; %(solve_algo=1)
check;
shocks;
var es_ne; stderr 0.0199;
end;
stoch_simul(order=2,irf=40,nograph)y c k inv w rk n r mc pi i re rl loan lev_f nw_f lev_m Welf spread;

%code2_listing_allshocks
    steady; %(solve_algo=1)
    check;
    shocks;
    var es_a; stderr  0.0152;
    var es_g; stderr  0.0438;
    var es_v; stderr 0.0130;
    var es_i; stderr 0.0875;
    var es_c; stderr 0.0258;
    var es_ne; stderr 0.0199;
    end;
    stoch_simul(order=2,irf=40,nograph)y c k inv w rk n r mc pi i re rl loan lev_f nw_f lev_m Welf spread;

%plotting matlab code
ending_cell={’_es_ne’}; %改为技术冲击:ending_cell={’_e_a’};
HOR=1:1:40;
var={‘y’,‘k’,‘loan’,‘inv’,‘lev_f’,‘rk’,‘pi’, ‘lev_m’,‘Welf’};

Dear all,

can anyone help me to figure out the reasons or provide me some hints? I will appreciate any response!

Sincerely,
Amy

Dear amyzhangmin,

For a second-order approximation, the state-space representation of the model is expanded and involves cross-derivative terms involving the shocks, so that the effects of the shocks depend on the history of the economy when the shocks hit it. These cross-derivative terms make the effects of any single shock (including the shock that you previously used on its own) in the battery of shocks that you are now using depend on the effect of the other shocks.:slightly_smiling_face:

Dear Cmarch,

Thanks so much! Now I know that the shocks in second order approximation could not be interpreted in a way similar to the first order model, truly thank you for your explanation!

Sincerely,
Amy

Yes. In a nutshell, IRFs in a linear model are additive. At higher order, that is not the case. For that reason, Dynare computes Generalized IRFs as opposed to “normal” IRFs at first order.