slides for part iv-c outline: 1.measuring forecast error 2.the multiplicative time series model...

37
Slides for Part IV-C Outline: 1. Measuring forecast error 2. The multiplicative time series model 3. Naïve extrapolation 4. The mean forecast model 5. Moving average models 6. Weighted moving average models 7. Constructing a seasonal index using a centered moving average 8. Exponential smoothing

Post on 22-Dec-2015

216 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

Slides for Part IV-C

Outline:

1. Measuring forecast error

2. The multiplicative time series model

3. Naïve extrapolation

4. The mean forecast model

5. Moving average models

6. Weighted moving average models

7. Constructing a seasonal index using a centered moving average

8. Exponential smoothing

Page 2: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

Forecast error

Month/Year

(1)Forecasted

Value

(2)Actual Value

(3) = (2) – (1)

Error

July 2000 $390 $423 $33

Aug 2000 450 429 -21

Sept 2000 289 301 12

Forecasting Convenience Store Ice Sales

Page 3: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

Measuring Forecast Error

Actual

Predicted

Time

Mean Square Error (MSE) is given by:

2

1

)ˆ(1

t

T

t

t YYT

MSE

Where Yt is the actual value of variable that we seek to forecast and is the fitted or forecasted value of the variable.

tY

You can think of MSE as the average forecast error--only squared.

If we have a perfect forecast, then MSE = 0.

Page 4: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

Measuring Forecast Error, part 2

Actual

Predicted

Time

Mean Absolute Deviation (MAD) is given by:

T

t

tt YYT

MAD1

ˆ1

Where Yi is the actual value of variable that we seek to forecast and is the fitted or forecasted value of the variable.

iY

Page 5: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

Root MSE

Actual

Predicted

Time

Root Mean Square Error (root MSE) is given by:

2

1

)ˆ(1

t

T

t

t YYT

rootMSE

Root MSE is a statistic that is

typically is reported by forecasting

software applications

Page 6: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

Which measure of forecast accuracy is indicated?

It depends on the properties of the loss function. That is, when our forecasts are off the mark, we suffer a loss of current or future profits, market share, output, employment, etc. So we want to know: what is the mathematical relationship between forecast errors and losses suffered? This is expressed by the loss function. For example: Let e denote the forecast error and L is the loss function. Let ttt YYe ˆ

Thus the loss function is given by

L(e)

Page 7: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

0

Error

.5-.5 1.0 1.5-1.5 -1.0

L

.5

1.0

This is the absolute lossfunction. MAD (or root MSE)

is the better measure of accuracy

if your loss function looks like this

eeL )(

Page 8: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

0

Error

.5-.5 1.0 1.5-1.5 -1.0

L

.5

1.0

This is thequadratic lossfunction. MSE

(or root MSE) is better this time.

2)( eeL

Page 9: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

The time path of a variable (such as monthly sales of building materials by supply stores) is produced by the interaction of 4 factors or components. These components are:

1. The trend component (T)

2. The seasonal component (S)

3. The cyclical component (C); and

4. The irregular component (I)

Page 10: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

The trend component (T)

Trend is the gradual, long-run (or secular) evolution

of the variables that we are seeking to forecast.

Page 11: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

Factors affecting the trend component of a time series

•Population changes

•Demographic changes. For example, spending for healthcare services is likely to rise due to the aging of the population. Sales of fast food are up due to the secular increase in the female labor force participation rate.

•Technological change. Sales of typewriter and vinyl records have trended downward due product innovation.

•Changes in consumer tastes and preferences.

Page 12: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

-60

-40

-20

0

20

40

10 20 30 40 50 60 70 80 90 100

Linear trends

Trend = 10 – 25t

Trend = -50 + .8t

Page 13: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

0

1000

2000

3000

4000

10 20 30 40 50 60 70 80 90 100

Non-linear, increasing trend

Trend = 10 + .3t + .3t2

Page 14: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

-5000

-4000

-3000

-2000

-1000

0

1000

10 20 30 40 50 60 70 80 90 100

Non-linear, decreasing trend

Trend = 10 - .4t - .4t2

Page 15: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

The seasonal component (S)

•Many series display a regular pattern of variability depending on the time of year.

•For example, sales of toys and scotch whiskey peak in December each year.

•Ice cream sales are higher in summer months than in winter months.

•Car sales tend typically to be strong in May and June and weaker in November and December.

Page 16: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

The cyclical component (C)

•The time path of a series can be influenced by business cycle fluctuations.

•For example, we expect housing starts to decline in the contractionary phase of the business cycle.

•The same holds true for federal or state tax receipts

•The time path of spending for consumer durable goods is also shaped by cyclical forces.

•Spending for capital goods is likewise cyclical.

•The movie industry has the reputation for being “counter-cyclical”—for example, it flourished during the Depression.

Page 17: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

The irregular component (I)

•The irregular component of the series, sometimes called white noise, is the remaining variability (relative to trend) that cannot be explained by seasonal or cyclical factors. The irregular component is an unexpected, non-recurring factor that affects the series.

•For example, hamburger sales plunge due to panic about E-Coli bacteria.

•Production of trucks slumps because of a strike at a GM parts plant in Ohio.

•A cold snap affects July ice cream sales in upstate NY.

Page 18: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

Sherman & Kolk point out thatif you have a well-designed

forecasting model, then forecasting errors should be mainly accounted

for by irregular factors

Page 19: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

The model ttttt ICSTY

Where:

•Yt is the value of the time series variable in period t (month t, quarter t, etc.)

•Tt trend component of the series in period t

•St is the seasonal component of the series in period t

•Ct is the cylical component of the series at period t; and

•It is the irregular component of the series in period t.

Page 20: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

The trend component (T) is measured in the units in which the time series itself is

measured. So, for example, the trend component for state revenues would be measured in dollars; whereas the trend

component for steel production might be measured in tons.

Page 21: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

The problem: forecast sales of building materials through supply stores for 2000:8 to 2001:7

The data:

•We have monthly data of building material sales through supply stores for the period January 1967 to July 2000 (402 monthly observations).

•The data are expressed in millions of current dollars.

Page 22: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

t equals Year Month Building Materials0 1967 1 5721 1967 2 5442 1967 3 6623 1967 4 6874 1967 5 7975 1967 6 8626 1967 7 8177 1967 8 9028 1967 9 8469 1967 10 876

10 1967 11 78011 1967 12 68012 1968 1 60413 1968 2 663" " " "" " " "

401 2000 7 13008

All data in millions www.economagic.com

Page 23: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

0

4000

8000

12000

16000

68 70 72 74 76 78 80 82 84 86 88 90 92 94 96 98 00

Building materials (millions)

www.economagic.com

Page 24: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

Our first step is to estimate thetrend component of our series.This is accomplished using a technique called ordinary least

squares, or OLS for short.

•OLS is a method of finding the line, or curve, of “best fit.”

•The trend function of best fit is the one that minimizes the squared sum of the vertical distances of the sample points (the actual monthly values of building materials sales) from the trend line (fitted values of monthly building materials sales).

Page 25: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

Let:

•Yt be the actual value of building materials sales in month t;

•Let Ŷt be the trend value of building materials sales in month t. The trend function we are seeking satisfies the following condition:

2401

0

)ˆ(min tt

t

YYimize

Page 26: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

•Professor Brown has estimated two trend functions—one linear and one non-linear. They are displayed on the the following two slides.

•Later, we explain how you can estimate a trend function using Excel or SPSS.

•The trend of of building materials sales since 1967 is positive and increasing (non-linear).

Page 27: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

-4000

-2000

0

2000

4000

6000

-5000

0

5000

10000

15000

70 75 80 85 90 95 00

Residual Actual Trend

Trend = -771.28 + 25.79t

Page 28: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

-4000

-2000

0

2000

4000

0

5000

10000

15000

70 75 80 85 90 95 00

Residual Actual Trend

Trend = 957.77 + 0.11t + .063t2

Page 29: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

Month/Yr Actual Trend Error squaredNov-79 3666 2492.534 1377022.453Dec-79 3189 2512.42 457760.4964Jan-80 2702 2532.434 28752.62836Feb-80 2432 2552.576 14538.57178Mar-80 2315 2572.846 66484.55972May-80 2517 2593.244 5813.147536Jun-80 2766 2613.77 23173.9729Jul-80 2992 2634.424 127860.5958Aug-80 3071 2655.206 172884.6504Sep-80 3156 2676.116 230288.6535Oct-80 3196 2697.154 248847.3317Nov-80 3337 2718.32 382764.9424Dec-80 3516 2739.614 602775.221Jan-81 3023 2761.036 68625.1373Feb-81 2676 2782.586 11360.5754

Trend = 957.77 + 0.11t + .063t2

Page 30: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

Note that, for February 1981 t= 169

Trend = 957.77 + 0.11t + .063t2

Thus we have:

TrendFeb 81= 957.77 +[(.11)(169)] + [(.063)(1692]

Page 31: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

Month IndexJan 0.881838Feb 0.771714Mar 0.769815Apr 0.931156May 1.029925Jun 1.117446July 1.146187Aug 1.133605Sept 1.139405Oct 1.091675Nov 1.114015Dec 0.989313

•If you sum the indices for each month, and divide by 12, you get 1.00.

•Notice that, on average for the period 1967-2000, July has been the best month for sales of building materials, and February the worst month.

•Later, we will show you a simple technique for constructional a seasonal index—a centered moving average.

Page 32: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

Performing an in-sample forecast of building materials sales

•An in-sample forecast means we are forecasting building material sales for those months for which we already have data that have been used to estimate the trend, seasonal, and other components. Comparing forecasted, or fitted values of building material sales with actual time series data gives us an idea of how well this performs.

•We will assume that the cyclical index is equal to 1 (Ct = 1). This is a poor assumption since our period contains several business cycle episodes.

Page 33: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

Let’s give an example how we we use this model to

forecast building material sales for a particular month,

say, February 1981 again.Recall that t = 169 for

this month

tttFeb CSTMaterials 81

177.)]169)(063[(.)]169)(11[(.77.957 2

Page 34: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

0

4000

8000

12000

16000

70 75 80 85 90 95 00

Multiplicative modelBuilding materials (millions)

In-sample forecasts using the multiplicative time series model

Page 35: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

-3000

-2000

-1000

0

1000

2000

70 75 80 85 90 95 00

Residuals for in-sample forecast

MSE = 179,288root MSE = $423 million

Page 36: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

1500

2000

2500

3000

3500

4000

4500

80:01 80:04 80:07 80:10 81:01 81:04 81:07 81:10 82:01 82:04 82:07 82:10 83:01

Recessionary periods are shaded

Assumption that Ct = 1 results in substantial in-sample forecast errors

Page 37: Slides for Part IV-C Outline: 1.Measuring forecast error 2.The multiplicative time series model 3.Naïve extrapolation 4.The mean forecast model 5.Moving

Month/Year ForecastAug-00 12860.3Sep-00 12926.1Oct-00 12496.7Nov-00 12810.9Dec-00 11428.3Jan-01 10223.2Feb-01 8995.2Mar-01 9013.4Apr-01 10950.9May-01 12167.2Jun-01 13259.9Jul-01 13661.1

Forecasting Sales of Building Materials Using the Multiplicative Time Series Model

All data in millions