Econ 240 C - PowerPoint PPT Presentation

econ 240 c n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Econ 240 C PowerPoint Presentation
play fullscreen
1 / 86
Econ 240 C
154 Views
Download Presentation
erin-lucas
Download Presentation

Econ 240 C

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. 1 Econ 240 C Lecture 14

  2. Part I: Exponential Smoothing • Exponential smoothing is a technique that is useful for forecasting short time series where there may not be enough observations to estimate a Box-Jenkins model • Exponential smoothing can be understood from many perspectives; one perspective is a formula that could be calculated by hand

  3. Simple exponential smoothing • Simple exponential smoothing, also known as single exponential smoothing, is most appropriate for a time series that is a random walk with first order moving average error structure • The levels term, L(t), is a weighted average of the observation lagged one, y(t-1) plus the previous levels, L(t-1): • L(t) = a*y(t-1) + (1-a)*L(t-1)

  4. Single exponential smoothing • The parameter a is chosen to minimize the sum of squared errors where the error is the difference between the observation and the levels term: e(t) = y(t) – L(t) • The forecast for period t+1 is given by the formula: L(t+1) = a*y(t) + (1-a)*L(t) • Example from John Heinke and Arthur Reitsch, Business Forecasting, 6th Ed.

  5. Single exponential smoothing • For observation #1, set L(1) = Sales(1) = 500, as an initial condition • As a trial value use a = 0.1 • So L(2) = 0.1*Sales(1) + 0.9*Level(1) L(2) = 0.1*500 + 0.9*500 = 500 • And L(3) = 0.1*Sales(2) + 0.9*Level(2) L(2) = 0.1*350 + 0.9*500 = 485

  6. a = 0.1

  7. Single exponential smoothing • So the formula can be used to calculate the rest of the levels values, observation #4-#24 • This can be set up on a spread-sheet

  8. a = 0.1

  9. Single exponential smoothing • The forecast for observation #25 is: L(25) = 0.1*sales(24)+0.9*(24) • Forecast(25)=Levels(25)=0.1*650+0.9*449 • Forecast(25) = 469.1

  10. Single exponential distribution • The errors can now be calculated: e(t) = sales(t) – levels(t)

  11. a = 0.1

  12. a = 0.1

  13. a = 0.1

  14. Single exponential smoothing • For a = 0.1, the sum of squared errors is: S = (errors)2 = 582,281.2 • A grid search can be conducted for the parameter value a, to find the value between 0 and 1 that minimizes the sum of squared errors • The calculations of levels, L(t), and errors, e(t) = sales(t) – L(t) for a =0.6

  15. a = 0.6

  16. Single exponential smoothing Forecast(25) = Levels(25) = 0.6*sales(24) + 0.4*levels(24) = 0.6*650 + 0.4*465 = 776

  17. a = 0.6

  18. Single exponential smoothing • Grid search plot

  19. Single Exponential Smoothing • EVIEWS: Algorithmic search for the smoothing parameter a • In EVIEWS, select time series sales(t), and open • In the sales window, go to the PROCS menu and select exponential smoothing • Select single • the best parameter a = 0.26 with sum of squared errors = 472982.1 and root mean square error = 140.4 = (472982.1/24)1/2 • The forecast, or end of period levels mean = 532.4

  20. Forecast = L(25) = 0.26*Sales(24) + 0.74L(24) = 532.4

  21. Part II. Three Perspectives on Single Exponential Smoothing • The formula perspective • L(t) = a*y(t-1) + (1 - a)*L(t-1) • e(t) = y(t) - L(t) • The Box-Jenkins Perspective • The Updating Forecasts Perspective

  22. Box Jenkins Perspective • Use the error equation to substitute for L(t) in the formula, L(t) = a*y(t-1) + (1 - a)*L(t-1) • L(t) = y(t) - e(t) • y(t) - e(t) = a*y(t-1) + (1 - a)*[y(t-1) - e(t-1)] y(t) = e(t) -y(t-1) - (1-a)*e(t-1) • or Dy(t) = y(t) - y(t-1) = e(t) - (1-a) e(t-1) • So y(t) is a random walk plus MAONE noise, i.e y(t) is a (0,1,1) process where (p,d,q) are the orders of AR, differencing, and MA.

  23. Box-Jenkins Perspective • In Lab Eight, we will apply simple exponential smoothing to retail sales, a process you used for forecasting trend in Lab 3, and which can be modeled as (0,1,1).

  24. Box-Jenkins Perspective • If the smoothing parameter approaches one, then y(t) is a random walk: • Dy(t) = y(t) - y(t-1) = e(t) - (1-a) e(t-1) • if a = 1, then Dy(t) = y(t) - y(t-1) = e(t) • In Lab Eight, we will use the price of gold, which we used in Lab 4, to make this point

  25. Box-Jenkins Perspective • The levels or forecast, L(t), is a geometric distributed lag of past observations of the series, y(t), hence the name “exponential” smoothing • L(t) = a*y(t-1) + (1 - a)*L(t-1) • L(t) = a*y(t-1) + (1 - a)*ZL(t) • L(t) - (1 - a)*ZL(t) = a*y(t-1) • [1 - (1-a)Z] L(t) = a*y(t-1) • L(t) = {1/ [1 - (1-a)Z]} a*y(t-1) • L(t) = [1 +(1-a)Z + (1-a)2 Z2 + …] a*y(t-1) • L(t) = a*y(t-1) + (1-a)*a*y(t-2) + (1-a)2a*y(t-3) + ….

  26. The Updating Forecasts Perspective • Use the error equation to substitute for y(t) in the formula, L(t) = a*y(t-1) + (1 - a)*L(t-1) • y(t) = L(t) + e(t) • L(t) = a*[L(t-1) + e(t-1)] + (1 - a)*L(t-1) • So L(t) = L(t-1) + a*e(t-1), • i.e. the forecast for period t is equal to the forecast for period t-1 plus a fraction a of the forecast error from period t-1.

  27. Part III. Double Exponential Smoothing • With double exponential smoothing, one estimates a “trend” term, R(t), as well as a levels term, L(t), so it is possible to forecast, f(t), out more than one period • f(t+k) = L(t) + k*R(t), k>=1 • L(t) = a*y(t) + (1-a)*[L(t-1) + R(t-1)] • R(t) = b*[L(t) - L(t-1)] + (1-b)*R(t-1) • so the trend, R(t), is a geometric distributed lag of the change in levels, DL(t)

  28. Part III. Double Exponential Smoothing • If the smoothing parameters a = b, then we have double exponential smoothing • If the smoothing parameters are different, then it is the simplest version of Holt-Winters smoothing

  29. Part III. Double Exponential Smoothing • Holt- Winters can also be used to forecast seasonal time series, e.g. monthly • f(t+k) = L(t) + k*R(t) + S(t+k-12) k>=1 • L(t) = a*[y(t)-S(t-12)]+ (1-a)*[L(t-1) + R(t-1)] • R(t) = b*[L(t) - L(t-1)] + (1-b)*R(t-1) • S(t) = c*[y(t) - L(t)] + (1-c)*S(t-12)

  30. Part IV. Dickey Fuller Tests: Trend

  31. Stochastic Trends: Random Walks with Drift • We have discussed earlier in the course how to model the Total Return to the Standard and Poor’s 500 Index • One possibility is this time series could be a random walk around a deterministic trend” • Sp500(t) = exp{a + d*t +WN(t)/[1-Z]} • And taking logarithms,

  32. Stochastic Trends: Random Walks with Drift • Lnsp500(t) = a + d*t + WN(t)/[1-Z] • Lnsp500(t) –a –d*t = WN(t)/[1-Z] • Multiplying through by the difference operator, D = [1-Z] • [1-Z][Lnsp500(t) –a –d*t] = WN(t-1) • [LnSp500(t) – a –d*t] - [LnSp500(t-1) – a –d*(t-1)] = WN(t) • D Lnsp500(t) = d + WN(t)

  33. So the fractional change in the total return to the S&P 500 is drift, d, plus white noise • More generally, • y(t) = a + d*t + {1/[1-Z]}*WN(t) • [y(t) –a –d*t] = {1/[1-Z]}*WN(t) • [y(t) –a –d*t]- [y(t-1) –a –d*(t-1)] = WN(t) • [y(t) –a –d*t]= [y(t-1) –a –d*(t-1)] + WN(t) • Versus the possibility of an ARONE:

  34. [y(t) –a –d*t]=b*[y(t-1)–a–d*(t-1)]+WN(t) • Or y(t) = [a*(1-b)+b*d]+[d*(1-b)]*t+b*y(t-1) +wn(t) • Subtracting y(t-1) from both sides’ • D y(t) = [a*(1-b)+b*d] + [d*(1-b)]*t + (b-1)*y(t-1) +wn(t) • So the coefficient on y(t-1) is once again interpreted as b-1, and we can test the null that this is zero against the alternative it is significantly negative. Note that we specify the equation with both a constant, • [a*(1-b)+b*d] and a trend [d*(1-b)]*t

  35. Example • Lnsp500(t) from Lab 2

  36. Part V. Intervention Analysis

  37. Intervention Analysis • The approach to intervention analysis parallels Box-Jenkins in that the actual estimation is conducted after pre-whitening, to the extent that non-stationarity such as trend and seasonality are removed • Example: preview of Lab 8

  38. Telephone Directory Assistance • A telephone company was receiving increased demand for free directory assistance, i.e. subscribers asking operators to look up numbers. This was increasing costs and the company changed policy, providing a number of free assisted calls to subscribers per month, but charging a price per call after that number.

  39. Telephone Directory Assistance • This policy change occurred at a known time, March 1974 • The time series is for calls with directory assistance per month • Did the policy change make a difference?