1 / 144

Forecasting using simple models

Forecasting using simple models. Outline. Basic forecasting models The basic ideas behind each model When each model may be appropriate Illustrate with examples Forecast error measures Automatic model selection Adaptive smoothing methods (automatic alpha adaptation)

fleur-solis
Download Presentation

Forecasting using simple models

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Forecasting using simple models

  2. Outline • Basic forecasting models • The basic ideas behind each model • When each model may be appropriate • Illustrate with examples • Forecast error measures • Automatic model selection • Adaptive smoothing methods • (automatic alpha adaptation) • Ideas in model based forecasting techniques • Regression • Autocorrelation • Prediction intervals

  3. Basic Forecasting Models • Moving average and weighted moving average • First order exponential smoothing • Second order exponential smoothing • First order exponential smoothing with trends and/or seasonal patterns • Croston’s method

  4. M-Period Moving Average • i.e. the average of the last M data points • Basically assumes a stable (trend free) series • How should we choose M? • Advantages of large M? • Advantages of large M? • Average age of data = M/2

  5. Weighted Moving Averages • The Wi are weights attached to each historical data point • Essentially all known (univariate) forecasting schemes are weighted moving averages • Thus, don’t screw around with the general versions unless you are an expert

  6. Simple Exponential Smoothing • Pt+1(t) = Forecast for time t+1 made at time t • Vt = Actual outcome at time t • 0<<1 is the “smoothing parameter”

  7. Two Views of Same Equation • Pt+1(t) = Pt(t-1) + [Vt – Pt(t-1)] • Adjust forecast based on last forecast error OR • Pt+1(t) = (1- )Pt(t-1) + Vt • Weighted average of last forecast and last Actual

  8. Simple Exponential Smoothing • Is appropriate when the underlying time series behaves like a constant + Noise • Xt =  + Nt • Or when the mean  is wandering around • That is, for a quite stable process • Not appropriate when trends or seasonality present

  9. ES would work well here

  10. Simple Exponential Smoothing • We can show by recursive substitution that ES can also be written as: • Pt+1(t) = Vt + (1-)Vt-1 + (1-)2Vt-2 + (1-)3Vt-3 +….. • Is a weighted average of past observations • Weights decay geometrically as we go backwards in time

  11. Simple Exponential Smoothing • Ft+1(t) = At + (1-)At-1 + (1-)2At-2 + (1-)3At-3 +….. • Large  adjusts more quickly to changes • Smaller  provides more “averaging” and thus lower variance when things are stable • Exponential smoothing is intuitively more appealing than moving averages

  12. Exponential Smoothing Examples

  13. Zero Mean White Noise

  14. Shifting Mean + Zero Mean White Noise

  15. Automatic selection of  • Using historical data • Apply a range of  values • For each, calculate the error in one-step-ahead forecasts • e.g. the root mean squared error (RMSE) • Select the  that minimizes RMSE

  16. RMSE vs Alpha 1.45 1.4 1.35 RMSE 1.3 1.25 1.2 1.15 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Alpha

  17. Recommended Alpha • Typically alpha should be in the range 0.05 to 0.3 • If RMSE analysis indicates larger alpha, exponential smoothing may not be appropriate

  18. Might look good, but is it?

  19. Series and Forecast using Alpha=0.9 2 1.5 1 Forecast 0.5 0 -0.5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Period

  20. Forecast RMSE vs Alpha 0.67 0.66 0.65 0.64 0.63 Forecast RMSE 0.62 Series1 0.61 0.6 0.59 0.58 0.57 0 0.2 0.4 0.6 0.8 1 Alpha

  21. Forecast RMSE vs Alpha for Lake Huron Data 1.1 1.05 1 0.95 0.9 RMSE 0.85 0.8 0.75 0.7 0.65 0.6 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Alpha

  22. Forecast RMSE vs Alpha for Monthly Furniture Demand Data 45.6 40.6 35.6 30.6 25.6 RMSE 20.6 15.6 10.6 5.6 0.6 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Alpha

  23. Exponential smoothing will lag behind a trend • Suppose Xt=b0+ b1t • And St= (1- )St-1 + Xt • Can show that

  24. Double Exponential Smoothing • Modifies exponential smoothing for following a linear trend • i.e. Smooth the smoothed value

  25. St Lags St[2] Lags even more

  26. 2St -St[2] doesn’t lag

  27. Example

  28. =0.2

  29. Single Lags a trend

  30. 6 5 4 Double Over-shoots a change (must “re-learn” the slope) 3 Trend 2 Series Data Single Smoothing Double smoothing 1 0 -1 1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96 101

  31. Holt-Winters Trend and Seasonal Methods • “Exponential smoothing for data with trend and/or seasonality” • Two models, Multiplicative and Additive • Models contain estimates of trend and seasonal components • Models “smooth”, i.e. place greater weight on more recent data

  32. Winters Multiplicative Model • Xt = (b1+b2t)ct + t • Where ct are seasonal terms and • Note that the amplitude depends on the level of the series • Once we start smoothing, the seasonal components may not add to L

  33. Holt-Winters Trend Model • Xt = (b1+b2t) + t • Same except no seasonal effect • Works the same as the trend + season model except simpler

More Related