Upload
joel-harris
View
224
Download
0
Embed Size (px)
Citation preview
MOVING AVERAGES AND EXPONENTIAL
SMOOTHING
• Forecasting methods:– Averaging methods.
• Equally weighted observations– Exponential Smoothing methods.
• Unequal set of weights to past data, where the weights decay exponentially from the most recent to the most distant data points.
• These parameters (with values between 0 and 1) will determine the unequal weights to be applied to past data.
Introduction
• Averaging methods– If a time series is generated by a constant process
subject to random error, then mean is a useful statistic and can be used as a forecast for the next period.
– Averaging methods are suitable for stationary time series data where the series is in equilibrium around a constant value ( the underlying mean) with a constant variance over time.
Introduction
• Exponential smoothing methods– The simplest exponential smoothing method is the single
smoothing (SES) method where only one parameter needs to be estimated
– Holt’s method makes use of two different parameters and allows forecasting for series with trend.
– Holt-Winters’ method involves three smoothing parameters to smooth the data, the trend and the seasonal index.
Introduction
• The Mean– Uses the average of all the historical data as the forecast
– When new data becomes available , the forecast for time t+2 is the new mean including the previously observed data plus this new observation.
– This method is appropriate when there is no noticeable trend or seasonality.
Averaging Methods
t
iit y
tF
11
1
1
12 1
1 t
iit y
tF
• The moving average for time period t is the mean of the k most recent observations.
• The constant number k is specified at the outset.
• The smaller the number k, the more weight is given to recent periods.
• The greater the number k, the less weight is given to more recent periods.
Averaging Methods
• A large k is desirable when there are wide, infrequent fluctuations in the series.
• A small k is most desirable when there are sudden shifts in the level of series.
• For quarterly data, a four-quarter moving average, MA(4), eliminates or averages out seasonal effects.
Single Moving Averages
• For monthly data, a 12-month moving average, MA(12), eliminate or averages out seasonal effect.
• Equal weights are assigned to each observation used in the average.
• Each new data point is included in the average as it becomes available, and the oldest data point is discarded.
Single Moving Averages
• A moving average of order k, MA(k) is the value of k consecutive observations.
– k is the number of terms in the moving average.
• The moving average model does not handle trend or seasonality very well although it can do better than the total mean.
Single Moving Averages
t t 1 t 2 t k 1t 1 t 1
t
t 1 ii t k 1
(y y y y )ˆF y
k1
F yk
Example: Weekly Department Store Sales
• The weekly sales figures (in millions of dollars) presented in the following table are used by a major department store to determine the need for temporary sales personnel.
Period (t) Sales (y)1 5.32 4.43 5.44 5.85 5.66 4.87 5.68 5.69 5.410 6.511 5.112 5.813 514 6.215 5.616 6.717 5.218 5.519 5.820 5.121 5.822 6.723 5.224 625 5.8
Weekly Sales
0
1
2
3
4
5
6
7
8
0 5 10 15 20 25 30
Weeks
Sale
s
Sales (y)
Example: Weekly Department Store Sales
• Use a three-week moving average (k=3) for the department store sales to forecast for the week 24 and 26.
• The forecast error is
Example: Weekly Department Store Sales
23 22 2124
(y y y ) 5.2 6.7 5.8y 5.9
3 3
24 24 24ˆe y y 6 5.9 .1
• The forecast for the week 26 is
Example: Weekly Department Store Sales
25 24 2326
y y y 5.8 6 5.2y 5.7
3 3
Example: Weekly Department Store Sales
• RMSE = 0.63Period (t) Sales (y) forecast
1 5.32 4.43 5.44 5.8 5.0333335 5.6 5.26 4.8 5.67 5.6 5.48 5.6 5.3333339 5.4 5.33333310 6.5 5.53333311 5.1 5.83333312 5.8 5.66666713 5 5.814 6.2 5.315 5.6 5.66666716 6.7 5.617 5.2 6.16666718 5.5 5.83333319 5.8 5.820 5.1 5.521 5.8 5.46666722 6.7 5.56666723 5.2 5.86666724 6 5.925 5.8 5.966667
5.666667
Weekly Sales Forecasts
0
1
2
3
4
5
6
7
8
0 5 10 15 20 25 30
Weeks
Sales
Sales (y)
forecast
Double Moving Average• Given the data
(1) (2) (3) (4) (5) (6) (7)
Period Data MA(3) Error (2)-(3)
MA(3x3) Error (3)-(5)
Forecasting (3)+(6)+trend
1 22 43 6 4 24 8 6 25 10 8 2 6 26 12 10 2 8 2 127 14 12 2 10 2 148 16 14 2 12 2 169 18 16 2 14 2 1810 20 18 2 16 2 2011 22
Double Moving Average
• Forecasting procedure:– Using single moving average at time t (St’)– Fitting: the difference between single moving
average and double moving average at time t (St’ – St’’)
– Fitting: trend from t period to t+1 period (or to t+m period if we want to forecast m period)
Double Moving Average
• Generally, the procedure of double moving average given as bellow:
' t t 1 t 2 t k 1t
'' t t 1 t 2 t k 1t
' ' '' ' ''t t t t t t
' ''t t t
t m t t
X X X ... XS
kS S S ... S
Sk
a S S S 2S S
2b S S
k 1F a b m