excel
Exponential smoothing methods rely on the assumption that data are stationary with slowly varying mean (gradually evolves over time). Furthermore, more recent observations play a greater role than those in the distant past. Estimates are revised continuously as new information becomes available.
Single Exponential Smoothing
t+1 = αYt + (1- α) t, where the smoothing constant is a positive fraction 0 < α < 1.
Rearranging we get, t+1 = t + α (Yt - t). In other words, next period’s forecast is current forecast plus the correction factor proportional to the current error in forecasting. Thus, successive forecasts are based on the learning/adjustment process based on the errors made in forecasting. The smoothing factor is arbitrarily selected. If α is large (near 1), then large weight is given to recent values and very low weight to distant past. The smoothing of the series is relatively small (small damping factor). If α is near zero, significant weight is given to a series of distant past values and very low weight to recent values. The damping factor is very large, and the smoothing of the series is extreme (damping all fluctuations).
Several smoothing factors can be tried, and the best α value selected by error comparison. We do so for two values below using Excel Exponential smoothing function: Data→ Data analysis → Exponential smoothing. Fill the dialogue box for α = 0.1 with damping factor 1 - α = 0.9. For α 0.7 the damping factor is 0.3. The plots the two forecasts follow (select chart in the dialogue box). The second period forecast is simply taken as the first year actual by the Excel program. We can use the average of the series of average of first few observations as the forecast for the first period or use a forecast for this period available from previous research. But the influence of the choice of initial forecast dies down after a few periods. The sum of Squares at the bottom is obtained using the Excel “Sumsq” function.
|
Year-q |
Period (t) |
Yt |
(0.1) |
et(.1) |
(0.7) |
et(.7) |
|
|
2000-q1 |
1 |
50 |
|
|
|
|
|
|
2000-q2 |
2 |
35 |
50.00 |
-15.00 |
50 |
-15 |
|
|
2000-q3 |
3 |
25 |
48.50 |
-23.50 |
39.5 |
-14.5 |
|
|
2000-q4 |
4 |
40 |
46.15 |
-6.15 |
29.35 |
10.65 |
|
|
2001-q1 |
5 |
45 |
45.54 |
-0.53 |
36.805 |
8.195 |
|
|
2001-q2 |
6 |
35 |
45.48 |
-10.48 |
42.5415 |
-7.5415 |
|
|
2001-q3 |
7 |
20 |
44.43 |
-24.43 |
37.26245 |
-17.2625 |
|
|
2001-q4 |
8 |
30 |
41.99 |
-11.99 |
25.17874 |
4.821265 |
|
|
2002-q1 |
9 |
35 |
40.79 |
-5.79 |
28.55362 |
6.44638 |
|
|
2002-q2 |
10 |
20 |
40.21 |
-20.21 |
33.06609 |
-13.0661 |
|
|
2002-q3 |
11 |
15 |
38.19 |
-23.19 |
23.91983 |
-8.91983 |
|
|
2002-q4 |
12 |
40 |
35.87 |
4.13 |
17.67595 |
22.32405 |
|
|
2003-q1 |
13 |
55 |
36.28 |
18.72 |
33.30278 |
21.69722 |
|
|
2003-q2 |
14 |
35 |
38.16 |
-3.16 |
48.49084 |
-13.4908 |
|
|
2003-q3 |
15 |
25 |
37.84 |
-12.84 |
39.04725 |
-14.0473 |
|
|
2003-q4 |
16 |
55 |
36.56 |
18.44 |
29.21418 |
25.78582 |
|
|
2004-q1 |
17 |
55 |
38.40 |
16.60 |
47.26425 |
7.735747 |
|
|
2004-q2 |
18 |
40 |
40.06 |
-0.06 |
52.67928 |
-12.6793 |
|
|
2004-q3 |
19 |
35 |
40.05 |
-5.05 |
43.80378 |
-8.80378 |
|
|
2004-q4 |
20 |
60 |
39.55 |
20.45 |
37.64113 |
22.35887 |
|
|
2005-q1 |
21 |
75 |
41.59 |
33.41 |
53.29234 |
21.70766 |
|
|
2005-q2 |
22 |
50 |
44.93 |
5.07 |
68.4877 |
-18.4877 |
|
|
2005-q3 |
23 |
40 |
45.44 |
-5.44 |
55.54631 |
-15.5463 |
|
|
2005-q4 |
24 |
65 |
44.90 |
20.10 |
44.66389 |
20.33611 |
|
|
2006-q1 |
25 |
85 |
46.91 |
38.09 |
58.89917 |
26.10083 |
|
|
|
|
|
50.72 |
|
77.16975 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7273.85 |
77.16975 |
6246.7 |
|
|
|
|
|
|
Sum of sq |
|
Sum of Sq |
|
|
|
|
|
|
MSE= 7273.85/24 = |
MSE = 6246.7/24 |
||
|
|
|
|
|
303 |
|
260 |
|
By comparing the errors from the two forecasts we find the smoothing factor 0.7 not only captures the fluctuations in the data much better but also has lower MSE. Moreover, the errors for α = 0.1 have a strange pattern, mostly negative for the first half and mostly positive for the second half. On the other, hand the errors for α = 0.7 seem to have relatively random fluctuations around zero, although the variance seems increasing towards the end. In Excel we can use Solver program to search for the α value which produces the smallest overall error (like MSE). I will skip this topic here.
Holt’s (Two-parameter) Linear Exponential Smoothing Method
Holt’s (two-parameter) smoothing technique is designed to better handle data with well- defined (significant) trend compared to the single (simple) exponential smoothing. Holt’s method allows for evolving local linear trends in a time series. Holt’s technique smooths the level and slope directly by using different smoothing constant for each. These smoothing constants provide estimates of level and slope that adapt over time as new observations become available. Holt’s technique provides a great deal of flexibility (compared to other methods like Brown’s double exponential smoothing) in selecting the rates of tracking the level and trend. Three equations are used in this method:
(1) The current level estimate Lt = αYt + (1- α)(Lt-1 + Tt-1)
(2) The Trend estimate Tt = β(Lt – Lt-1) + (1- β) Tt-1
(3) The forecast for p periods into the future t+p = Lt + p Tt, where
Lt = the new smoothed value (estimate of current level)
α = the smoothing constant for the level (0 < α < 1)
β = the smoothing constant for the trend estimate (0 < β < 1)
Tt = the trend estimate
Yt = actual observation at period t
t+p = the forecast for p periods into the future
In the special case where α = β, the Holt’s technique is the same as Brown’s double exponential smoothing.
Let us use the same example we used for single smoothing with α = 0.4 and β = 0.3 (Suppose I typed these values in cells J4 and J5). You could simply type the values 0.4 and 0.3 in place of $J$4 and $J$5 in the Excel formulas below. The benefit of using fixed cell values like $J$4 is that you could change those cell value and get a new set of results for different α and β.
Initial values of L and T
To begin the algorithm, the initial L1 is generally set as Y1, and the initial trend value T1 is
[(Y2 – Y1)/2 + (Y4 -Y3)/2] = 0. The Excel formula I used is =(C3-C2)/2+(C5-C4)/2
The first row has labels and data starts from second row. Therefore, L2 appears in the third row and L1 and T1 appear in second row.
The Algorithm Now the algorithm can start according to the equations 1-3 above.
L2 = 0.4(Y2) + (1-0.4)(L2-1 + T2-1) = 0.4(35) + 0.6(50 + 0) = 44→The Excel formula is =$J$4*C3+(1-$J$4)*(D2+E2)
T2 = β(Lt – Lt-1) + (1- β) Tt-1 = 0.3(L2 – L1) + 0.7T1 = 0.3(44 - 50) + 0.7(0) = -1.8→ The Excel formula is =($J$5*(D3-D2)+(1-$J$5)*E2)
t+p = Lt + p Tt for one period ahead forecast, p = 1 and t+p = Lt + Tt
2 = L1 + T1 = 50+ 0 = 50 → the Excel formula is =D2+E2
e2 = Y2 - 2 = 35 – 50 = -15 → the Excel formula is =C3-F3
Successive values are calculated in a similar fashion by copying the formula in successive rows. You can copy all four formulas together by selecting the four cells in the third row and dragging down the corner. The result is the table below:
|
Year-q |
Quarters (t) |
Yt |
Lt |
Tt |
(t+1) |
et |
|
2000-q1 |
1 |
50 |
50.00 |
0.00 |
50.00 |
0.00 |
|
2000-q2 |
2 |
35 |
44.00 |
-1.80 |
50.00 |
-15.00 |
|
2000-q3 |
3 |
25 |
35.32 |
-3.86 |
42.20 |
-17.20 |
|
2000-q4 |
4 |
40 |
34.87 |
-2.84 |
31.46 |
8.54 |
|
2001-q1 |
5 |
45 |
37.22 |
-1.28 |
32.03 |
12.97 |
|
2001-q2 |
6 |
35 |
35.56 |
-1.40 |
35.94 |
-0.94 |
|
2001-q3 |
7 |
20 |
28.50 |
-3.10 |
34.17 |
-14.17 |
|
2001-q4 |
8 |
30 |
27.24 |
-2.54 |
25.40 |
4.60 |
|
2002-q1 |
9 |
35 |
28.82 |
-1.31 |
24.70 |
10.30 |
|
2002-q2 |
10 |
20 |
24.51 |
-2.21 |
27.51 |
-7.51 |
|
2002-q3 |
11 |
15 |
19.38 |
-3.09 |
22.30 |
-7.30 |
|
2002-q4 |
12 |
40 |
25.78 |
-0.24 |
16.29 |
23.71 |
|
2003-q1 |
13 |
55 |
37.32 |
3.30 |
25.54 |
29.46 |
|
2003-q2 |
14 |
35 |
38.37 |
2.62 |
40.62 |
-5.62 |
|
2003-q3 |
15 |
25 |
34.59 |
0.70 |
40.99 |
-15.99 |
|
2003-q4 |
16 |
55 |
43.18 |
3.07 |
35.30 |
19.70 |
|
2004-q1 |
17 |
55 |
49.75 |
4.12 |
46.25 |
8.75 |
|
2004-q2 |
18 |
40 |
48.32 |
2.45 |
53.86 |
-13.86 |
|
2004-q3 |
19 |
35 |
44.46 |
0.56 |
50.77 |
-15.77 |
|
2004-q4 |
20 |
60 |
51.01 |
2.36 |
45.02 |
14.98 |
|
2005-q1 |
21 |
75 |
62.02 |
4.95 |
53.37 |
21.63 |
|
2005-q2 |
22 |
50 |
60.19 |
2.92 |
66.98 |
-16.98 |
|
2005-q3 |
23 |
40 |
53.86 |
0.14 |
63.10 |
-23.10 |
|
2005-q4 |
24 |
65 |
58.40 |
1.46 |
54.01 |
10.99 |
|
2006-q1 |
25 |
85 |
69.92 |
4.48 |
59.87 |
25.13 |
|
|
|
|
|
|
74.40 |
6090.21 |
|
|
|
|
|
|
|
SumofSq |
|
|
|
|
|
|
|
MSE |
|
|
|
|
|
|
|
243.61
|
Actual values are available only for 25 periods (up to 2006.Q1). So, errors are calculated only for 25 periods. The forecast for 2006.q2 would be = 69.92 + 2*4.48 = 78.88
Exponential Smoothing (0.1)
Actual 50 35 25 40 45 35 20 30 35 20 15 40 55 35 25 55 55 40 35 60 75 50 40 65 85 Forecast #N/A 50 48.5 46.15 45.534999999999997 45.481499999999997 44.433349999999997 41.990015 40.791013499999998 40.211912149999996 38.190720934999995 35.871648841499997 36.284483957349998 38.156035561614999 37.840432005453501 36.556388804908153 38.40074992441734 40.060674931975605 40.054607438778042 39.549146694900237 41.594232025410214 44.934808822869194 45.441327940582276 44.897195146524048 46.907475631871641Data Point
Value
error plot (0.1)
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 -15 -23.5 -6.1499999999999986 -0.53499999999999659 -10.481499999999997 -24.433349999999997 -11.990015 -5.7910134999999983 -20.211912149999996 -23.190720934999995 4.1283511585000028 18.715516042650002 -3.1560355616149991 -12.840432005453501 18.443611195091847 16.59925007558266 -6.0674931975604807E-2 -5.0546074387780422 20.450853305099763 33.405767974589786 5.0651911771308065 -5.4413279405822763 20.102804853475952 38.092524368128359
Exponential Smoothing (0.7)
Actual 50 35 25 40 45 35 20 30 35 20 15 40 55 35 25 55 55 40 35 60 75 50 40 65 85 Forecast #N/A 50 39.5 29.35 36.805 42.541499999999999 37.262450000000001 25.178735 28.553620500000001 33.066086150000004 23.919825844999998 17.675947753499997 33.302784326050002 48.490835297814996 39.0472505893445 29.214175176803352 47.264252553041004 52.679275765912301 43.803782729773687 37.641134818932102 53.292340445679628 68.487702133703891 55.546310640111166 44.663893192033349 58.899167957610004Data Point
Value
et(.7) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 -15 -14.5 10.649999999999999 8.1950000000000003 -7.5414999999999992 -17.262450000000001 4.8212650000000004 6.446379499999999 -13.066086150000004 -8.9198258449999983 22.324052246500003 21.697215673949998 -13.490835297814996 -14.0472505893445 25.785824823196648 7.735747446958996 -12.679275765912301 -8.803 7827297736868 22.358865181067898 21.707659554320372 -18.487702133703891 -15.546310640111166 20.336106807966651 26.100832042389996
2