These data and code creates the tables and figures in "Why You Should Never Use the Hodrick-Prescott Filter. A Comment on Hamilton (The Review of Economics and Statistics, 2018)" by Alban Moura, published in: Journal of Comments and Replications in Economics, Volume 3, 2024-1.
Abstract: Hamilton (2018) argues that one should never use the Hodrick-Prescott (HP) filter to detrend economic time series and proposes an alternative approach. This comment reconsiders Hamilton’s case against the HP filter, emphasizing two simple points. First, in the empirical example Hamilton considers, the HP and Hamilton filters yield cyclical estimates with very similar dynamic properties, questioning the notion that one decomposition outperforms the other. Second, there is a mechanical lag in the Hamilton trend, which might cast doubt on the economic plausibility of the trend-cycle decomposition. It follows that the Hamilton filter might not constitute a systematically better alternative to the HP filter.