Deseasonalizing Deseasonalizing a Time Series Seasonality in a time series can be identified by regularly spaced peaks and troughs which have a consistent direction and approximately the same magnitude every year, relative to the trend. The graph below, that of a retailer, shows a strongly seasonal series. In the fourth quarter each year, sales increase due to holiday shopping. In this example, the magnitude of the seasonal component increases over time, as does the trend.
Sales in Millions By Quarter 2000-2003 $100 $90 $80 $70 $60 $50 $40 $30 $20 $10 0 0 1 1 2 2 3 3 0 0 1 1 2 2 3 3 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 t r t r t r t r t r t r t r t r t r t r t r t r t r t r t r t r Q t Q Q Q Q t Q Q Q Q t Q Q Q Q t Q d Q r d Q t d t d t d t h d h d h d h s 1 2 n 3 1 s 2 n 3 r 1 s 2 n 3 r 1 s 2 n 3 r 4 4 4 4
A time series can be deseasonalized when only a seasonal component is present, or when both seasonal and trend components are present. present. This is a two-step process: process: 1.
Compute seasonal/irregular indexes and use them to deseasonalize the data;
2.
Use regression analysis on the remaining trend data if a trend is apparent in it.
© 2009 HOCK international
1
The following data are the sales data in millions of dollars by quarter illustrated on the preceding graph: 1st Qtr 2000 2nd Qtr 2000 3rd Qtr 2000 4th Qtr 2000 1st Qtr 2001 2nd Qtr 2001 3rd Qtr 2001 4th Qtr 2001 1st Qtr 2002 2nd Qtr 2002 3rd Qtr 2002 4th Qtr 2002 1st Qtr 2003 2nd Qtr 2003 3rd Qtr 2003 4th Qtr 2003
20 24 28 65 24 29 35 80 23 27 36 85 25 27 37 95
Step 1: Compute moving averages to isolate the seasonal and irregular components: We compute moving averages for each period, using the four most recent quarters for each one. Here are the first two calculations: First moving average, which is the average quarterly sales for the year 2000: 20 + 24 + 28 + 65
=
34.25
4
Second moving average, which includes the 2nd, 3rd, and 4th quarters of 2000 and the 1st quarter of 2001: 24 + 28 + 65 + 24
=
35.25
4
© 2009 HOCK international
2
Here are the calculated moving averages for all the periods: Quarter 1st Qtr 2000 2nd Qtr 2000 3rd Qtr 2000 4th Qtr 2000 1st Qtr 2001 2nd Qtr 2001 3rd Qtr 2001 4th Qtr 2001 1st Qtr 2002 2nd Qtr 2002 3rd Qtr 2002 4th Qtr 2002 1st Qtr 2003 2nd Qtr 2003 3rd Qtr 2003 4th Qtr 2003
Sales
Moving Avg
20 24 28 65 24 29 35 80 23 27 36 85 25 27 37 95
34.25 35.25 36.50 38.25 42.00 41.75 41.25 41.50 42.75 43.25 43.25 43.50 46.00
Step 2: Compute centered moving averages to determine moving average values for specific quarters: The moving averages above represent average quarterly sales for each of the four quarters they cover. However, for analysis purposes, we need to associate each moving average with only one quarter, not four quarters. Intuitively, we would associate the first year’s moving average with the middle of the year that it covers. However, the first moving average, 34.25, corresponds to the last half of the 2nd quarter of 2000 and the first half of the 3 rd quarter of 2000. The second moving average of 35.25 corresponds to the last half of the 3rd quarter of 2000 and the first half of the 4th quarter of 2000. In order to make the moving averages correspond to the quarters they cover, we use the midpoints (i.e., averages) of successive moving averages. Since 34.25 corresponds to the first half of the 3rd quarter of 2000 and 35.25 corresponds to the last half of the 3rd quarter of 2000, the average of the two amounts will give us the moving average for the entire 3rd quarter of 2000. This average is called the centered moving average. The centered moving average represents what the value of the time series would be without seasonal or irregular influences.
© 2009 HOCK international
3
The chart, with centered moving averages added, is as follows:
Quarter
Sales
1st Qtr 2000 2nd Qtr 2000 3rd Qtr 2000 4th Qtr 2000 1st Qtr 2001 2nd Qtr 2001 3rd Qtr 2001 4th Qtr 2001 1st Qtr 2002 2nd Qtr 2002 3rd Qtr 2002 4th Qtr 2002 1st Qtr 2003 2nd Qtr 2003 3rd Qtr 2003 4th Qtr 2003
20 24 28 65 24 29 35 80 23 27 36 85 25 27 37 95
Moving Average
34.25 35.25 36.50 38.25 42.00 41.75 41.25 41.50 42.75 43.25 43.25 43.50 46.00
Centered Moving Avg
34.75 35.88 37.38 40.13 41.88 41.50 41.38 42.13 43.00 43.25 43.88 44.75
The centered moving averages smooth out the seasonal and irregular fluctuations in the time series. Step 3: Calculate the seasonal-irregular effect in the time series by dividing each quar ter’s Sales figure by its corresponding Centered Moving Average: By dividing each time series value by its corresponding centered moving average value, we identify the seasonal-irregular effect in the time series.
© 2009 HOCK international
4
The table below adds the seasonal-irregular values:
Quarter
Sales
1st Qtr 2000 2nd Qtr 2000 3rd Qtr 2000 4th Qtr 2000 1st Qtr 2001 2nd Qtr 2001 3rd Qtr 2001 4th Qtr 2001 1st Qtr 2002 2nd Qtr 2002 3rd Qtr 2002 4th Qtr 2002 1st Qtr 2003 2nd Qtr 2003 3rd Qtr 2003 4th Qtr 2003
20 24 28 65 24 29 35 80 23 27 36 85 25 27 37 95
Moving Average
34.25 35.25 36.50 38.25 42.00 41.75 41.25 41.50 42.75 43.25 43.25 43.50 46.00
Centered Moving Avg
34.75 35.88 37.38 40.13 41.88 41.50 41.38 42.13 43.00 43.25 43.88 44.75
SeasonalIrregular Value
.806 [28 ÷ 34.75] 1.812 [65 ÷ 35.88] .642 [24 ÷ 37.38] .723 etc. .836 1.928 .556 .641 .837 1.965 .570 .603
Step 4: Calculate the seasonal effect by averaging the Seasonal-Irregular Values of all the first quarters, all the second quarters, all the third quarters, and all the fourth quarters to calculate the Seasonal Index for each quarter: Seasonal index for 1st quarter:
.642 + .556 + .570 3
= .589
Seasonal index for 2nd quarter:
.723 + .641 + .603 3
= .656
Seasonal index for 3rd quarter:
.806 + .836 + .837 3
= .826
Seasonal index for 4th quarter:
1.812 + 1.928 + 1.965 3
© 2009 HOCK international
= 1.902
5
Step 5: Deseasonalize the Time Series by dividing each time series value by its corresponding seasonal index to remove the effect of seasonality:
Quarter
Sales
1st Qtr 2000 2nd Qtr 2000 3rd Qtr 2000 4th Qtr 2000 1st Qtr 2001 2nd Qtr 2001 3rd Qtr 2001 4th Qtr 2001 1st Qtr 2002 2nd Qtr 2002 3rd Qtr 2002 4th Qtr 2002 1st Qtr 2003 2nd Qtr 2003 3rd Qtr 2003 4th Qtr 2003
20 24 28 65 24 29 35 80 23 27 36 85 25 27 37 95
Seasonal Index .589 .656 .826 1.902 .589 .656 .826 1.902 .589 .656 .826 1.902 .589 .656 .826 1.902
Deseasonalized Sales (Sales ÷ Seas. Index) 33.96 36.59 33.90 34.17 40.75 44.21 42.37 42.06 39.05 41.16 43.58 44.69 42.44 41.16 44.79 49.95
Step 6: Graph the deseasonalized sales to determine if there is a trend component to the data. The plotted deseasonalized data with a trend line appears below.
Sales in Millions By Quarter 2000-2003 $100 $90 $80 $70 $60 $50 $40 $30 $20 $10 0 0 0 1 1 1 2 2 2 3 3 3 0 1 2 3 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 0 0 2 t r t r t r t r t r t r t r t r t r t r t r t r t r t r t r t r Q t Q Q Q Q t Q Q Q Q t Q Q Q Q t Q d Q r d Q t d d t d d t d d t h h h h s 1 2 n 3 1 s 2 n 3 r 1 s 2 n 3 r 1 s 2 n 3 r 4 4 4 4
© 2009 HOCK international
6
Over the past four years, the company has experienced a slight growth in sales per quarter. We can use this trend to develop a forecast for future quarters. However, this forecast will not include the seasonal and irregular components. Step 7: Use the seasonal index to adjust the trend projection for the seasonal and irregular influences. Here is the trend line with the forecast, not including the seasonal and irregular components:
Sales in Millions By Quarter 2000-2003 $100 $90 $80
y = 0.7625x + 34.445
$70 $60 $50 $40 $30 $20 $10 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 2 0 2 0 2 0 2 0 3 0 3 0 3 0 3 0 4 0 4 0 4 0 4 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 2 0 t r t r t r t r t r t r t r t r t r t r t r t r t r t r t r t r t r t r t r t r Q t Q Q Q Q t Q Q Q Q t Q Q Q Q t Q Q Q Q t Q d Q d Q t d d t h s h s n d r d t h s n d r d t h s n d r d t h 1 s 2 n 3 r 4 1 2 n 3 r 4 1 2 1 2 1 2 4 4 4 3 3 3
The slope of the trend line of .7625 indicates that the company has experienced an average deseasonalized sales growth of about $762,500 per quarter. The actual sales for 2000 through 2003 and forecasted sales for Quarters 1 through 4 of 2004 calculated using Least Squares analysis, are as follows:
© 2009 HOCK international
7
Quarter
Sales
1st Qtr 2000 2nd Qtr 2000 3rd Qtr 2000 4th Qtr 2000 1st Qtr 2001 2nd Qtr 2001 3rd Qtr 2001 4th Qtr 2001 1st Qtr 2002 2nd Qtr 2002 3rd Qtr 2002 4th Qtr 2002 1st Qtr 2003 2nd Qtr 2003 3rd Qtr 2003 4th Qtr 2003
20 24 28 65 24 29 35 80 23 27 36 85 25 27 37 95
Seasonal Index .589 .656 .826 1.902 .589 .656 .826 1.902 .589 .656 .826 1.902 .589 .656 .826 1.902
Trend Forecasts: 1st Qtr 2004 2nd Qtr 2004 3rd Qtr 2004 4th Qtr 2004
Deseasonalized Sales 33.96 36.59 33.90 34.17 40.75 44.21 42.37 42.06 39.05 41.16 43.58 44.69 42.44 41.16 44.79 49.95
47.4085 48.1710 48.9336 49.6961
If we subtract the third quarter forecast from the fourth quarter forecast, the 2nd quarter from the 3rd quarter, and the 1st quarter from the 2nd quarter, we will see that the difference is .7625, or $762,500. (Since the forecasted sales are all on the trend line and the deseasonalized actual sales are not, we will not see the same difference between the 1 st quarter 2004 sales forecast and the 4th quarter 2003 deseasonalized actual sales. We can observe this on the graph, as well.) Now, we adjust the four quarterly forecasts for the seasonal effect by multiplying each forecast based on the trend by the seasonal index appropriate for its quarter, and we have our quarterly forecasts, incorporating the seasonal and irregular components, as follows:
Quarter
Trend Forecast
1st Qtr 2004 2nd Qtr 2004 3rd Qtr 2004 4th Qtr 2004
47.4085 48.1710 48.9336 49.6961
© 2009 HOCK international
Seasonal Index .589 .656 .826 1.902
Quarterly Forecast 27.92 31.60 40.42 94.52
8