Time Series Trend and Cycle Filters

Examples applied to long term Australian unemployment rate.

Baxter-King Band Pass Filter

Source: Measuring Business Cycles: Approximate Band-Pass Filters For Economic Time Series

Baxter King Filter is an approximation to the band pass filter for a time series, that applies a moving average over a window (n).

The weights are derived over a band defined with a lower and upper threshold as:

The weights are normalised, ie constrained to sum to zero, by subtracting from the weights over the window :

Christiano-Fitzgerald Band Pass Filter

Source: Cleveland Fed Working Paper 1999

Two-sided filter

The cycle measure at a point in time t for the time series y_t is the weighted sum of each observation at , before and after . Ie:

The weights are given as:

The upper and lower cycle bands are converted to radians:

Example application of the Christiano-Fitzgerald Band Pass Filter to Australian Unemployment rate. Adjust the upper and lower thresholds of the band pass filter to determine the cycle span.

Exponential Weighted Moving Average

The Expontential Weighted Moving Average (EWMA) is a simple filter that applies a weight to each observation in the time series. The weight is determined by the parameter beta which adjusts the trend to weight proportionally between the most recent observation and the previous trend value . The EWMA is given by:

As the EWMA filter only uses information available at time t (it is backward looking), it is a causal filter and tends to lag level shifts in the time series.

Hoderick Prescott Filter

The Hoderick Prescott Filter is a two-sided filter that separates a time series into a trend and cyclical component. The filter is given by:

The filter is solved by minimizing the sum of squared residuals between the observed time series and the trend component, subject to a penalty term that minimizes the second derivative of the trend component. The penalty term is determined by the parameter lambda.

Hamilton's Regression Filter

The Hamilton filter decomposes into a predicted component (trend component) and a forecast error (cyclical component). The trend component is determined by the regression equation:

Hamilton recommends h=8 on quarterly data, or 24 on monthly data.

Kalman Filter

The Kalman Filter is a state space model that estimates the trend component of the time series. The filter is given by the observation equation and the transition equation. The observation equation describes the relationship between the observed time series and the trend component. The transition equation describes the evolution of the trend component over time.

The parameter below apportions the variance of the observed time series between the trend component (which has variance ) and the measurement error (which has varaince ). The Kalman Filter is recursive: when the variance of the trend is zero, the fitted line is not constant. Instead it is equivalent to the mean of the time series to date.

Henderson's Moving Average Filter

The Henderson's Moving Average Filter is a two-sided filter that separates a time series into a trend and residual component. The filter applies a weighted moving average over a time series to estimate the trend component. The weights are determined by the parameter n which determines the number of observations to before and after the observation point to average. For example a span of 13 includes:

Loess Regression Filter

ABS X11/X12 ARIMA Filter

The ABS X11/X12ARIMA filter is implemented using SEASABS.