# Time Series Decomposition: A practical example using a classic data set

Professor **Steve Cook**

Department of Accounting and Finance, Swansea University Business School, Swansea University

s.cook@swan.ac.uk

Published April 2013

### 1. Synopsis

This case study provides a discussion of time series decomposition along a data set and solutions illustrating its application using real world data. The data employed are drawn from a classic article in applied econometrics (Davidson *et al*., 1978). To supplement the provision of an Excel file with the required data, solutions and accompanying notes, the sections below provide information on: the nature of time series decomposition; the attraction and informative content of the empirical vehicle selected; and the scope for discussing relevant issues concerning time series decomposition via the chosen empirical example in a workshop or classroom setting.

### 2. Background

Time series decomposition is a familiar component of courses and texts on the forecasting of business and economic data. In its standard form, classical time series decomposition assumes that a series of interest comprises of three underlying components which combine to produce the data under investigation. These three components are the trend-cycle, the seasonal component and the irregular component. Typically, these components are denoted as *T*_{t}, *S*_{t} and *E*_{t} respectively, with the series of interest denoted as *Y*_{t}. An initial question then concerns exactly how these components combine to produce the series of interest. Here, two assumptions or approaches arise as classical decomposition assumes that either the series of interest is given as the sum of its underlying components, or is instead given as their product. This leads to classical additive and multiplicative decomposition respectively. Formally this can be expressed as:

Additive decomposition: *Y*_{t} = *T*_{t} + *S*_{t} + *E*_{t}

Multiplicative decomposition: *Y*_{t} = *T*_{t} x *S*_{t} x *E*_{t}

Therefore, time series decomposition begins with an assumption that data arise as the result of the combination of three underlying components. The following step is then to isolate or capture these components. A final step would then involve the use of the isolated components to derive modifications of the original series which might be of interest to an investigator.

To provide an illustration of time series decomposition in practice, and highlight a number of attendant issues that arise during its application, I have used the consumption data employed in the classic article of Davidson *et al*. (1978) (commonly known as DHSY) as a vehicle. Beyond its use as a means of facilitating the application of time series decomposition, this data set serves a couple of additional purposes. First, it is a data set from a paper that will be familiar to many students as a result of its central role in applied econometrics (it provides an early example of the use of error correction modelling), econometric theory (it is a key paper in the literature on the encompassing principle and the LSE or Hendry methodology) and macroeconomics (it lies at the heart of discussions on the modelling of consumers’ expenditure via its contrast with Hall’s Rational Expectations approach). Second, it provides an ‘economic’ example in an area often dominated by non-economic applications and approaches. By this, I refer to the dominance of business-related applications in an area (forecasting) of interest to business, economics and finance students alike. Further to this, forecasting texts often adopt a presentation which contrasts to that that familiar to economics students. As an example of this, consider the highly popular and excellent text of Makridakis *et al*. (1998). While I have used this text as the core reading for a postgraduate course in *Business and Economic Forecasting *for Business and Economics students at Swansea University (and I would assume many colleagues at other institutions do the same), its presentation departs in places from that employed in Economics. To illustrate this, consider the following examples:

- Reference is made to the ‘backshift operator’ rather than the ‘lag operator’ commonly considered in econometrics. Consequently, lagging of variables occurs via ‘B’ rather than ‘L’.
- As above, differencing is denoted by use of an inverted upper case delta rather than upper case delta as typically employed in econometrics.
- The form of Theil’s inequality coefficient considered is the ‘benchmark of 1’ specification, rather than the ‘bounded between 0 and 1’ specification typically employed in econometrics (see, for example, EViews 7).

The use of data from a classic article in economics is therefore not just a welcomed component of the module via the general issue of allowing students to become more involved in the studies they read (viewing, manipulating and examining the data employed in empirical studies achieves this, at least in my opinion), but also as a means of counterbalancing a potential imbalance for economics students.

### 3. Application and issues

The DHSY data employed in the application of time series decomposition are provided in the Excel file *DHSY_Decomposition*.*xlsx*. The original data, providing quarterly observations on seasonally unadjusted real consumers’ expenditure in the UK over the period March 1957 to July 1975 are provided in second column of the initial spreadsheet and are denoted as *Y*_{t}. In this particular example, time series decomposition is employed under the assumption of multiplicative seasonality (that is, it is assumed that *Y*_{t} = *T*_{t} x *S*_{t} x *E*_{t}). The use of the DHSY data allows the issues below concerning time series decomposition to be considered and discussed in a practical context.

#### 3.1. The use of even length moving average smoothers

The issue here is that an even length moving average smoother will be employed frequently in practice to capture the underlying trend-cycle of a series of interest. This is the case as often quarterly or monthly data will be examined and hence a 4 MA or 12 MA allows smoothing across a year. However, the use of an even length smoother results in a trend-cycle which falls between observations. Both of these points can be illustrated here as while smoothing over four observations clearly captures a full calendar year, it leads to a smoother which has observations falling between quarters. For example, the first value of the 4 MA employs observations on *Y*_{t} for March, July, September and December 1957 and so falls between July and September 1957. Similarly, the second value of the 4 MA falls between September and December 1957.

#### 3.2. The use of centred MA smoothers and the detrending of data

As noted above, the 4 MA provides values falling between actual time periods. Consequently, a centred 2 x 4 MA falls on an actual period (September 1957 in the first instance). This issue can be used to illustrate the distinction between the need for centring of even and odd length MA smoothers and also that centred smoothers are equivalent to weighted smoothers of a different order. In this case, the 2 x 4 MA is equivalent to a weighted 5 MA and due to the length of this being odd, the smoother is centred on an actual observation.

#### 3.3. The ‘dramatic’ assumption concerning the isolation of the seasonal component

Once the appropriate smoother has been identified and the trend-cycle has been eliminated from the original series, the resulting detrended series is a combination of the seasonal and the irregular components. For the present example operating under the assumption of multiplicative seasonality, this is given as:

*Y*_{t} / *T*_{t} = *S*_{t} x *E*_{t}

In its standard form, classical decomposition assumes that the irregular component can be removed, and hence the seasonal component can be isolated, by averaging. That is, the seasonal component for a particular season (in this case a particular quarter) can be found by averaging the values of *S*_{t} x *E*_{t} for that season over all available years. In other words, it is presumed that the inherently random nature of the irregular component means it can be ‘averaged out’. The present data set can be employed to illustrate this by requiring students to calculate the average of *S*_{t} x *E*_{t} for March, before repeating this for July, Sept and Dec. In workshops situations, I have not employed a shortcut for this as I wish to ensure the mechanics *and implications* of this quite dramatic assumption concerning seasonality are recognised and understood. Consequently, the required terms are entered in an averaging command with the four period gap between cells reinforcing the form of the exercise undertaken. For example, when calculating the first seasonal, the average over the cells E5, E9 through to E73 is required. The mechanistic nature of this exercise and visiting of each of the ‘Septembers’ (in this first instance) in the sample makes clear it is the average across all of these quarters that is required to remove the irregular component. Perhaps more importantly, the subsequent repeating of this for December, March and July and then the copying of the derived seasonal terms throughout the sample illustrates that decomposition derives a seasonal term for each season which is fixed throughout the sample. That is, the seasonal for September is the same in every year of the sample, as is the case for March, July and December also. This is why the isolation of the seasonal component under the standard form of time series decomposition is referred to as ‘dramatic’ above, as it imposes a fixed nature on the seasonal component. In the classroom application considered here, this issue can be linked to discussion of seasonal sub-series plots and the lack of variation *within* seasons *through *time, and hence the equivalence of seasonal components and their mean lines.

#### 3.4. Graphing of the seasonal and non-seasonal series

The application of decomposition allows various modified versions of the original data to be derived and considered. Perhaps the most obvious of these is the seasonally adjusted version of the original data where the seasonal component is eliminated via division. Alternatively expressed:

Seasonally adjusted composition = *Y*_{t} / *S*_{t}

A graph of these two series is provided in the second spreadsheet in the Excel file. Such a graph provides the opportunity to discuss the degree to which a relatively straightforward method can eliminate seasonality via consideration of the extent to which the see-sawing nature of the original non-seasonally adjusted (NSA) series is absent in the seasonally adjusted (SA) version of it.

### 4. Concluding remarks

The present case study has sought to provide a relevant data set with which to apply, discuss and illustrate the nature and implications of time series decomposition. Hopefully the series provides also an example which is of interest and familiar to economics students.

### References

Davidson, J., Hendry, D., Srba, F. and Yeo, S. (1978) ‘Econometric modelling of the aggregate time series relationship between consumer’s expenditure and income in the UK’, *Economic Journal* **88**, 661-692. DOI 10.2307/2231972

Makridakis, S., Wheelwright, S. and Hyndman, R. *Forecasting: Methods and Applications* (3^{rd} edition), New York: Wiley.

- 17749 reads