Forecasting

23
Forecasting • Purpose is to forecast, not to explain the historical pattern • Models for forecasting may not make sense as a description for ”physical” beaviour of the time series • Common sense and mathematics in a good combination produces ”optimal” forecasts

description

Forecasting. Purpose is to forecast, not to explain the historical pattern Models for forecasting may not make sense as a description for ”physical” beaviour of the time series Common sense and mathematics in a good combination produces ”optimal” forecasts. Exponential smoothing. - PowerPoint PPT Presentation

Transcript of Forecasting

Page 1: Forecasting

Forecasting

• Purpose is to forecast, not to explain the historical pattern

• Models for forecasting may not make sense as a description for ”physical” beaviour of the time series

• Common sense and mathematics in a good combination produces ”optimal” forecasts

Page 2: Forecasting

Exponential smoothing

• Use the historical data to forecast the future• Let different parts of the history have

different impact on the forecasts• Forecast model is not developed from any

statistical theory

Page 3: Forecasting

Single exponential smoothing

• Assume historical values y1,y2,…yT

• Assume data contains no trend, i.e.

tty 0

Page 4: Forecasting

Forecasting scheme:

TT

TTT

yy

ˆ

,)1( 1

where is a smoothing parameter between 0 and 1

Page 5: Forecasting

• The forecast procedure is a recursion formula

• How shall we choose α?• Where should we start, i.e. Which is the

initial value l0 ?

Page 6: Forecasting

Use a part (usually half) of the historical data to estimate β0

Set l 0=

Update the estimates of β0 for the rest of the historical data with the recursion formula

l T which can be used to forecast yT+τ

Page 7: Forecasting

Example: Sales of everyday commodities

Year Sales values

1985 151

1986 151

1987 147

1988 149

1989 146

1990 142

1991 143

1992 145

1993 141

1994 143

1995 145

1996 138

1997 147

1998 151

1999 148

2000 148

Page 8: Forecasting

Time series graph

1985 1990 1995 2000

140

145

150

year

sale

s

Page 9: Forecasting

Assume the model:

tty 0

Estimate β0 by calculating the mean value of the first 8 observations of the series

75.146...145)/8151151(ˆ0

Set l8 = =146.750̂

Page 10: Forecasting

Assume first that the sales are very stable, i.e. during the period the mean value β0 is assumed not to change

Set α to be relatively small. This means that the latest observation plays a less role than the history in the forecasts.

E.g. Set α=0.1

Update the estimates of β0 using the next 8 values of the historical data

Page 11: Forecasting

998.145776.1459.01481.09.01.0776.1451955.1459.01511.09.01.0

1955.145995.1449.01471.09.01.0995.144772.1459.01381.09.01.0772.1458575.1459.01451.09.01.0

8575.145175.1469.01431.09.01.0175.14675.1469.01411.09.01.0

141515

131414

121313

111212

101111

91010

899

yyyyyyy

Page 12: Forecasting

Forecasts

.2.146ˆ2.146ˆ2.146ˆ

2.146998.1459.01481.09.01.0

19

18

17

151616

etcyyy

y

Page 13: Forecasting

Alternative

In Bowerman/O’Connell/Koehler instead the updates of estimates of β0 are done on all historical data i.e.

1)1( TTT y

for T=1,…, n and l0 = 0̂

Page 14: Forecasting

Analysis of example data with MINITAByear sales lT yT – lT forecasts

1985 151 146,750 4,25000 *

1986 151 147,175 3,82500 *

1987 147 147,558 -0,55750 *

1988 149 147,502 1,49825 *

1989 146 147,652 -1,65158 *

1990 142 147,486 -5,48642 *

1991 143 146,938 -3,93778 *

1992 145 146,544 -1,54400 *

1993 141 146,390 -5,38960 *

1994 143 145,851 -2,85064 *

1995 145 145,566 -0,56557 *

1996 138 145,509 -7,50902 *

1997 147 144,758 2,24188 *

1998 151 144,982 6,01770 *

1999 148 145,584 2,41593 *

2000 148 145,826 2,17433 *

146,043

146,043

146,043

146,043

Page 15: Forecasting

Actual

Predicted

Forecast Actual PredictedForecast

0 10 20

138

143

148

153

sale

s

Time

Smoothing Constant

Alpha:

MAPE:

MAD:

MSD:

0,100

2,2378

3,2447

14,4781

Single Exponential Smoothing

Page 16: Forecasting

Assume now that the sales are less stable, i.e. during the period the mean value β0 is possibly changing

Set α to be relatively large. This means that the latest observation becomes more important in the forecasts.

E.g. Set α=0.5

Page 17: Forecasting

Analysis with MINITAB

Actual

Predicted

Forecast Actual PredictedForecast

0 10 20

140

145

150

155

sale

s

Time

Smoothing ConstantAlpha:

MAPE:

MAD:MSD:

0,500

1,9924

2,899213,0928

Single Exponential Smoothing

Page 18: Forecasting

We can also use some adaptive procedure to continuosly evaluate the forecast ability and maybe change the smoothing parameter over time

Alt. We can run the process with different alphas and choose the one that performs best. This can be done with the MINITAB procedure.

Page 19: Forecasting

Automatic selection of smoothing parameter with MINITAB

Actual

Predicted

Forecast Actual PredictedForecast

0 10 20

140

145

150

155

sale

s

Time

Smoothing Constant

Alpha:

MAPE:

MAD:

MSD:

0,567

1,7914

2,5940

12,1632

Single Exponential Smoothing

Page 20: Forecasting

Exponential smoothing for times series with trend and/or seasonal variation

• Double exponential smoothing (one smoothing parameter)

• Holt-Winter’s method (two smoothing parameters)

• Multiplicative Winter’s method (three smoothing parameters)

• Additive Winter’s method (three smoothing parameters)

Page 21: Forecasting

Example: Quarterly sales datayear quarter sales

1991 1 124

1991 2 157

1991 3 163

1991 4 126

1992 1 119

1992 2 163

1992 3 176

1992 4 127

1993 1 126

1993 2 160

1993 3 181

1993 4 121

1994 1 131

1994 2 168

1994 3 189

1994 4 134

1995 1 133

1995 2 167

1995 3 195

1995 4 131

Page 22: Forecasting

5 10 15 20

120

130

140

150

160

170

180

190

200

Index

sale

s

Page 23: Forecasting

Applying Winter’s multiplicative method with MINITAB

Actual

PredictedActual Predicted

0 10 20

120

145

170

195

sale

s

Time

Smoothing ConstantsAlpha (level):Gamma (trend):Delta (season):

MAPE:MAD:MSD:

0,2000,2000,200

2,6446 3,880823,7076

Winters' Multiplicative Model for sales