Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Hodrick-Prescott filter

From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: Hodrick-Prescott filter
Date   Sat, 23 Oct 2004 17:00:11 -0400

As threatened in a recent message, a working version of the Hodrick-Prescott filter for time series data is now available for Stata. The existing 'hpfilter' routine (over 10 years old!) from STB is problematic, with its failings a common topic on Statalist. The new routine is a direct translation from Prescott's original FORTRAN routine, and has been validated against that routine. It has been modified to work with Stata variables rather than the Stata matrix language, so it is not constrained in the length of the time series to be filtered. The Stata implementation allows the filtering of a varlist of series, the use of time series operators, and application to a single unit of a panel. The 'hprescott' routine is available from SSC via ssc install hprescott.

My thanks to Massimo Giovannini for assistance validating the routine.

Kit Baum, Boston College Economics

* For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index