DeSeasonalizing a Time Series

Embed Size (px)

Citation preview

  • 8/8/2019 DeSeasonalizing a Time Series

    1/8

    2009 HOCK international 1

    Deseasonalizing a Time Series

    Seasonality in a time series can be identified by regularly spaced peaks and troughs which have aconsistent direction and approximately the same magnitude every year, relative to the trend. Thegraph below, that of a retailer, shows a strongly seasonal series. In the fourth quarter each year, salesincrease due to holiday shopping. In this example, the magnitude of the seasonal componentincreases over time, as does the trend.

    Sales in Millions By Quarter 2000-2003

    $10

    $20

    $30

    $40

    $50

    $60

    $70

    $80

    $90

    $100

    1 s t Q

    t r 2 0

    0 0

    2 n d

    Q t r 2

    0 0 0

    3 r d Q

    t r 2 0

    0 0

    4 t h

    Q t r 2

    0 0 0

    1 s t Q

    t r 2 0

    0 1

    2 n d

    Q t r 2

    0 0 1

    3 r d Q

    t r 2 0

    0 1

    4 t h

    Q t r 2

    0 0 1

    1 s t Q

    t r 2 0

    0 2

    2 n d

    Q t r 2

    0 0 2

    3 r d Q

    t r 2 0

    0 2

    4 t h

    Q t r 2

    0 0 2

    1 s t Q

    t r 2 0

    0 3

    2 n d

    Q t r 2

    0 0 3

    3 r d Q

    t r 2 0

    0 3

    4 t h

    Q t r 2

    0 0 3

    A time series can be deseasonalized when only a seasonal component is present, or when bothseasonal and trend components are present. This is a two-step 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.

  • 8/8/2019 DeSeasonalizing a Time Series

    2/8

    2009 HOCK international 2

    The following data are the sales data in millions of dollars by quarter illustrated on the precedinggraph:

    1st Qtr 2000 202nd Qtr 2000 243rd Qtr 2000 284th Qtr 2000 651st Qtr 2001 242nd Qtr 2001 293rd Qtr 2001 354th Qtr 2001 801st Qtr 2002 232nd Qtr 2002 273rd Qtr 2002 364th Qtr 2002 851st Qtr 2003 252nd Qtr 2003 273rd Qtr 2003 374th Qtr 2003 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. Hereare 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 2 nd , 3 rd , and 4 th quarters of 2000 and the 1 st quarter of 2001:

    24 + 28 + 65 + 24 = 35.25

    4

  • 8/8/2019 DeSeasonalizing a Time Series

    3/8

    2009 HOCK international 3

    Here are the calculated moving averages for all the periods:

    Quarter Sales Moving Avg

    1st Qtr 2000 202nd Qtr 2000 24

    3rd Qtr 2000 284th Qtr 2000 65 34.251st Qtr 2001 24 35.252nd Qtr 2001 29 36.503rd Qtr 2001 35 38.254th Qtr 2001 80 42.001st Qtr 2002 23 41.752nd Qtr 2002 27 41.253rd Qtr 2002 36 41.504th Qtr 2002 85 42.751st Qtr 2003 25 43.252nd Qtr 2003 27 43.25

    3rd Qtr 2003 37 43.504th Qtr 2003 95 46.00

    Step 2: Compute centered moving averages to determine moving average values forspecific quarters:

    The moving averages above represent average quarterly sales for each of the four quarters theycover. However, for analysis purposes, we need to associate each moving average with only onequarter, not four quarters. Intuitively, we would associate the first years moving average with themiddle of the year that it covers. However, the first moving average, 34.25, corresponds to the lasthalf of the 2 nd quarter of 2000 and the first half of the 3 rd quarter of 2000. The second movingaverage of 35.25 corresponds to the last half of the 3 rd quarter of 2000 and the first half of the 4 th

    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 3 rd quarter of 2000 and 35.25 corresponds to the last half of the 3 rd quarter of 2000, the average of thetwo amounts will give us the moving average for the entire 3 rd quarter of 2000. This average is calledthe centered moving average . The centered moving average represents what the value of the timeseries would be without seasonal or irregular influences.

  • 8/8/2019 DeSeasonalizing a Time Series

    4/8

    2009 HOCK international 4

    The chart, with centered moving averages added, is as follows:

    Moving CenteredQuarter Sales Average Moving Avg

    1st Qtr 2000 202nd Qtr 2000 243rd Qtr 2000 28 34.754th Qtr 2000 65 34.25 35.881st Qtr 2001 24 35.25 37.382nd Qtr 2001 29 36.50 40.133rd Qtr 2001 35 38.25 41.884th Qtr 2001 80 42.00 41.501st Qtr 2002 23 41.75 41.382nd Qtr 2002 27 41.25 42.133rd Qtr 2002 36 41.50 43.004th Qtr 2002 85 42.75 43.251st Qtr 2003 25 43.25 43.882nd Qtr 2003 27 43.25 44.753rd Qtr 2003 37 43.504th Qtr 2003 95 46.00

    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 ters

    Sales figure by its corresponding Centered Moving Average:

    By dividing each time series value by its corresponding centered moving average value, we identifythe seasonal-irregular effect in the time series.

  • 8/8/2019 DeSeasonalizing a Time Series

    5/8

    2009 HOCK international 5

    The table below adds the seasonal-irregular values:

    Seasonal-Moving Centered Irregular

    Quarter Sales Average Moving Avg Value

    1st Qtr 2000 202nd Qtr 2000 243rd Qtr 2000 28 34.75 .806 [28 34.75]4th Qtr 2000 65 34.25 35.88 1.812 [65 35.88]1st Qtr 2001 24 35.25 37.38 .642 [24 37.38]2nd Qtr 2001 29 36.50 40.13 .723 etc.3rd Qtr 2001 35 38.25 41.88 .8364th Qtr 2001 80 42.00 41.50 1.9281st Qtr 2002 23 41.75 41.38 .5562nd Qtr 2002 27 41.25 42.13 .6413rd Qtr 2002 36 41.50 43.00 .8374th Qtr 2002 85 42.75 43.25 1.965

    1st Qtr 2003 25 43.25 43.88 .5702nd Qtr 2003 27 43.25 44.75 .6033rd Qtr 2003 37 43.504th Qtr 2003 95 46.00

    Step 4: Calculate the seasonal effect by averaging the Seasonal-Irregular Values of all thefirst quarters, all the second quarters, all the third quarters, and all the fourth quarters tocalculate the Seasonal Index for each quarter:

    Seasonal index for 1 st quarter: .642 + .556 + .570 = .5893

    Seasonal index for 2 nd quarter: .723 + .641 + .603 = .6563

    Seasonal index for 3 rd quarter: .806 + .836 + .837 = .8263

    Seasonal index for 4 th quarter: 1.812 + 1.928 + 1.965 = 1.9023

  • 8/8/2019 DeSeasonalizing a Time Series

    6/8

    2009 HOCK international 6

    Step 5: Deseasonalize the Time Series by dividing each time series value by itscorresponding seasonal index to remove the effect of seasonality:

    Deseasonal-ized Sales

    Seasonal (Sales Quarter Sales Index Seas. Index)

    1st Qtr 2000 20 .589 33.962nd Qtr 2000 24 .656 36.593rd Qtr 2000 28 .826 33.904th Qtr 2000 65 1.902 34.171st Qtr 2001 24 .589 40.752nd Qtr 2001 29 .656 44.213rd Qtr 2001 35 .826 42.374th Qtr 2001 80 1.902 42.061st Qtr 2002 23 .589 39.05

    2nd Qtr 2002 27 .656 41.163rd Qtr 2002 36 .826 43.584th Qtr 2002 85 1.902 44.691st Qtr 2003 25 .589 42.442nd Qtr 2003 27 .656 41.163rd Qtr 2003 37 .826 44.794th Qtr 2003 95 1.902 49.95

    Step 6: Graph the deseasonalized sales to determine if there is a trend component to thedata.

    The plotted deseasonalized data with a trend line appears below.

    Sales in Millions By Quarter 2000-2003

    $10

    $20

    $30$40

    $50

    $60

    $70

    $80

    $90

    $100

    1 s t Q

    t r 2 0

    0 0

    2 n d Q

    t r 2 0

    0 0

    3 r d Q

    t r 2 0

    0 0

    4 t h

    Q t r 2

    0 0 0

    1 s t Q

    t r 2 0

    0 1

    2 n d Q

    t r 2 0

    0 1

    3 r d Q

    t r 2 0

    0 1

    4 t h

    Q t r 2

    0 0 1

    1 s t Q

    t r 2 0

    0 2

    2 n d Q

    t r 2 0

    0 2

    3 r d Q

    t r 2 0

    0 2

    4 t h

    Q t r 2

    0 0 2

    1 s t Q

    t r 2 0

    0 3

    2 n d Q

    t r 2 0

    0 3

    3 r d Q

    t r 2 0

    0 3

    4 t h

    Q t r 2

    0 0 3

  • 8/8/2019 DeSeasonalizing a Time Series

    7/8

    2009 HOCK international 7

    Over the past four years, the company has experienced a slight growth in sales per quarter. We canuse this trend to develop a forecast for future quarters. However, this forecast will not include theseasonal 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

    y = 0.7625x + 34.445

    $10

    $20

    $30

    $40

    $50

    $60

    $70

    $80

    $90

    $100

    1 s t Q

    t r 2 0

    0 0

    2 n d Q

    t r 2 0

    0 0

    3 r d Q

    t r 2 0

    0 0

    4 t h Q t r

    2 0 0 0

    1 s t Q

    t r 2 0

    0 1

    2 n d Q

    t r 2 0

    0 1

    3 r d Q

    t r 2 0

    0 1

    4 t h Q t r

    2 0 0 1

    1 s t Q

    t r 2 0

    0 2

    2 n d Q

    t r 2 0

    0 2

    3 r d Q

    t r 2 0

    0 2

    4 t h Q t r

    2 0 0 2

    1 s t Q

    t r 2 0

    0 3

    2 n d Q

    t r 2 0

    0 3

    3 r d Q

    t r 2 0

    0 3

    4 t h Q t r

    2 0 0 3

    1 s t Q

    t r 2 0

    0 4

    2 n d Q

    t r 2 0

    0 4

    3 r d Q

    t r 2 0

    0 4

    4 t h Q t r

    2 0 0 4

    The slope of the trend line of .7625 indicates that the company has experienced an averagedeseasonalized sales growth of about $762,500 per quarter. The actual sales for 2000 through 2003and forecasted sales for Quarters 1 through 4 of 2004 calculated using Least Squares analysis, are asfollows:

  • 8/8/2019 DeSeasonalizing a Time Series

    8/8

    2009 HOCK international 8

    Seasonal Deseasonal-Quarter Sales Index ized Sales

    1st Qtr 2000 20 .589 33.962nd Qtr 2000 24 .656 36.593rd Qtr 2000 28 .826 33.90

    4th Qtr 2000 65 1.902 34.171st Qtr 2001 24 .589 40.752nd Qtr 2001 29 .656 44.213rd Qtr 2001 35 .826 42.374th Qtr 2001 80 1.902 42.061st Qtr 2002 23 .589 39.052nd Qtr 2002 27 .656 41.163rd Qtr 2002 36 .826 43.584th Qtr 2002 85 1.902 44.691st Qtr 2003 25 .589 42.442nd Qtr 2003 27 .656 41.163rd Qtr 2003 37 .826 44.79

    4th Qtr 2003 95 1.902 49.95

    Trend Forecasts:1 st Qtr 2004 47.40852 nd Qtr 2004 48.17103 rd Qtr 2004 48.93364 th Qtr 2004 49.6961

    If we subtract the third quarter forecast from the fourth quarter forecast, the 2 nd quarter from the 3 rd quarter, and the 1 st quarter from the 2 nd 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 1st

    quarter 2004 sales forecast and the 4th

    quarter 2003deseasonalized 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 forecastbased on the trend by the seasonal index appropriate for its quarter, and we have ourquarterly forecasts, incorporating the seasonal and irregular components, as follows:

    Trend Seasonal Quarterly Quarter Forecast Index Forecast

    1 st Qtr 2004 47.4085 .589 27.922 nd Qtr 2004 48.1710 .656 31.603 rd Qtr 2004 48.9336 .826 40.424 th Qtr 2004 49.6961 1.902 94.52