multiplicative winter’s smoothing method · initializing the holt-winters method 1. fit a 2×...

44
Multiplicative Winter’s Smoothing Method LECTURE 6|TIME SERIES FORECASTING METHOD [email protected]

Upload: others

Post on 27-Jun-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Multiplicative Winter’s Smoothing MethodLECTURE 6|TIME SERIES FORECASTING METHOD [email protected]. id

Page 2: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

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?

Page 3: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Seasonal Data

Page 4: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

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

Page 5: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Outline Time series data set with multiplicative seasonal

component

Winter’s smoothing method for multiplicative seasonal time series data

Ilustration

Page 6: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend
Page 7: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend
Page 8: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

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

Page 9: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Aditive Model

level or linear trend component the seasonal adjustment

St = St+m = St+2m =… for t = 1,…, m − 1

length of the season (period) of the cycles

can in turn be represented by 𝛽0 + 𝛽1t

𝑌𝑡 = 𝐿𝑡 + 𝑆𝑡 + 휀𝑡

Page 10: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Multiplicative Model

level or linear trend component the seasonal adjustment

St = St+m = St+2m =… for t = 1,…, m − 1

length of the season (period) of the cycles

can in turn be represented by 𝛽0 + 𝛽1t

𝑌𝑡 = 𝐿𝑡 𝑆𝑡 + 휀𝑡

Page 11: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Additive Vs Multiplicative Holt-Winter’s Method

𝑌𝑡+ℎ 𝑡 = 𝐿𝑡 + 𝐵𝑡ℎ + 𝑆𝑡+ℎ−𝑚

Level

Trend

Seasonal

Additive:

𝑌𝑡+ℎ 𝑡 = 𝐿𝑡 + 𝐵𝑡ℎ 𝑆𝑡+ℎ−𝑚Multiplicative:

Page 12: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Holt-Winters Multiplicative Formulation Suppose the time series is denoted by 𝑦1, … , 𝑦𝑛 with 𝑚

seasonal period.

𝐿𝑡 = 𝛼𝑌𝑡

𝑆𝑡−𝑚+ 1 − 𝛼 𝐿𝑡−1 + 𝐵𝑡−1

𝐵𝑡 = 𝛾 𝐿𝑡 − 𝐿𝑡−1 + 1 − 𝛾 𝐵𝑡−1

𝑆𝑡 = 𝛿𝑌𝑡

𝐿𝑡+ 1 − 𝛿 𝑆𝑡−𝑚

Estimate of the level:

Estimate of the trend:

Estimate of the seasonal factor:

Page 13: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

ℎ-step-ahead forecast Let 𝑌𝑡+ℎ 𝑡 be the ℎ-step forecast made using data to

time 𝑡

𝑌𝑡+ℎ 𝑡 = 𝐿𝑡 + 𝐵𝑡ℎ 𝑆𝑡+ℎ−𝑚

Page 14: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Holt-Winters Additive Vs Multiplicative Formulation

Suppose the time series is denoted by 𝑦1, … , 𝑦𝑛 with 𝑚 seasonal period.

Additive Multiplicative

Est. of level

𝐿𝑡 = 𝛼 𝑌𝑡 − 𝑆𝑡−𝑚 + 1 − 𝛼 𝐿𝑡−1 + 𝐵𝑡−1 𝐿𝑡 = 𝛼𝑌𝑡

𝑆𝑡−𝑚+ 1 − 𝛼 𝐿𝑡−1 + 𝐵𝑡−1

Est. of trend

𝐵𝑡 = 𝛾 𝐿𝑡 − 𝐿𝑡−1 + 1 − 𝛾 𝐵𝑡−1 𝐵𝑡 = 𝛾 𝐿𝑡 − 𝐿𝑡−1 + 1 − 𝛾 𝐵𝑡−1

Est. of seasonal

𝑆𝑡 = 𝛿 𝑌𝑡 − 𝐿𝑡 + 1 − 𝛿 𝑆𝑡−𝑚 𝑆𝑡 = 𝛿𝑌𝑡

𝐿𝑡+ 1 − 𝛿 𝑆𝑡−𝑚

Forecast 𝑌𝑡+ℎ 𝑡 = 𝐿𝑡 + 𝐵𝑡ℎ + 𝑆𝑡+ℎ−𝑚 𝑌𝑡+ℎ 𝑡 = 𝐿𝑡 + 𝐵𝑡ℎ 𝑆𝑡+ℎ−𝑚

Page 15: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

The Procedure

Step 1: Initialize the value of 𝐿𝑡 , 𝐵𝑡, and 𝑆𝑡

Step 2: Update the estimate of 𝐿𝑡

Step 3: Update the estimate of 𝐵𝑡

Step 4: Update the estimate of 𝑆𝑡

Step 5: Conduct the ℎ-step-ahead forecast

Page 16: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Initializing the Holt-Winters method

1. Fit a 2×𝑚 moving average smoother to the first 2 or 3 years of data.

2. Subtract smooth trend from the original data to get de-trended 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 𝐿0 (the intercept) and the initial slope 𝐵0.

Hyndman (2010)

Page 17: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Initializing the Holt-Winters method

Montgomery (2015):

Suppose a dataset consist of 𝑘 seasons.

𝐿0 = 𝑦𝑘− 𝑦1

𝑘−1 𝑚where 𝑦𝑖 =

1

𝑚 𝑡= 𝑖−1 𝑚+1

𝑖𝑚 𝑦𝑡

𝐵0 = 𝑦1 −𝑚

2 𝐿0

𝑆𝑗−𝑚 = 𝑚 𝑆𝑗∗

𝑖=1𝑚 𝑆𝑗

∗ , for 1 ≤ 𝑗 ≤ 𝑠, where 𝑆𝑗∗ =

1

𝑘 𝑡=1

𝑘 𝑦 𝑡−1 𝑚+𝑗

𝑦𝑡−𝑠+1

2−𝑗 𝛽0

Page 18: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Initializing the Holt-Winters method

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.

Hansun (2017)

Page 19: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 19

Procedures of Multiplicative Holt-Winters Method

Use the Sports Drink example as an illustration

Page 20: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 20

Procedures of Multiplicative Holt-Winters Method

0

50

100

150

200

250

0 5 10 15 20 25 30 35

Time

Sp

ort

s D

rin

k (y

)

Page 21: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 21

Procedures of Multiplicative Holt-Winters MethodObservations: ◦ 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

Page 22: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 22

Procedures of Multiplicative Holt-Winters Method

Step 1: Obtain initial values for the level ℓ0, the growth rate b0, and the seasonal factors s-3, s-2, s-1, and s0, by fitting a least squares trend line to at least four or five years of the historical data. ◦ y-intercept = ℓ0; slope = b0

Page 23: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 23

Procedures of Multiplicative Holt-Winters Method

Example ◦ Fit a least squares trend line to the first 16 observations

◦ Trend line

◦ ℓ0 = 95.2500; b0 = 2.4706

ˆ 95.2500 2.4706ty t

Page 24: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 24

Procedures of Multiplicative Holt-Winters Method

Step 2: Find the initial seasonal factors1. Compute for the in-sample observations used for

fitting the regression. In this example, t = 1, 2, …, 16. ˆ

ty

1

2

16

ˆ 95.2500 2.4706(1) 97.7206

ˆ 95.2500 2.4706(2) 100.1912

......

ˆ 95.2500 2.4706(16) 134.7794

y

y

y

Page 25: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 25

Procedures of Multiplicative Holt-Winters Method

Step 2: Find the initial seasonal factors2. Detrend the data by computing for each time

period that is used in finding the least squares regression equation. In this example, t = 1, 2, …, 16.

ˆ/t t tS y y

1 1 1

2 2 2

16 16 16

ˆ/ 72 / 97.7206 0.7368

ˆ/ 116 /100.1912 1.1578

......

ˆ/ 120 /134.7794 0.8903

S y y

S y y

S y y

𝑆0,1

𝑆0,2

……

𝑆0,16

𝑆0,𝑡

Page 26: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 26

Procedures of Multiplicative Holt-Winters Method

Step 2: Find the initial seasonal factors3. 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,

1 5 9 13[1]

4

0.7368 0.7156 0.6894 0.68310.7062

4

S S S SS

Page 27: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 27

Procedures of Multiplicative Holt-Winters Method

Step 2: Find the initial seasonal factors4. Multiply the average seasonal values by the normalizing

constant

such that the average of the seasonal factors is 1. The initial seasonal factors are

[ ]( ) ( 1,2,..., )i L isn S CF i L 𝑆𝑖−𝑚

𝐶𝐹 =𝑚

𝑖=1𝑚 𝑆[𝑖]

Page 28: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 28

Procedures of Multiplicative Holt-Winters Method

Step 2: Find the initial seasonal factors4. 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

3 1 4 [1]

2 2 4 [2]

1 3 4 [3]

0 4 4 [1]

( ) 0.7062(1) 0.7062

( ) 1.1114(1) 1.1114

( ) 1.2937(1) 1.2937

( ) 0.8886(1) 0.8886

sn sn S CF

sn sn S CF

sn sn S CF

sn sn S CF

𝑆−3 = 𝑆1−4

𝑆−2 = 𝑆2−4

𝑆−1 = 𝑆3−4

𝑆0 = 𝑆4−4

Page 29: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 29

Procedures of Multiplicative Holt-Winters Method

Step 3: Calculate a point forecast of y1 from time 0 using the initial values

𝑦𝑡+ℎ 𝑡 = 𝐿𝑡 + 𝐵𝑡ℎ 𝑆𝑡+ℎ−𝑚

𝑦1 0 = 𝐿0 + 𝐵0 𝑆1−4 = 𝐿0 + 𝐵0 𝑆−3

𝑦1 0 = 95.25 + 2.4706 0.7062

𝑦1 0 = 69.0103

𝑡 = 1 , ℎ = 0

Page 30: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 30

Procedures of Multiplicative Holt-Winters Method

Step 4: Update the estimates ℓT, bT, and snT by using some predetermined values of smoothing constants.

Example: let = 0.2, = 0.1, and δ = 0.1

1 1 1 4 0 0( / ) (1 )( )

0.2(72 / 0.7062) 0.8(95.2500 2.4706) 98.5673

y sn b

l l

1 1 0 0( ) (1 )

0.1(98.5673 95.2500) 0.9(2.4706) 2.5553

b b

l l

2 1 1 2 4ˆ (1) ( )

(98.5673 2.5553)(1.1114) 112.3876

y b sn

l

1 1 1 1 4( / ) (1 )

0.1(72 / 98.5673) 0.9(0.7062) 0.7086

sn y sn

l

𝑠1−4

𝑠1−4

𝑠2−4

Page 31: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 31

053.135

2937.162031.27727.101

114239.1

1114.19.07727.1011161.0

1

62031.2

5553.29.05673.987727.1011.0

1

7727.101

5553.25673.988.01114.11162.0

1

43223

42222

1122

114222

snby

snysn

bb

bsny

𝑠2−4

𝑠2−4

𝑠3−4

Page 32: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 32

945.77

7086.065212.23464.107

889170.0

8886.09.03464.107961.0

1

65212.2

6349.29.05393.1043464.1071.0

1

3464.107

6349.25393.1048.08886.0962.0

1

45445

44444

3344

334444

snby

snysn

bb

bsny

𝑠4−4

𝑠4−4

𝑠5−4

Page 33: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 33

…… ……

Page 34: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 34

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

Page 35: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 35

…… ……

Page 36: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 36

Multiplicative Holt-Winters Method

p-step-ahead forecast made at time T

Example

33 32 32 33 4ˆ (32) ( ) (168.1213 2.3028)(0.7044) 120.0467y b sn l

34 32 32 34 4ˆ (32) ( 2 ) [168.1213 2(2.3028)](1.1038) 190.6560y b sn l

35 32 32 35 4ˆ (32) ( 3 ) [(168.1213 3(2.3028)](1.2934) 226.3834y b sn l

36 32 32 36 4ˆ (32) ( 4 ) [(168.1213 4(2.3028)](0.8908) 157.9678y b sn l

𝑦𝑡+ℎ 𝑡 = 𝐿𝑡 + 𝐵𝑡ℎ 𝑆𝑡+ℎ−𝑚 ℎ = 1, 2, 3, … .

𝑠33−4

𝑠34−4

𝑠35−4

𝑠36−4

Page 37: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Slide 37

Multiplicative Holt-Winters Method

Example

Forecast Plot for Sports Drink Sales

0

50

100

150

200

250

0 5 10 15 20 25 30 35 40

Time

Fo

recasts

Observed values

Forecasts

Page 38: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Chapter Summary Additive Vs multiplicative Holt-Winter’s

smoothing ?

Basic idea of multiplicative Holt-Winter’s smoothing?

Procedure in multiplicative Holt-Winter’s smoothing?

Page 39: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Another Example

See example 4.8 on Montgomery (2015) , chapter 4 page 309.

Page 40: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Exercise1. 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)

Page 41: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

Next Topic…

Regression for Time Series Data Set (part 1)

Page 42: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

ReferencesHyndman, R.J. 2010. Initializing the Holt-Winters method.

https://robjhyndman.com/hyndsight/hw-initialization/ [March 7th,2018]

Hyndman, R.J and Athanasopoulos, G. 2013. Forecasting: principles andpractice. https://www.otexts.org/ fpp/6/2/ [March 7th, 2018]

Montgomery, D.C., Jennings, C.L., Kulahci, M. 2015. Introduction to TimeSeries Analysis and Forecasting, 2nd ed. New Jersey: John Wiley &Sons.

Hansun, S. 2017. New Estimation Rules for Unknown Parameters onHolt-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%20Smoothing%20Methods.ppt [March 7th, 2018]

42

Page 43: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend

The handouts are available on the following site:

stat.ipb.ac.id/en

43

Page 44: Multiplicative Winter’s Smoothing Method · Initializing the Holt-Winters method 1. Fit a 2× moving average smoother to the first 2 or 3 years of data. 2. Subtract smooth trend