Holt-Winters Exponential SmoothingConsider a time series with observed values X1, X2, ..., XN. The Holt-Winters exponential smoothing model estimates a trend (T) component and a smoothed value (S) by the estimating equations:
St = AXt +
(1
Tt = B(St A and B are smoothing constants with values between 0 and 1. These values must be set by the user. Forecasts are calculated as: XN+h = SN + h TN for h = 1, 2, 3, ... The SHAZAM commands (filename:
The SHAZAM output can be viewed. The figure below gives a plot of the smoothed time series and some forecasts. The figure shows that the time series is characterized by an upward trend.
[SHAZAM Guide home]
SHAZAM output
|_SAMPLE 1 11
|_READ X / BYVAR
1 VARIABLES AND 11 OBSERVATIONS STARTING AT OBS 1
|_GEN1 A=0.7
|_GEN1 B=0.6
|_DIM S 16 T 11
|_SAMPLE 2 2
|_GENR S=X
|_GENR T=X-LAG(X)
|_* Do the recursive computations
|_SET NODOECHO
|_DO #=3,11
|_SAMPLE # #
|_GENR S = A*X + (1-A)*(LAG(S)+LAG(T))
|_GENR T = B*(S-LAG(S)) + (1-B)*LAG(T)
|_ENDO
****** EXECUTION BEGINNING FOR DO LOOP # = 3
****** EXECUTION FINISHED FOR DO LOOP #= 11
|_* Print the results
|_SAMPLE 1 11
|_PRINT X S T
X S T
133.0000 0.0000000 0.0000000
155.0000 155.0000 22.00000
165.0000 168.6000 16.96000
171.0000 175.3680 10.84480
194.0000 191.6638 14.11542
231.0000 223.4338 24.70813
274.0000 266.2426 35.56853
312.0000 308.9433 39.84787
313.0000 323.7374 24.81556
333.0000 337.6659 18.28334
343.0000 346.8848 12.84467
|_* Forecasting
|_SAMPLE 12 16
|_GENR OBS=TIME(0)-11
|_GENR S = S:11 + OBS*T:11
|_PRINT OBS S
OBS S
1.000000 359.7294
2.000000 372.5741
3.000000 385.4188
4.000000 398.2634
5.000000 411.1081
|_STOP
[SHAZAM Guide home]
|