This season, I will mostly be calculating…
Time series analysis is a means of analysing historic data and is often used within forecasting. For example, sales patterns over the last five years may be used to forecast sales for next year. It is assumed that data recorded over time comprises four factors: the underlying trend; cyclical variations; seasonal variations; and random variations.
The underlying trend represents the overall pattern of the data (for example, ‘sales are increasing year on year’). Cyclical variations are long-term variations caused by factors such as social patterns or economic trends. Random variations are caused by unpredictable factors and as such cannot be accounted for in the time series model but, if significant, may render forecasts unreliable. Seasonal variations are regular, repetitive patterns within the data in the short term (for example, ‘ice cream sales are high in the summer’).
Once an underlying trend has been identified, it can be extrapolated (extended into the future) to help with forecasting. But the forecast will be useless unless seasonal variations are considered.
The first step is to identify seasonal variations from the trend using historic data. These are calculated as actual data – centred trend and recorded separately to come up with an average for each period. So, if the seasonal pattern of sales is by quarter, the seasonal variations may appear thus:
Year | 1/4 | Actual Sales | Centred trend | Seasonal variation |
1998 | 1 | 3,000 | ||
2 | 1,500 | |||
3 | 2,400 | 2,463 | (63) | |
4 | 2,800 | 2,525 | 275 | |
1999 | 1 | 3,300 | 2,582 | 718 |
2 | 1,700 | 2,651 | (951) | |
3 | 2,650 | 2,738 | (88) | |
4 | 3,100 | 2,806 | 294 | |
2000 | 1 | 3,700 | 2,854 | 846 |
2 | 1,840 | 2,923 | (1,083) | |
3 | 2,900 | 3,010 | (110) | |
4 | 3,400 | 3,082 | 318 | |
2001 | 1 | 4,100 | 3,131 | 969 |
2 | 2,010 | 3,194 | (1,184) | |
3 | 3,120 | |||
4 | 3,690 |
The seasonal variations are then averaged for each quarter as follows:
Q1 | Q2 | Q3 | Q4 | Residual | |
1998 | (63) | 275 | |||
1999 | 718 | (951) | (88) | 294 | |
2000 | 846 | (1,083) | (110) | 318 | |
2001 | 969 | (1,184) | |||
Total | 2,533 | (3,218) | (261) | 887 | |
Average | 844 | (1,073) | (87) | 296 | (20) |
Adjust't* | 5 | 5 | 5 | 5 | 20 |
Adjusted Average | 849 | (1,068) | (82) | 301 | 0 |
* Adjustment. A small adjustment is made to the averages to ensure that they sum to zero. This will make little difference to the end result but is necessary as a result of rounding and the random variations present in the data.
The average variations are then combined with the extrapolated trend figures to provide a forecast for 2002 as follows:
Trend | Seasonal variation | Forecast | |
Quarter 1 | 3,394 | 849 | 4,243 |
Quarter 2 | 3,460 | (1,068) | 2,392 |
Quarter 3 | 3,527 | (82) | 3,445 |
Quarter 4 | 3,593 | 301 | 3,894 |
In this example, the additive model has been used to deal with seasonal variations. That is, the differences between actual data and the trend have been expressed as absolute amounts.
An alternative approach, the multiplicative model, considers the seasonal variations in relative or proportional terms. Each difference is expressed as a percentage of the trend and the resulting average percentages are used to adjust the extrapolated trend. So in the example already used, the average seasonal variations would be expressed as in the table below.
Q1 | Q2 | Q3 | Q4 | Residual | |
1998 | -3% | 11% | |||
1999 | 28% | -36% | -3% | 10% | |
2000 | 30% | -37% | -4% | 10% | |
2001 | 31% | -37% | |||
Total | 89% | -110% | -10% | 31% | |
Average | 30% | -37% | -3% | 10% | 0% |
Adjust't* | 0% | 0% | 0% | 0% | 0% |
Adjusted Average | 30% | -37% | -3% | 10% | 0% |
* Adjustment. A small adjustment is made to the averages to ensure that they sum to zero. This will make little difference to the end result but is necessary as a result of rounding and the random variations present in the data.
The extrapolated trend does not change, but the forecast will now be as in the table below.
Trend | Seasonal variation | Forecast | |
Quarter 1 | 3,394 | 30% | 4,412 |
Quarter 2 | 3,460 | -37% | 2,180 |
Quarter 3 | 3,527 | -3% | 3,421 |
Quarter 4 | 3,593 | 10% | 3,952 |
The pattern is similar, but the two models give different results – which is the best method? It depends on the nature of the data. Assuming that the trend is increasing or decreasing, rather than staying constant, the pattern of seasonal variations should be examined more closely. If the absolute level of seasonal variation (for each quarter) remains fairly constant as the trend increases or decreases, the additive model is best. If seasonal variations tend to widen as the trend increases (or narrow as it falls), the multiplicative model is best.
This sounds complex, but is a sensible approach. Look at the data and ask which statement is fairer: "Q1 is always about £849 above the trend" or "Q1 is always about 30 per cent above the trend". Whichever most closely represents the actual variations identified dictates the model to be used.
And whatever method is chosen, the forecast has still been produced from historical data. If it is to be at all reliable, any factors that may change past patterns must be considered. For example, an extensive advertising campaign may help to lift sales. Additionally, the position of the product in its life cycle may change trends, and cyclical (long term) variations may start to have an effect.
Andrew Harrington is a freelance lecturer and writer
AT, October 2003, page 30
