Log percentage deviations

Hi, friends,

If I set the simulated series of the level form in dynare, whether the equation as below indicates “log percentage deviations” ?


And is it a accurate way to calculate the moments?

Thank you.


That is one way to do it (although this is not log percentage deviations, but rather actual percentage deviations; but at first order, there is no difference)
More generally, see Question about understanding irfs in dynare

Hi Prof. Pfeifer, thank you. Btw, is it correct to compute the moments, i.e. standard deviation, as below,

stdy = 100*std(Yt - hpfilter(log(Yt + Yt),1600))


stdy = 100*std(Yt/Y-1).

Which one is correct? Thank you for your help.


That very much depends on what you goal is (filtered moments or unfiltered) and where you put these commands (in the model-block or after you have obtained simulated series).

Hi. Prof.Pfeifer,

Thank you for your reply. So is either of those methods correct?

I just use the command after simulating series.
I am also curious to know how to compute the filtered moments of simulated series if I set the command in the mode block as below,

stoch_simul(order =1, periods=0,irf= 20, nograph) yt ct;

I tried to use this command,


Thank you.

stdy = 100*std(Yt - hpfilter(log(Yt + Yt),1600))
is wrong because you take the log of twice Yt, which makes no sense.
stdy = 100*std(Yt/Y-1)
would be correct if Y indicate the steady state here and you do not want to filter.

I don’t get the second part of the question. You mean how to compute theoretical filtered moments? See the reference provided in manual.

Hi. Prof. pfeifer:

Thank you for your prompt reply. Sorry it’s a typo.

Is it okay to compute the filtered moments in this way?

stdy = 100*std(Yt- hpfilter(Yt,1600))

Right, I mean it is just to compute the theoretical filtered moments.

I want to get the simulated series without shocks using the command as follows,

simult_(oo_.dr.ys, oo_.dr, ex_, options_.order).

instead of using the below command,

stoch_simul(order =1, periods=1000000,irf= 20, nograph);

Since I think it is inefficient when periods are quite large. Do you agree with the first method? Thank you.