ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting:...

49
1 ACEMS Forecasting Workshop Rob J Hyndman 1 Forecast Evaluation

Transcript of ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting:...

Page 1: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

1

ACEMSForecastingWorkshop

Rob J Hyndman

1 Forecast Evaluation

Page 2: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Outline

1 Introduction

2 Benchmark methods

3 Residual diagnostics

4 Lab Session 1

5 Evaluating forecast accuracy

6 Lab Session 2

7 Forecast densities

2

Page 3: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Resources

robjhyndman.com/acemsforecasting2018

SlidesExercisesTextbookUseful links

3

Page 4: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Key reference

Hyndman, R. J. & Athanasopoulos, G.(2018) Forecasting: principles andpractice, 2nd ed.

OTexts.org/fpp2/

Free and onlineData sets in associated R packageR code for examples

install.packages("fpp2", dependencies=TRUE) 4

Page 5: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Outline

Topic Chapter

1 Forecast evaluation 32 ARIMA models 83 Dynamic regression 94 Hierarchical forecasting 10

5

Page 6: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Outline

1 Introduction

2 Benchmark methods

3 Residual diagnostics

4 Lab Session 1

5 Evaluating forecast accuracy

6 Lab Session 2

7 Forecast densities

6

Page 7: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Some simple forecasting methods

400

450

500

1995 2000 2005 2010

Year

meg

alitr

es

Australian quarterly beer production

7How would you forecast these data?

Page 8: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Some simple forecasting methods

80

90

100

110

1990 1991 1992 1993 1994 1995

Year

thou

sand

s

Number of pigs slaughtered in Victoria

8How would you forecast these data?

Page 9: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Some simple forecasting methods

3600

3700

3800

3900

4000

0 50 100 150 200 250 300

Day

Dow−Jones index

9How would you forecast these data?

Page 10: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Some simple forecasting methodsAverage method

Forecast of all future values is equal to mean ofhistorical data {y1, . . . , yT}.Forecasts: yT+h|T = y = (y1 + · · · + yT)/T

Naïve methodForecasts equal to last observed value.Forecasts: yT+h|T = yT.Consequence of efficient market hypothesis.

Seasonal naïve methodForecasts equal to last value from same season.Forecasts: yT+h|T = yT+h−km wherem = seasonalperiod and k is integer part of (h− 1)/m.

10

Page 11: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Some simple forecasting methodsAverage method

Forecast of all future values is equal to mean ofhistorical data {y1, . . . , yT}.Forecasts: yT+h|T = y = (y1 + · · · + yT)/T

Naïve methodForecasts equal to last observed value.Forecasts: yT+h|T = yT.Consequence of efficient market hypothesis.

Seasonal naïve methodForecasts equal to last value from same season.Forecasts: yT+h|T = yT+h−km wherem = seasonalperiod and k is integer part of (h− 1)/m.

10

Page 12: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Some simple forecasting methodsAverage method

Forecast of all future values is equal to mean ofhistorical data {y1, . . . , yT}.Forecasts: yT+h|T = y = (y1 + · · · + yT)/T

Naïve methodForecasts equal to last observed value.Forecasts: yT+h|T = yT.Consequence of efficient market hypothesis.

Seasonal naïve methodForecasts equal to last value from same season.Forecasts: yT+h|T = yT+h−km wherem = seasonalperiod and k is integer part of (h− 1)/m. 10

Page 13: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Some simple forecasting methods

Drift methodForecasts equal to last value plus averagechange.Forecasts:

yT+h|T = yT +h

T − 1

T∑t=2

(yt − yt−1)

= yT +h

T − 1(yT − y1).

Equivalent to extrapolating a line drawn betweenfirst and last observations.

11

Page 14: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Some simple forecasting methods

400

450

500

1995 2000 2005 2010

Year

Meg

alitr

es

Forecast

Mean

Naïve

Seasonal naïve

Forecasts for quarterly beer production

12

Page 15: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Some simple forecasting methods

3600

3700

3800

3900

4000

0 50 100 150 200 250 300

Day

Forecast

Drift

Mean

Naïve

Dow Jones Index (daily ending 15 Jul 94)

13

Page 16: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Some simple forecasting methods

Mean: meanf(y, h=20)

Naïve: naive(y, h=20)

Seasonal naïve: snaive(y, h=20)

Drift: rwf(y, drift=TRUE, h=20)

14

Page 17: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Outline

1 Introduction

2 Benchmark methods

3 Residual diagnostics

4 Lab Session 1

5 Evaluating forecast accuracy

6 Lab Session 2

7 Forecast densities

15

Page 18: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Fitted values

yt|t−1 is the forecast of yt based on observationsy1, . . . , yt.We call these “fitted values”.Sometimes drop the subscript: yt ≡ yt|t−1.Often not true forecasts since parameters areestimated on all data.

For example:yt = y for average method.yt = yt−1 + (yT − y1)/(T − 1) for drift method.

16

Page 19: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Forecasting residuals

Residuals in forecasting: difference betweenobserved value and its fitted value: et = yt − yt|t−1.

Assumptions

1 {et} uncorrelated. If they aren’t, then informationleft in residuals that should be used in computingforecasts.

2 {et} have mean zero. If they don’t, then forecasts arebiased.

Useful properties (for prediction intervals)

3 {et} have constant variance.4 {et} are normally distributed.

17

Page 20: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Forecasting residuals

Residuals in forecasting: difference betweenobserved value and its fitted value: et = yt − yt|t−1.

Assumptions

1 {et} uncorrelated. If they aren’t, then informationleft in residuals that should be used in computingforecasts.

2 {et} have mean zero. If they don’t, then forecasts arebiased.

Useful properties (for prediction intervals)

3 {et} have constant variance.4 {et} are normally distributed.

17

Page 21: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Forecasting residuals

Residuals in forecasting: difference betweenobserved value and its fitted value: et = yt − yt|t−1.

Assumptions

1 {et} uncorrelated. If they aren’t, then informationleft in residuals that should be used in computingforecasts.

2 {et} have mean zero. If they don’t, then forecasts arebiased.

Useful properties (for prediction intervals)

3 {et} have constant variance.4 {et} are normally distributed. 17

Page 22: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Example: Google stock priceautoplot(goog200) +xlab("Day") + ylab("Closing Price (US$)") +ggtitle("Google Stock (daily ending 6 December 2013)")

400

450

500

0 50 100 150 200

Day

Clo

sing

Pric

e (U

S$)

Google Stock (daily ending 6 December 2013)

18

Page 23: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Example: Google stock pricefits <- fitted(naive(goog200))autoplot(goog200, series="Data") +autolayer(fits, series="Fitted") +xlab("Day") + ylab("Closing Price (US$)") +ggtitle("Google Stock (daily ending 6 December 2013)")

400

450

500

0 50 100 150 200

Day

Clo

sing

Pric

e (U

S$)

series

Data

Fitted

Google Stock (daily ending 6 December 2013)

19

Page 24: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

checkresiduals function

checkresiduals(naive(goog200), test=FALSE)

0

20

40

60

0 50 100 150 200

Residuals from Naive method

−0.15

−0.10

−0.05

0.00

0.05

0.10

0.15

0 5 10 15 20

Lag

AC

F

0

10

20

30

40

−20 0 20 40 60

residuals

coun

t

20

Page 25: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Outline

1 Introduction

2 Benchmark methods

3 Residual diagnostics

4 Lab Session 1

5 Evaluating forecast accuracy

6 Lab Session 2

7 Forecast densities

21

Page 26: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Lab Session 1

22

Page 27: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Outline

1 Introduction

2 Benchmark methods

3 Residual diagnostics

4 Lab Session 1

5 Evaluating forecast accuracy

6 Lab Session 2

7 Forecast densities

23

Page 28: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Training and test sets

time

Training data Test data

A model which fits the training data well will notnecessarily forecast well.A perfect fit can always be obtained by using amodel with enough parameters.Over-fitting a model to data is just as bad asfailing to identify a systematic pattern in thedata.The test set must not be used for any aspect ofmodel development or calculation of forecasts.Forecast accuracy is based only on the test set. 24

Page 29: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Forecast errors

Forecast “error”: the difference between an observedvalue and its forecast.

eT+h = yT+h − yT+h|T,

where the training data is given by {y1, . . . , yT}

Unlike residuals, forecast errors on the test setinvolve multi-step forecasts.These are true forecast errors as the test data isnot used in computing yT+h|T.

25

Page 30: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Measures of forecast accuracy

400

450

500

0 50 100 150 200

Day

Pric

e

Forecast Method

Mean

Naive

Drift

Forecasts for GOOG stock price

26

Page 31: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Measures of forecast accuracy

yT+h = (T + h)th observation, h = 1, . . . ,HyT+h|T = its forecast based on data up to time T.eT+h = yT+h − yT+h|T

MAE = mean(|eT+h|)MSE = mean(e2T+h) RMSE =

√mean(e2T+h)

MAPE = 100mean(|eT+h|/|yT+h|)

MAE, MSE, RMSE are all scale dependent.MAPE is scale independent but is only sensible ifyt � 0 for all t, and y has a natural zero.

27

Page 32: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Measures of forecast accuracy

yT+h = (T + h)th observation, h = 1, . . . ,HyT+h|T = its forecast based on data up to time T.eT+h = yT+h − yT+h|T

MAE = mean(|eT+h|)MSE = mean(e2T+h) RMSE =

√mean(e2T+h)

MAPE = 100mean(|eT+h|/|yT+h|)

MAE, MSE, RMSE are all scale dependent.MAPE is scale independent but is only sensible ifyt � 0 for all t, and y has a natural zero.

27

Page 33: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Measures of forecast accuracy

Mean Absolute Scaled Error

MASE = T−1T∑t=1|yt − yt|t−1|/Q

where Q is a stable measure of the scale of the timeseries {yt}.

Proposed by Hyndman and Koehler (IJF, 2006).

For non-seasonal time series,

Q = (T − 1)−1T∑t=2|yt − yt−1|

works well. Then MASE is equivalent to MAE relativeto a naïve method. 28

Page 34: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Measures of forecast accuracy

Mean Absolute Scaled Error

MASE = T−1T∑t=1|yt − yt|t−1|/Q

where Q is a stable measure of the scale of the timeseries {yt}.

Proposed by Hyndman and Koehler (IJF, 2006).

For seasonal time series,

Q = (T −m)−1T∑

t=m+1|yt − yt−m|

works well. Then MASE is equivalent to MAE relativeto a seasonal naïve method. 29

Page 35: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Measures of forecast accuracy

400

450

500

0 50 100 150 200

Day

Pric

e

Forecast Method

Mean

Naive

Drift

Forecasts for GOOG stock price

30

Page 36: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Measures of forecast accuracygoogtrain <- window(goog200,end=180)googfc1 <- meanf(googtrain,h=20)googfc2 <- rwf(googtrain,h=20)googfc3 <- rwf(googtrain,h=20,drift=TRUE)accuracy(googfc1, goog200)accuracy(googfc2, goog200)accuracy(googfc3, goog200)

RMSE MAE MAPE MASE

Mean method 82.89 82.43 15.93 21.61Naïve method 18.29 16.04 3.08 4.21Drift method 11.34 9.71 1.86 2.55

31

Page 37: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Poll: true or false?

1 Good forecast methods should have normallydistributed residuals.

2 A model with small residuals will give goodforecasts.

3 The best measure of forecast accuracy is MAPE.4 If your model doesn’t forecast well, you should

make it more complicated.5 Always choose the model with the best forecast

accuracy as measured on the test set.

32

Page 38: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Outline

1 Introduction

2 Benchmark methods

3 Residual diagnostics

4 Lab Session 1

5 Evaluating forecast accuracy

6 Lab Session 2

7 Forecast densities

33

Page 39: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Lab Session 2

34

Page 40: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Outline

1 Introduction

2 Benchmark methods

3 Residual diagnostics

4 Lab Session 1

5 Evaluating forecast accuracy

6 Lab Session 2

7 Forecast densities

35

Page 41: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Sample futures

2.5

5.0

7.5

10.0

1980 1990 2000 2010 2020

Year

Mill

ions

of v

isito

rs

Data

Future 1

Future 2

Future 3

Future 4

Future 5

Future 6

Future 7

Future 8

Future 9

Total international visitors to Australia

36

Page 42: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Prediction intervals

2.5

5.0

7.5

10.0

1980 1990 2000 2010 2020

Year

Mill

ions

of v

isito

rs

level

80

95

Data

Future 1

Future 2

Future 3

Future 4

Future 5

Future 6

Future 7

Future 8

Future 9

Forecasts of total international visitors to Australia

37

Page 43: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Prediction intervals

A forecast yT+h|T is (usually) the mean of theconditional distribution yT+h | y1, . . . , yT.

A prediction interval gives a region within whichwe expect yT+h to lie with a specified probability.

Assuming forecast errors are normallydistributed, then a 95% PI is

yT+h|T ± 1.96σh

where σh is the st dev of the h-step distribution.

When h = 1, σh can be estimated from theresiduals. 38

Page 44: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Prediction intervals

Drift forecasts with prediction interval:

rwf(goog200, level=95, drift=TRUE)

## Point Forecast Lo 95 Hi 95

## 201 532.2 520.0 544.3

## 202 532.9 515.6 550.1

## 203 533.6 512.4 554.7

## 204 534.3 509.8 558.7

## 205 535.0 507.5 562.4

## 206 535.7 505.5 565.8

## 207 536.4 503.7 569.0

## 208 537.1 502.1 572.0

## 209 537.7 500.6 574.9

## 210 538.4 499.2 577.7

39

Page 45: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Prediction intervals

Point forecasts are often useless withoutprediction intervals.Prediction intervals require a stochastic model(with random errors, etc).Multi-step forecasts for time series require amore sophisticated approach (with PI gettingwider as the forecast horizon increases).Check residual assumptions before believingthem.Usually too narrow due to unaccounteduncertainty. 40

Page 46: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Prediction intervals

Assume residuals are normal, uncorrelated, sd = σ:

Mean forecasts: σh = σ√1 + 1/T

Naïve forecasts: σh = σ√h

Seasonal naïve forecasts σh = σ√k + 1

Drift forecasts: σh = σ√h(1 + h/T).

where k is the integer part of (h− 1)/m.

Note that when h = 1 and T is large, these all give thesame approximate value σ. 41

Page 47: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Evaluating prediction intervals

Winkler scoreIf the 100(1−α)% prediction interval is given by [`, u],and the observed value is y, then the Winkler intervalscore is

(u− `) + 2α(`− y)1(y < `) + 2

α(y − u)1(y > u).

penalizes for wide intervals (since u− ` will belarge);penalizes for non-coverage with observationswell outside the interval being penalized moreheavily.

42

Page 48: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Evaluating quantile forecasts

Let qp be the quantile forecast with probability 1− pof exceedance.Pin-ball loss function

L(qp, y) = (1−p)(qp−y)1(y < qp)+p(y−qp)1(y ≥ qp).

average over all target quantiles (e.g., 0.01, 0.02,. . . , 0.99) and all forecast horizons.

Reference: Gneiting and Raftery (JASA, 2007)

43

Page 49: ACEMS Forecasting Workshop - Rob J. Hyndman€¦ · Forecasting residuals Residuals in forecasting: di˙erence between observed value and its ˝tted value: e t = y t −ˆy t|t−1.

Evaluating quantile forecasts

44