How to calculate cumulative effects?

Hi Everyone,

I am trying to run a simulation in which I attempt to calculate cumulative effects of a shock to variables of interest over some horizon. For example, I am trying to see cumulative effects of a shock to loan-to-value ratio on output on impact and over 40 quarters. I did a search and it seems it has to be done manually (see the post here Cumulative multipliers in Dynare). I reckon I perhaps have to simulate the model for the desired horizon (lets’s say 40 quarters) and then I have to sum the IRFs. Is that correct? Because in the post that I linked, it is being calculated like this:


I am not sure why there’s a division. Will appreciate any advice.

I guess you are looking for the cumulative sum of the effects of a shock on a variable. In that case run a stochastic simulation with the shock in question and then use something along the lines of: cumsum(oo_.irfs.Variable_Shock)