About the hp filter

1

the direction is : stoch_simul(order=1,hp_filter=100, periods=2100);

however matlab give me it as follows when i run dynare a.mod

ERROR: stoch_simul: HP filter is not yet implemented when computing empirical simulations

??? Error using ==> dynare at 96
DYNARE: preprocessing failed

how to deal with this problem?

2
I am duplicating one model economy with dynare, I got exactly the same policy function, however the standard error of each variable is much bigger than the results in the book. Will the filter matter?

3
why do we need the filters in dynare if the model economy is just fluctuating near the steady state?

another problem is that i found that we can not put periods=integ together with hp_filter=integ, can somebody tell me the reason?

Luckysinger,

  1. If you exclude the periods option, then Dynare provides theoretical moments of model variables for which the HP-filter can be applied. When the periods option is on, then the moments are simulated and the program does not have an option to yield HP-filtered data. (Although you could do this in a loop, by sending the simulated data to an HP-filter matlab code for repeated simulations)

  2. If the policy functions are the same, then you’re correct that the difference should be due to filtering.

  3. Whether you should filter a model variable which already yields stationary results is open to debate. I think the general practice is that you should conduct the same transformations to the model variables as you do to the data.

otb