Skip to content

Time Series Filters

Separates a series into a smooth trend and a cycle using the Hodrick-Prescott, Baxter-King or Christiano-Fitzgerald filter.

  • To study business cycles separately from long-run growth (macroeconomic data).
  • To remove trend before spectral analysis or before comparing the cyclical behaviour of several series.
  • Equally spaced observations with no gaps.
  • Hodrick-Prescott: λ sets smoothness (1600 for quarterly, 14400 for monthly, 100 for annual data).
  • Band-pass filters keep cycles between the shortest and longest period you give (6 to 32 quarters is the classic business cycle). Baxter-King loses K observations at each end.
  • Filter Summary: the standard deviation of the cycle, also relative to the series.
  • Chart: the series with its trend, and the cycle around zero.
  • Saved variables: trend and cycle for further analysis.

Quarterly GDP was detrended with the Hodrick-Prescott filter (λ = 1600); the cyclical component had a standard deviation of 1.4%.

Syntax: TSFILTER gdp /METHOD=HP (LAMBDA=1600) /SAVE=TREND CYCLE.


This page comes from OrcStat’s built-in help (the same text as in the app’s Help panel). To suggest a change, open an issue.