Seasonal adjustment developments within Scottish GDP
Gary Campbell and Andrew Mortimer, Scottish Executive
Introduction
The Scottish Executive quarterly GDP series is compiled from 266 detailed component time series covering each industry in the Scottish economy. Some of these component series exhibit a distinct seasonal pattern which is removed prior to compiling the published 'seasonally adjusted' series.
The publication of the Scottish Quarterly GDP estimates for 2006 Q2 on 25th October 2006 introduced an improvement to the way the GDP data are seasonally adjusted through adoption of the 'X-12-ARIMA' method, developed by the US Census Bureau and recently adopted by the Office for National Statistics as their standard method of seasonal adjustment. This article provides an overview of how and why the quarterly GDP estimates are seasonally adjusted, and some of the key differences between the old and new methods.
What is seasonal adjustment?
Seasonal adjustment is the process of estimating and removing regular seasonal patterns from time series data. This enables users of the data to gain a better understanding of trends and movement over time which may be masked by seasonal variation. Seasonal effects occur in the same quarter with similar magnitude and direction each year (for example, retail sales are typically higher in quarter 4 due to Christmas; hotel bookings are typically higher during the summer - quarters 2 and 3). These seasonal effects are often not of interest in their own right; and they can obscure other features of the data that users are interested in and make underlying economic trends harder to discern.
Chart A3.1: Index of passenger numbers passing through Scottish Airports

Source: Scottish Executive
Chart A3.1 shows the non-seasonally adjusted index of passenger numbers passing through Scottish airports together with the seasonally adjusted series. The original (non-seasonally adjusted) series shows a pronounced regular pattern within each year, with peaks occurring in the third quarter (Q3) and troughs in Q1. This hampers attempts to analyse the underlying trend and short-term changes in the series. If we were to measure growth from 2006Q1 to 2006Q2 from the non-seasonally adjusted data, we would find that passenger numbers increased by 31% over the quarter. However, passenger numbers increase substantially in the second quarter (Q2) every year, so this number alone does not tell us a great deal about how Scottish airports are performing.
Also on Chart A3.1 is the seasonally adjusted version of the same series. This is obviously smoother than the original series due to the removal of the regular seasonal fluctuations. The long-term behaviour of the series is preserved, along with the short term irregular movements which were previously masked by the seasonal component. Comparing neighbouring quarters now gives a growth rate that is a robust quarterly measure of the underlying performance of Scottish airports.
Note that only the regular seasonal movements have been removed from the original series, leaving the long term trend and short term irregular movements in the series intact. For this reason, seasonal adjustment should not be thought of as simply smoothing a series: whilst seasonally adjusted series are almost always smoother than original they are rarely entirely smooth.
Decomposing a time series
A time series can be decomposed into a number of parts:
- The trend-cycle component (C) - medium and long term growth (trend) and cycles in the series;
- The seasonal component (S) - effects that are largely stable in timing, size and direction from year to year;
- The irregular component (I) - made up of anything remaining - e.g. short-term dips or peaks in output, sampling and non-sampling error, unpredictable effects due to one-off events such as strikes or disasters.
Time series can be represented in terms of these three components. One of two different models are used for seasonal adjustment of the Scottish Quarterly GDP series - an additive model, or a multiplicative model.
The additive model is: Y = C + S + I ;
and the multiplicative model is: = C x S x I
where Y is the time series being decomposed. The majority of economic time series, and the majority of series used in the compilation of Scottish Quarterly GDP, are multiplicative or, put another way, as series grow in size the size of the seasonal fluctuations grow also (and vice versa).
Box A3.1: How X-12-ARIMA seasonally adjusts |
|---|
Moving Averages Before getting into exactly how X-12-ARIMA seasonally adjusts data, it is necessary to understand moving averages. Moving averages are extensively used in X-12-ARIMA. A k-term moving average is a series constructed by taking averages of successive sequences of length k from the original series. So, for example, a 3-term moving average, as shown on Chart A3.A would take an average of the first three points, then the second to fourth points, third to fifth, etc until the end of the series. Notice that the time series resulting from the moving average is shorter than the original series. This is because there are not enough data to compute 3-term averages corresponding to the first and last point of the original series. One approach to solving this problem is to use asymmetric moving averages to pad out the ends of the series, but this is less than ideal, and can lead to large revisions to the moving average series as newer data becomes available. A better approach is to forecast the series to make data available beyond the last measured observation (one can also "backcast" to make data available before the first observation). These forecast extensions of the series can then be used to inform moving averages towards the start and end of the original series. This reduces the reliance on asymmetric moving averages and hence reduces the chance of revisions to the moving average series as new data points are added. X-12-ARIMA models its input series and generates forecasts for this purpose. Note that these forecasts are used solely to improve the estimation of the seasonal component of a series; they are not retained beyond the end of the seasonal adjustment process, and are not sufficiently accurate to be used to forecast of GDP. Chart A3.A: A simple 3-term moving average 
Source: Scottish Executive For a quarterly series, a 4-term moving average will smooth out any seasonal effects, but is problematic because the points of the moving average will not "line up" with points of the original series; to solve this, a 2-term moving average is applied to the 4-term average. An application of a 2-term moving average to a 4-term moving average is called a 2x4 term moving average. A simplified explanation of the X-12-ARIMA process 1. The first step taken by X-12-ARIMA is the selection and fitting of a model to the input series. At this stage, forecasts are generated, outliers are automatically detected and handled, and any manually specified outliers are also dealt with. The output from this step is a time series that has been prior adjusted to remove the effects of outliers. There then follows an iterative approach to decomposing the prior-adjusted series. 2. X-12-ARIMA begins by making a rough estimate of the trend-cycle of the series by applying a 2x4-term moving average to the series that smoothes out the seasonal and irregular components. This first estimate of trend-cycle is very smooth and will tend to obscure some of the detail of its movements, but as the algorithm proceeds, progressively better estimates will be obtained. 3. Having obtained an estimate of the trend-cycle, the prior adjusted series is divided by this estimate to leave an estimate of the combined seasonal and irregular components (in the multiplicative case; in the additive case the trend-cycle estimate would be subtracted from the original series). 4. The combined seasonal-irregular series is then split into 4 time series - one consisting of all the Q1 observations in sequence, one consisting of all the Q2 observations, etc. A moving average is applied to each of these series to smooth out the irregular component and give an estimate of the seasonal component for each quarter. If a particular quarter in the original series had an unseasonally high or low value, it could distort these moving averages, and hence distort the estimate of the seasonal component. To minimise such distortion, extreme values have their influence automatically reduced or are even ignored completely in this stage. The four smoothed series are then recombined into a first estimate of the seasonal component of the prior adjusted series. 5. This first estimate of the seasonal component is then divided through the prior adjusted series to give the first estimate of the seasonally adjusted series. At this point, the seasonal adjustment is fairly crude, but because the seasonality has been removed from the original series, a new estimate of trend can be obtained by applying a type of moving average called a Henderson moving average. The Henderson moving average produces better estimates of the trend-cycle component than a 2x4-term moving average, but it can only be used on series which do not exhibit seasonality. Steps 2 - 5 are repeated twice, but from now on a Henderson moving average is applied to the latest estimate of the seasonally adjusted series in step 2 to obtain an estimate of the trend-cycle component. At each stage, progressively better estimates of each of the components are obtained until at the end of the third iteration, the final estimate of the seasonal component of the prior adjusted series is produced. 6. Lastly, the original series is divided through by the estimated seasonal component of the prior adjusted series to get the final seasonally adjusted series. This ensures that the outliers removed in step 1 are present in the original series, but they have not interfered with the estimation of the seasonal component. Diagram A3.1: Overview of the operation of X-12-ARIMA 
Source: Scottish Executive |
Testing for Seasonality
Not all series have a seasonal component, and of those that do, it may not be possible in every case to isolate the seasonal component from the rest of the series (for example, if the irregular component is large relative to the seasonal component). X-12-ARIMA tests input series for seasonality, and produces a set of diagnostics for assessing the quality of the seasonal adjustment. If the test for seasonality is failed, or the diagnostics indicate the adjustment is of a poor quality, the series is not seasonally adjusted.
However, the tests for seasonality can be distorted, and the quality of the seasonal adjustment damaged by outliers of various types. Outliers can occur for a number of reasons, such as the opening or closing of large organisations, strikes, and the effects of such events. These outliers, if present, should be adjusted in order to obtain valid seasonal adjustment factors and robust seasonally adjusted series.
Handling Outliers with X-12-ARIMA
One of the main improvements to X-12-ARIMA is the inclusion of tools to handle time series outliers and overcome the problems associated with outliers with greater ease than previous methods. Most of these tools are provided by the improved modelling component of X-12-ARIMA. The following are examples of types of problems which are commonly encountered.
Additive Outliers
The simplest case is the additive outlier, where a single observation in the time series is affected, being unseasonally high or low. For example, if a strike occurred in a particular quarter, that quarter would show a large decrease, but this would not be considered to relate to the seasonal pattern of the series. If this point is not identified as an outlier it can cause distortion in the estimated seasonal pattern, artificially introducing volatility and harming the seasonal adjustment in neighbouring quarters.
Chart A3.2: Example of an additive outlier

This is illustrated by Chart A3.2, where an artificial seasonal time series has been created with an unusually low value for 2003 Q4 and then seasonally adjusted. If the outlier is not prior adjusted, it can be seen that this leads to artificial volatility and distortion of the seasonal adjustment in the years before and after the outlier.
To handle this outlier, X-12-ARIMA removes that point from the series, and replaces it with an estimated value that is in line with what is "expected" by the model, and estimates the seasonal pattern from this adjusted series.
Since an additive outlier reflects a real economic event, it can't be left out of the seasonally adjusted series. Once the seasonal pattern has been estimated from the adjusted series, it is then used to seasonally adjust the original series; in effect, the outlier is reintroduced to the final seasonally adjusted series at the end of the process. This sort of adjustment for an outlier is called a temporary prior adjustment, and it ensures that the outlier is reflected in the final series but does not distort the estimated seasonal pattern.
Level Shifts
A level shift outlier occurs when there is a "break" in the trend of a series. A single point and all points following it in the series are shifted up or down by a fixed amount, leading to a "step" shape in the series (as in the artificial example in Chart A3.3). Level shifts can be caused by companies opening and closing, or companies moving between industry series due to changes in their activities ( e.g. a manufacturing company switching to wholesale). Again, failing to handle this can cause distortion in the seasonally adjusted series, so another temporary prior adjustment is used. This time, X-12-ARIMA estimates the size of the upward or downward movement in the level shift, and scales the early part of the series to so that the parts of the series before and after the level shift "line up". This allows the seasonal pattern to be estimated without distortion from the level shift, and these estimates are then used to remove the seasonal component from the original unadjusted series - thus the level shift remains in the published series, but it does not distort the seasonal adjustment.
Chart A3.3: Example of a level shift

Seasonal Breaks
Seasonal patterns do not always remain constant; they can evolve over time. If the seasonal pattern changes slowly, then X-12-ARIMA may be able to handle it adequately without intervention, but sometimes a seasonal pattern can change very suddenly. This is known as a seasonal break and needs to be adjusted for in order to get a good estimate of the seasonal pattern. There are many potential causes of seasonal breaks - for example changes in data source or methodology, or administrative changes. When a seasonal break is encountered in a series, modelling tools in X-12-ARIMA are used to adjust the period before the break so that its seasonal pattern matches that after the break. These adjustments effectively remove the "old" seasonality from the pre-break data, and then apply the new one, giving a series with a single consistent seasonal pattern which can then be adjusted as normal without distortion.
Chart A3.4 gives an example of a seasonal break in the Sale of Motor Vehicles and Parts series. Prior to 1999, the year identifier on vehicle registration plates was updated once per year every August. In this period, there was a pronounced peak every Q3. After 1999, registration plates were updated twice per year every March and September. In this period, there are two small peaks every year, in Q1 and Q3. X-12-ARIMA takes the seasonal break in 1999 into account explicitly, whereas the method previously used (X-11-ARIMA) does not. Around the time of the seasonal break, the estimates previously published have been distorted due to the sudden change in seasonal pattern, but X-12-ARIMA produces a less volatile series that better represents the underlying behaviour of the series (for example in 1999 Q3 the old method gives a value that is lower than appropriate given the new seasonal pattern as it is still influenced by the earlier seasonal pattern which expected a large peak every Q3).
Chart A3.4: Index of sales of motor vehicles, motorcycles & parts

Source: Scottish Executive
Effects of the methodological change on quarterly GDP
The GDP series is compiled by aggregating 266 low-level series to produce 37 published series. These low-level series are seasonally adjusted before aggregation. The effect on the overall GDP series is shown in Chart A3.5. As can be seen, the effect is small, but this is not unexpected; seasonal adjustment should not greatly affect the annual growth rates of the series, although the quarterly rates will be changed. The impact of the seasonal adjustment changes is, however, much more noticeable in the detailed published series.
Chart A3.5: Effect of new seasonal adjustment methodology on 2006 Q2 GDP series

Source: Scottish Executive
Conclusion
The incorporation of the X-12-ARIMA method of seasonal adjustment into the 2006 quarter 2 estimates of GDP is the culmination of a substantial piece of development work and represents a significant enhancement to the quality of the published series. The seasonal adjustment applied to the component series is now far less susceptible to distortion by outliers and structural change in the economy. This has lead to final published series which provide more accurate and robust estimates of short-term movements, particularly those occurring over individual quarters, in the Scottish economy.
References
ONS Time Series Analysis Branch (2005)
"Guide to Seasonal Adjustment with X12ARIMA"
Draft version, December 2005
Time Series Staff, Statistical Research Division, US Census Bureau (2004)
"X-12-ARIMA Reference Manual"
David F. Findley, Brian C. Monsell, William R. Bell, Mark C. Otto and Bor-Chung Chen (1998)
"New Capabilities and Methods of the X-12-ARIMA Seasonal Adjustment Program"
Journal of Business and Economic Statistics, vol. 16 (1998), No. 2, pp. 127-157