SMM - hp-filtered model moments


I am trying to estimate a DSGE model with time-varying uncertainty (solved using a third-order approximation) using SMM. The data moments I use come from standard U.S. business cycle data (FRED), where I extract the cyclical component of log GDP etc. using a one-sided hp-filter.

Is it possible to match the one-sided hp-filtered data moments to one-sided hp-filter model moments using the Method of Moments toolbox in Dynare? I could not find an answer to this in the manual or on the forum.


It’s not yet possible, but we are working on it.

I see. But if I understand it correctly, this is essentially what the SMM part of the replication code to Born and Pfeifer (2014) Risk matters […]: Comment does (although the original paper used two-sided hp-filtered data and model moments)?

Yes, that is correct. But that paper was written long before the toolbox. The current status is

1 Like

Great! I will try and code it myself based on your replication code. Thank you for your help!

If you want to just HP-filter all your data to be matched, you need to change just about 5 lines in Dynare.

Hi professor,

It was quite straight forward to change the code to the current Dynare version syntax and to a more general setting with e.g., one sided hp-filtered model moments. I would be happy to share the modified code applied to a basic NK model if anyone is interested.

I have a follow up question if you don’t mind. Is it possible to verify that the Jacobian of the moments with respect to the estimated parameters is full rank (the regularity condition mentioned in the Dynare manual) using your code? I could not figure out how to do it from reading the csminwel function file.


Thanks. @wmutschl may know more, but my understanding is that this regularity condition can be checked via the identification command.