Multiplicative Winter s Smoothing Method LECTURE 6 TIME SERIES FORECASTING METHOD rahmaanisa@apps.ipb.ac.id
Review What is the difference between additive and multiplicative seasonal pattern in time series data? What is the basic idea of additive Winter s smoothing method? What are the issues of additive Winter s smoothing procedure?
Seasonal Data
Seasonal Data 50.00 55.00 60.00 65.00 70.00 75.00 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 Aditif 30.00 40.00 50.00 60.00 70.00 80.00 90.00 100.00 110.00 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 Multiplikatif Additive Multiplicative
Outline Time series data set with multiplicative seasonal component Winter s smoothing method for multiplicative seasonal time series data Ilustration
EXPONENTIAL SMOOTHING FOR SEASONAL DATA Originally introduced by Holt (1957) and Winters (1960) Generally known as Winters method Basic idea: seasonal adjustment linear trend model Two types of adjustments are suggested: Additive Multiplicative
Aditive Model Y t = L t + S t + ε t level or linear trend component can in turn be represented by β 0 + β 1 t the seasonal adjustment S t = S t+m = S t+2m = for t = 1,, m 1 length of the season (period) of the cycles
Multiplicative Model Y t = L t S t + ε t level or linear trend component can in turn be represented by β 0 + β 1 t the seasonal adjustment S t = S t+m = S t+2m = for t = 1,, m 1 length of the season (period) of the cycles
Additive Vs Multiplicative Holt- Winter s Method Additive: Y t+h t = L t + B t h + S t+h m Level Trend Seasonal Multiplicative: Y t+h t = L t + B t h S t+h m
Holt-Winters Multiplicative Formulation Suppose the time series is denoted by y 1,, y n with m seasonal period. Estimate of the level: L t = α Estimate of the trend: Y t S t m + 1 α L t 1 + B t 1 B t = γ L t L t 1 + 1 γ B t 1 Estimate of the seasonal factor: S t = δ Y t L t + 1 δ S t m
h-step-ahead forecast Let Y t+h t be the h-step forecast made using data to time t Y t+h t = L t + B t h S t+h m
Holt-Winters Additive Vs Multiplicative Formulation Suppose the time series is denoted by y 1,, y n with m seasonal period. Est. of level Additive L t = α Y t S t m + 1 α L t 1 + B t 1 L t = α Multiplicative Y t S t m + 1 α L t 1 + B t 1 Est. of trend B t = γ L t L t 1 + 1 γ B t 1 B t = γ L t L t 1 + 1 γ B t 1 Est. of seasonal S t = δ Y t L t + 1 δ S t m S t = δ Y t L t + 1 δ S t m Forecast Y t+h t = L t + B t h + S t+h m Y t+h t = L t + B t h S t+h m
The Procedure Step 1: Initialize the value of L t, B t, and S t Step 2: Update the estimate of L t Step 3: Update the estimate of B t Step 4: Update the estimate of S t Step 5: Conduct the h-step-ahead forecast
Initializing the Holt-Winters method Hyndman (2010) 1. Fit a 2 m moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend from the original data to get detrended data. The initial seasonal values are then obtained from the averaged de-trended data. 3. Subtract the seasonal values from the original data to get seasonally adjusted data. 4. Fit a linear trend to the seasonally adjusted data to get the initial level L 0 (the intercept) and the initial slope B 0.
Initializing the Holt-Winters method Montgomery (2015): Suppose a dataset consist of k seasons. L 0 = y k y 1 k 1 m where y i = 1 m im t= i 1 m+1 y t B 0 = y 1 m 2 L 0 S j m = m S j m i=1 S, for 1 j s, where S j = 1 j k t=1 k y t 1 m+j y t s+1 2 j β 0
Initializing the Holt-Winters method Hansun (2017) Used the basic principle of weighted moving average to give more weight to more recent data and estimate the initial values for the overall smoothing and the trend smoothing components. The initial values for the seasonal indices can be computed by calculating the average level for each observed season.
Procedures of Multiplicative Holt-Winters Method Use the Sports Drink example as an illustration Slide 19
Procedures of Multiplicative Holt-Winters Method 250 200 Sports Drink (y) 150 100 50 0 0 5 10 15 20 25 30 35 Time Slide 20
Procedures of Multiplicative Holt-Winters Method Observations: Linear upward trend over the 8-year period Magnitude of the seasonal span increases as the level of the time series increases Multiplicative Holt-Winters method can be applied to forecast future sales Slide 21
Procedures of Multiplicative Holt-Winters Method Step 1: Obtain initial values for the level l 0, the growth rate b 0, and the seasonal factors s -3, s -2, s -1, and s 0, by fitting a least squares trend line to at least four or five years of the historical data. y-intercept = l 0 ; slope = b 0 Slide 22
Procedures of Multiplicative Holt-Winters Method Example Fit a least squares trend line to the first 16 observations Trend line yˆ 95.2500 2.4706t t l 0 = 95.2500; b 0 = 2.4706 Slide 23
Procedures of Multiplicative Holt-Winters Method Step 2: Find the initial seasonal factors 1. Compute for the in-sample observations used for fitting the regression. In this example, t = 1, 2,, 16. y ˆt yˆ 95.2500 2.4706(1) 97.7206 1 yˆ 95.2500 2.4706(2) 100.1912 2... yˆ 95.2500 2.4706(16) 134.7794 16 Slide 24
Procedures of Multiplicative Holt-Winters Method Step 2: Find the initial seasonal factors 2. Detrend the data by computing SS 0,t ˆ t yt / yt for each time period that is used in finding the least squares regression equation. In this example, t = 1, 2,, 16. S 0,1 S 0,2 S y / yˆ 72 / 97.7206 0.7368 1 1 1 S y / yˆ 116 /100.1912 1.1578... S 0,16 2 2 2 S y / yˆ 120 /134.7794 0.8903 16 16 16 Slide 25
Procedures of Multiplicative Holt-Winters Method Step 2: Find the initial seasonal factors 3. Compute the average seasonal values for each of the k seasons. The k averages are found by computing the average of the detrended values for the corresponding season. For example, for quarter 1, S [1] S1 S5 S9 S13 4 0.7368 0.7156 0.6894 0.6831 0.7062 4 Slide 26
Procedures of Multiplicative Holt-Winters Method Step 2: Find the initial seasonal factors 4. Multiply the average seasonal values by the normalizing constant CF = m m i=1 S [i] such that the average of the seasonal factors is 1. The initial seasonal factors are sn S ( ) ( 1,2,..., ) i m i L S[] CF i L i Slide 27
Procedures of Multiplicative Holt-Winters Method Step 2: Find the initial seasonal factors 4. Multiply the average seasonal values by the normalizing constant such that the average of the seasonal factors is 1. Example CF = 4/3.9999 = 1.0000 sn S 3 = sn S 1 4 S ( CF) 0.7062(1) 0.7062 3 1 4 [1] sn S 2 = sn S 2 4 S ( CF) 1.1114(1) 1.1114 2 2 4 [2] sn S 1 = sn S 3 4 S ( CF) 1.2937(1) 1.2937 1 3 4 [3] sn S 0 = sn S 4 4 4 4 S[1] ( CF) 0.8886(1) 0.8886 Slide 28
Procedures of Multiplicative Holt-Winters Method Step 3: Calculate a point forecast of y 1 from time 0 using the initial values y t+h t = L t + B t h S t+h m t = 1, h = 0 y 1 0 = L 0 + B 0 S 1 4 = L 0 + B 0 S 3 y 1 0 = 95.25 + 2.4706 0.7062 y 1 0 = 69.0103 Slide 29
Procedures of Multiplicative Holt-Winters Method Step 4: Update the estimates l T, b T, and sn T by using some predetermined values of smoothing constants. Example: let = 0.2, = 0.1, and δ = 0.1 l b ( y / sn ) (1 )( l b ) s 1 4 1 1 1 4 0 0 0.2(72 / 0.7062) 0.8(95.2500 2.4706) 98.5673 ( l l ) (1 ) b 1 1 0 0 0.1(98.5673 95.2500) 0.9(2.4706) 2.5553 sn1 ( y1 / l 1) (1 ) sn s 1 4 1 4 0.1(72 / 98.5673) 0.9(0.7062) 0.7086 yˆ 2(1) ( l 1 b1 ) sn s 2 4 2 4 (98.5673 2.5553)(1.1114) 112.3876 Slide 30
yˆ 3 b sn 2 2 2 y2 sn s 2 4 2 4 1 1 b1 1.1114 0.8 98.5673 2.5553 0.2 116 101.7727 2 1 1 b1 98.5673 0.9 2.5553 0.1 101.7727 2.62031 0.1 116 y2 2 1 sn s 2 4 2 4 101.7727 0.9 1.1114 1.114239 2 2 b2 sn s 3 4 3 4 101.7727 2.62031 1.2937 135.053 Slide 31
yˆ 5 b sn 4 4 4 y4 sn s 4 4 4 4 1 3 b3 96 0.8886 0.8 104.5393 2.6349 0.2 107.3464 4 3 1 b3 104.5393 0.9 2.6349 0.1 107.3464 2.65212 0.1 96 y4 4 1 sn s 4 4 4 4 107.3464 0.9 0.8886 0.889170 4 4 b4 sn s 5 4 5 4 107.3464 2.65212 0.7086 77.945 Slide 32
Slide 33
Procedures of Multiplicative Holt-Winters Method Step 5: Find the most suitable combination of,, and δ that minimizes SSE (or MSE) Example: Use Solver in Excel as an illustration SSE alpha gamma delta Slide 34
Slide 35
Multiplicative Holt-Winters Method p-step-ahead forecast made at time T y t+h t = L t + B t h S t+h m h = 1, 2, 3,. Example yˆ (32) ( l b ) sn s 33 4 (168.1213 2.3028)(0.7044) 120.0467 33 32 32 33 4 yˆ (32) ( l 2 b ) sn [168.1213 2(2.3028)](1.1038) 190.6560 34 32 32 s 34 4 4 yˆ (32) ( l 3 b ) sn [(168.1213 3(2.3028)](1.2934) 226.3834 35 32 32 s 35 4 4 yˆ (32) ( l 4 b ) sn [(168.1213 4(2.3028)](0.8908) 157.9678 36 32 32 s 36 4 4 Slide 36
Multiplicative Holt-Winters Method Example Forecast Plot for Sports Drink Sales 250 200 Observed values Forecasts Forecasts 150 100 50 0 0 5 10 15 20 25 30 35 40 Time Slide 37
Chapter Summary Additive Vs multiplicative Holt-Winter s smoothing? Basic idea of multiplicative Holt-Winter s smoothing? Procedure in multiplicative Holt-Winter s smoothing?
Another Example See example 4.8 on Montgomery (2015), chapter 4 page 309.
Exercise 1. Montgomery (2015) exercise 4.27, 4.28, 4.29 2. Montgomery (2015) exercise 4.30 part (c) 3. Montgomery (2015) exercise 4.32 part (c)
Next Topic Regression for Time Series Data Set (part 1)
References Hyndman, R.J. 2010. Initializing the Holt-Winters method. https://robjhyndman.com/hyndsight/hw-initialization/ [March 7 th, 2018] Hyndman, R.J and Athanasopoulos, G. 2013. Forecasting: principles and practice. https://www.otexts.org/ fpp/6/2/ [March 7 th, 2018] Montgomery, D.C., Jennings, C.L., Kulahci, M. 2015. Introduction to Time Series Analysis and Forecasting, 2 nd ed. New Jersey: John Wiley & Sons. Hansun, S. 2017. New Estimation Rules for Unknown Parameters on Holt-Winters Multiplicative Method. J.Math. Fund. Sci., Vol. 49 (2): 127-135. DOI: 10.5614/j.math.fund.sci.2017.49.2.3. Wan, A. 2017. Exponential Smoothing. http://personal.cb. cityu.edu.hk/msawan/teaching/ms6215/exponential%20smoothin g%20methods.ppt [March 7 th, 2018] 42
The handouts are available on the following site: stat.ipb.ac.id/en 43