Hi,

I’m trying to replicate the paper “To Respond or Not to Respond: Measures of
the Output Gap in Theory and in Practice” (Segal, 2018) where he uses an HP filtered output gap instead of the actual output gap in the Taylor Rule running a stochastic simulation. Can someone help me with the code to do such an experiment?

Please have a look at line 567 of

```
/*
* Born/Pfeifer (2020) model with sticky wages and wages as well as overhead labor and CES production function
*
* THIS MOD-FILE REQUIRES DYNARE 4.6.2 OR HIGHER;
*
* Running the mod-file stand-alone without run_model_IRF_generation.m requires a path to Auxiliary_Files be set,
* e.g. via addpath('Auxiliary_Files/')
*
* This implementation was written by Johannes Pfeifer. In case you spot mistakes,
* email me at jpfeifer@gmx.de
*
* Please note that the following copyright notice only applies to this Dynare
* implementation of the model.
*/
/*
* Copyright (C) 2020 Johannes Pfeifer and Benjamin Born
*
* This is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
```

This file has been truncated. show original

So, if I understand, you have just used the first order condition of the HP filter minimization problem. Am I right?

Essentially yes. But the HP first order condition is used together with expectations in this case.

1 Like

I have another question. If instead to get a two sided HP filter I would like to get a one-sided one what would I have to do?

You may want to have a look at

Hello Dynare Community,
I’m trying to replicate Ferroni’s 2011 paper “Trend agnostic one-step estimation of DSGE models”, and I would like to know how would you implement the idea of the paper in Dynare.
The idea, to sum up, is the following: Instead of filtering the observables first and later doing the estimation, Ferroni proposes the observables being filtered inside the model allowing it to model freely the trend specification and estimating at the same time the structural parameters and t…