What Is a Seasonal Filter?
You can use a seasonal filter (moving average) to estimate the seasonal component of a time series. For example, seasonal moving averages play a large role in the X-11-ARIMA seasonal adjustment program of Statistics Canada  and the X-12-ARIMA seasonal adjustment program of the U.S. Census Bureau .
For observations made during period k, k = 1,...,s (where s is the known periodicity of the seasonality), a seasonal filter is a convolution of weights and observations made during past and future periods k. For example, given monthly data (s = 12), a smoothed January observation is a symmetric, weighted average of January data.
In general, for a time series xt, t = 1,...,N, the seasonally smoothed observation at time k + js, j = 1, ...,N/s – 1, is
The two most commonly used seasonal filters are the stable seasonal filter and the Sn × m seasonal filter.
Stable Seasonal Filter
Use a stable seasonal filter if the seasonal level does not change over time, or if you have a short time series (under 5 years).
Let nk be the total number of observations made in period k. A stable seasonal filter is given by
for k = 1,...,s, and for k > s.
Define For identifiability from the trend component,
Use to estimate the seasonal component for an additive decomposition model (that is, constrain the component to fluctuate around zero).
Use to estimate the seasonal component for a multiplicative decomposition model (that is, constrain the component to fluctuate around one).
Sn × m seasonal filter
To apply an Sn × m seasonal filter, take a symmetric n-term moving average of m-term averages. This is equivalent to taking a symmetric, unequally weighted moving average with n + m – 1 terms (that is, use in Equation 1).
An S3×3 filter has five terms with weights
To illustrate, suppose you have monthly data over 10 years. Let Janyy denote the value observed in January, 20yy. The S3×3-filtered value for January 2005 is
Similarly, an S3×5 filter has seven terms with weights
When using a symmetric filter, observations are lost at the beginning and end of the series. You can apply asymmetric weights at the ends of the series to prevent observation loss.
To center the seasonal estimate, define a moving average of the seasonally filtered series, A reasonable choice for the weights are for j = ±q and otherwise. Here, q = 2 for quarterly data (a 5-term average), or q = 6 for monthly data (a 13-term average).
For identifiability from the trend component,
Use to estimate the seasonal component of an additive model (that is, constrain the component to fluctuate approximately around zero).
Use to estimate the seasonal component of a multiplicative model (that is, constrain the component to fluctuate approximately around one).
 Dagum, E. B. The X-11-ARIMA Seasonal Adjustment Method. Number 12–564E. Statistics Canada, Ottawa, 1980.
 Findley, D. F., B. C. Monsell, W. R. Bell, M. C. Otto, and B.-C. Chen. “New Capabilities and Methods of the X-12-ARIMA Seasonal-Adjustment Program.” Journal of Business & Economic Statistics. Vol. 16, Number 2, 1998, pp. 127–152.