1 ECON 240C Lecture 10. 2 2Outline Box-Jenkins Passengers Box-Jenkins Passengers Displaying the Forecast Displaying the Forecast Recoloring Recoloring.

Slides:



Advertisements
Similar presentations
Nonstationary Time Series Data and Cointegration
Advertisements

Exercise 7.5 (p. 343) Consider the hotel occupancy data in Table 6.4 of Chapter 6 (p. 297)
Applied Econometrics Second edition
Operations Management For Competitive Advantage © The McGraw-Hill Companies, Inc., 2001 C HASE A QUILANO J ACOBS ninth edition 1Forecasting Operations.
Using SAS for Time Series Data
STATIONARY AND NONSTATIONARY TIME SERIES
Nonstationary Time Series Data and Cointegration Prepared by Vera Tabakova, East Carolina University.
Non-stationary data series
Economics 20 - Prof. Anderson1 Testing for Unit Roots Consider an AR(1): y t =  +  y t-1 + e t Let H 0 :  = 1, (assume there is a unit root) Define.
Economics 20 - Prof. Anderson1 Time Series Data y t =  0 +  1 x t  k x tk + u t 2. Further Issues.
Unit Roots & Forecasting
Slide 1 DSCI 5340: Predictive Modeling and Business Forecasting Spring 2013 – Dr. Nick Evangelopoulos Lecture 7: Box-Jenkins Models – Part II (Ch. 9) Material.
By Hrishikesh Gadre Session II Department of Mechanical Engineering Louisiana State University Engineering Equation Solver Tutorials.
1 Power Nine Econ 240C. 2 Outline Lab Three Exercises Lab Three Exercises –Fit a linear trend to retail and food sales –Add a quadratic term –Use both.
Qualitative Forecasting Methods
Econ 240 C Lecture I. Work in Groups II. You will be graded based on a PowerPoint presentation and a written report. III. Your report should have.
1 Econ 240 C Lecture 3. 2 Part I Modeling Economic Time Series.
1 Econ 240 C Lecture White noise inputoutput 1/(1 – z) White noise input output Random walkSynthesis 1/(1 – bz) White noise input output.
1 Econ 240 C Lecture Time Series Concepts Analysis and Synthesis.
1 Lecture Eleven Econ 240C. 2 Outline Review Stochastic Time Series –White noise –Random walk –ARONE: –ARTWO –ARTHREE –ARMA(2,2) –MAONE*SMATWELVE.
1 Midterm Review. 2 Outline The Triangle of Stability - Power 7 The Triangle of Stability - Power 7 Augmented Dickey-Fuller Tests – Power 10 Augmented.
1 Power 2 Econ 240C. 2 Lab 1 Retrospective Exercise: –GDP_CAN = a +b*GDP_CAN(-1) + e –GDP_FRA = a +b*GDP_FRA(-1) + e.
Maximum likelihood Conditional distribution and likelihood Maximum likelihood estimations Information in the data and likelihood Observed and Fisher’s.
Econ 240C Lecture Part I: Forecasting Time Series Housing Starts Housing Starts Labs 5 and 7 Labs 5 and 7.
Data Sources The most sophisticated forecasting model will fail if it is applied to unreliable data Data should be reliable and accurate Data should be.
1 Power Nine Econ 240C. 2 Outline Lab Three Exercises Lab Three Exercises –Fit a linear trend to retail and food sales –Add a quadratic term –Use both.
1 Econ 240C Lecture Five Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one.
1 Econ 240 C Lecture 3. 2 Time Series Concepts Analysis and Synthesis.
1 Power Nine Econ 240C. 2 Outline Lab Three Exercises Lab Three Exercises –Fit a linear trend to retail and food sales –Add a quadratic term –Use both.
Econ 240 C Lecture Outline Exponential Smoothing Exponential Smoothing Back of the envelope formula: geometric distributed lag: L(t) = a*y(t-1)
1 Econ 240C Lecture Five. 2 Outline w Box-Jenkins Models: the grand design w What do you need to learn? w Preview of partial autocorrelation function.
1 ECON 240C Lecture 8. 2 Outline: 2 nd Order AR Roots of the quadratic Roots of the quadratic Example: capumfg Example: capumfg Polar form Polar form.
1 ECON 240C Lecture 8. 2 Part I. Economic Forecast Project Santa Barbara County Seminar –April 17, 2003 URL:
1 ECON 240C Lecture 8. 2 Outline: 2 nd Order AR Roots of the quadratic Roots of the quadratic Example: change in housing starts Example: change in housing.
1 Econ 240C Lecture Five Outline w Box-Jenkins Models w Time Series Components Model w Autoregressive of order one.
Econ 240 C Lecture Re-Visit Santa Barbara South Coast House Price Santa Barbara South Coast House Price UC Budget, General Fund UC Budget, General.
1 ECON 240C Lecture 8. 2 Part I. Economic Forecast Project Santa Barbara County Seminar Santa Barbara County Seminar  April 22, 2004 (April 17, 2003)
1 Econ 240A Power 7. 2 This Week, So Far §Normal Distribution §Lab Three: Sampling Distributions §Interval Estimation and Hypothesis Testing.
1 Lab Four Postscript Econ 240 C. 2 Airline Passengers.
1 Power Nine Econ 240C. 2 Outline Lab Three Exercises Lab Three Exercises –Fit a linear trend to retail sales –Add a quadratic term –Use both models to.
1 ECON 240C Lecture 8. 2 Outline: 2 nd Order AR Roots of the quadratic Roots of the quadratic Example: change in housing starts Example: change in housing.
Econ 240 C Lecture Part I: Exponential Smoothing Exponential smoothing is a technique that is useful for forecasting short time series where there.
Solving System of Linear Equations. 1. Diagonal Form of a System of Equations 2. Elementary Row Operations 3. Elementary Row Operation 1 4. Elementary.
Business Forecasting Chapter 4 Data Collection and Analysis in Forecasting.
1 Doing Statistics for Business Doing Statistics for Business Data, Inference, and Decision Making Marilyn K. Pelosi Theresa M. Sandifer Chapter 11 Regression.
Mathematics for Economics and Business Jean Soper chapter two Equations in Economics 1.
Demand Management and Forecasting
Operations Management For Competitive Advantage 1Forecasting Operations Management For Competitive Advantage Chapter 11.
Autoregressive Integrated Moving Average (ARIMA) Popularly known as the Box-Jenkins methodology.
Forecasting Operations Management For Competitive Advantage.
Regression Analysis Part C Confidence Intervals and Hypothesis Testing
HAWKES LEARNING SYSTEMS Students Matter. Success Counts. Copyright © 2013 by Hawkes Learning Systems/Quant Systems, Inc. All rights reserved. Section 12.3.
How do we identify non-stationary processes? (A) Informal methods Thomas 14.1 Plot time series Correlogram (B) Formal Methods Statistical test for stationarity.
TESTING FOR NONSTATIONARITY 1 This sequence will describe two methods for detecting nonstationarity, a graphical method involving correlograms and a more.
Stat 112 Notes 14 Assessing the assumptions of the multiple regression model and remedies when assumptions are not met (Chapter 6).
Irwin/McGraw-Hill © Andrew F. Siegel, 1997 and l Chapter 14 l Time Series: Understanding Changes over Time.
Lecture 8: Ordinary Least Squares Estimation BUEC 333 Summer 2009 Simon Woodcock.
TESTING FOR NONSTATIONARITY 1 This sequence will describe two methods for detecting nonstationarity, a graphical method involving correlograms and a more.
1 Econ 240C Lecture Five. 2 Part I: Time Series Components Model w The conceptual framework for inertial (mechanical) time series models: w Time series.
Lecture 12 Time Series Model Estimation Materials for lecture 12 Read Chapter 15 pages 30 to 37 Lecture 12 Time Series.XLSX Lecture 12 Vector Autoregression.XLSX.
Lecture 12 Time Series Model Estimation
Nonstationary Time Series Data and Cointegration
Financial Econometrics Lecture Notes 2
Econ 240 C Lecture 4.
ECON 240C Lecture 7.
Autocorrelation.
Unit Root & Augmented Dickey-Fuller (ADF) Test
Eviews Tutorial for Labor Economics Lei Lei
Autocorrelation.
Time Series introduction in R - Iñaki Puigdollers
Presentation transcript:

1 ECON 240C Lecture 10

2 2Outline Box-Jenkins Passengers Box-Jenkins Passengers Displaying the Forecast Displaying the Forecast Recoloring Recoloring ARTWO’s and cycles ARTWO’s and cycles Time series Time series Autocorrelation function Autocorrelation function Private housing Starts- Single Units Private housing Starts- Single Units Review: Unit Roots Review: Unit Roots Midterm 2002 Midterm 2002

3 3 Forecasting Seasonal Difference in the Fractional Change Estimation period: – Estimation period: – Forecast period: – Forecast period: –

4 4 Eviews forecast command window

5 5 Eviews plot of forecast plus or minus two standard errors Of the forecast

6 6 Eviews spreadsheet view of the forecast and the standard Error of the forecast

7 7 Using the Quick Menu and the show command to create Your own plot or display of the forecast

9 9 Note: EViews sets the forecast variable equal to the observed Value for

10 To Differentiate the Forecast from the observed variable …. In the spread sheet window, click on edit, and copy the forecast values for to a new column and paste. Label this column forecast. In the spread sheet window, click on edit, and copy the forecast values for to a new column and paste. Label this column forecast.

11 Note: EViews sets the forecast variable equal to the observed Value for

12 Displaying the Forecast Now you are ready to use the Quick menu and the show command to make a more pleasing display of the data, the forecast, and its approximate 95% confidence interval. Now you are ready to use the Quick menu and the show command to make a more pleasing display of the data, the forecast, and its approximate 95% confidence interval.

13 Qick menu, show command window

15 Recoloring The seasonal difference of the fractional change in airline passengers may be appropriately pre- whitened for Box-Jenkins modeling, but it is hardly a cognitive or intuitive mode for understanding the data. Fortunately, the transformation process is reversible and we recolor, i.e put back the structure we removed with the transformations by using the definitions of the transformations themselves The seasonal difference of the fractional change in airline passengers may be appropriately pre- whitened for Box-Jenkins modeling, but it is hardly a cognitive or intuitive mode for understanding the data. Fortunately, the transformation process is reversible and we recolor, i.e put back the structure we removed with the transformations by using the definitions of the transformations themselves

16 Recoloring Summation or integration is the opposite of differencing. Summation or integration is the opposite of differencing. The definition of the first difference is: (1-Z) x(t) = x(t) –x(t-1) The definition of the first difference is: (1-Z) x(t) = x(t) –x(t-1) But if we know x(t-1) at time t-1, and we have a forecast for (1-Z) x(t), then we can rearrange the differencing equation and do summation to calculate x(t): x(t) = x 0 (t-1) + E t-1 (1-Z) x(t) But if we know x(t-1) at time t-1, and we have a forecast for (1-Z) x(t), then we can rearrange the differencing equation and do summation to calculate x(t): x(t) = x 0 (t-1) + E t-1 (1-Z) x(t) This process can be executed on Eviews by using the Generate command This process can be executed on Eviews by using the Generate command

17 Recoloring In the case of airline passengers, it is easier to undo the first difference first and then undo the seasonal difference. For this purpose, it is easier to take the transformations in the order, natural log, seasonal difference, first difference In the case of airline passengers, it is easier to undo the first difference first and then undo the seasonal difference. For this purpose, it is easier to take the transformations in the order, natural log, seasonal difference, first difference Note: (1-Z)(1-Z 12 )lnBJPASS(t) = (1-Z 12 )(1-Z) lnBJPASS(t), i.e the ordering of differencing does not matter Note: (1-Z)(1-Z 12 )lnBJPASS(t) = (1-Z 12 )(1-Z) lnBJPASS(t), i.e the ordering of differencing does not matter

19 Correlogram of Seasonal Difference in log of passengers. Note there is still structure, decay in the ACF, requiring A first difference to further prewhiten

As advertised, either order of differencing results in the Same pre-whitened variable

21 Using Eviews to Recolor DSDlnBJP(t) = SDlnBJPASS(t) – SDBJPASS(t-1) DSDlnBJP(t) = SDlnBJPASS(t) – SDBJPASS(t-1) DSDlnBJP( ) = SDlnBJPASS( ) – SDlnBJPASS( ) DSDlnBJP( ) = SDlnBJPASS( ) – SDlnBJPASS( ) So we can rearrange to calculate forecast values of SDlnBJPASS from the forecasts for DSDlnBJP So we can rearrange to calculate forecast values of SDlnBJPASS from the forecasts for DSDlnBJP SDlnBJPASSF( ) = DSDlnBJPF( ) + SDlnBJPASS( ) SDlnBJPASSF( ) = DSDlnBJPF( ) + SDlnBJPASS( ) We can use this formula in iterative fashion as SDlnBJPASSF( ) = DSDlnBJPF( ) + SDlnBJPASSF( ), but we need an initial value for SDlnBJPASSF( ) since this is the last time period before forecasting. We can use this formula in iterative fashion as SDlnBJPASSF( ) = DSDlnBJPF( ) + SDlnBJPASSF( ), but we need an initial value for SDlnBJPASSF( ) since this is the last time period before forecasting.

22 The initial value This problem is easily solved by generating SDlnBJPASSF( ) = SDlnBJPASS( ) This problem is easily solved by generating SDlnBJPASSF( ) = SDlnBJPASS( )

23 Recoloring: Generating the forecast of the seasonal difference in lnBJPASS

25 Forecast of sdlnbjpa

26 Recoloring to Undo the Seasonal Difference in the Log of Passengers Use the definition: SDlnBJPASS(t) = lnBJPASS(t) – lnBJPASS(t-12), Use the definition: SDlnBJPASS(t) = lnBJPASS(t) – lnBJPASS(t-12), Rearranging and putting in terms of the forecasts lnBJPASSF( ) = lnBJPASS( ) + SDlnBJPASSF( ) Rearranging and putting in terms of the forecasts lnBJPASSF( ) = lnBJPASS( ) + SDlnBJPASSF( ) In this case we do not need to worry about initial values in the iteration because we are going back twelve months and adding the forecast for the seasonal difference In this case we do not need to worry about initial values in the iteration because we are going back twelve months and adding the forecast for the seasonal difference

27

29 lnbjpassf

30 The Harder Part is Over Once the difference and the seasonal difference have been undone by summation, the rest requires less attention to detail, plus double checking, to make sure your commands to Eviews were correct. Once the difference and the seasonal difference have been undone by summation, the rest requires less attention to detail, plus double checking, to make sure your commands to Eviews were correct.

31

32 The Last Step To convert the forecast of lnBJPASS to the forecast of BJPASS use the inverse of the logarithmic transformation, namely the exponential To convert the forecast of lnBJPASS to the forecast of BJPASS use the inverse of the logarithmic transformation, namely the exponential

33

35 Confidence Intervals The confidence interval can be generated as: The confidence interval can be generated as: Lnupper = lnbjpass + 2*sef Lnupper = lnbjpass + 2*sef Lnlower = lnbjpassf-2*sef Lnlower = lnbjpassf-2*sef And then exponentiated: And then exponentiated: Upper= exp(lnupper) Upper= exp(lnupper) Lower=exp(lnlower) Lower=exp(lnlower)

36

37 Part I: ARTWO’s and Cycles ARTWO(t) = b 1 ARTWO(t-1) + b 2 ARTWO(t-2) + WN(t) ARTWO(t) = b 1 ARTWO(t-1) + b 2 ARTWO(t-2) + WN(t) ARTWO(t) = b 1 ARTWO(t-1) + b 2 ARTWO(t-2) is the homogenous deterministic part of the equation after dropping the stochastic part, WN(t). ARTWO(t) = b 1 ARTWO(t-1) + b 2 ARTWO(t-2) is the homogenous deterministic part of the equation after dropping the stochastic part, WN(t). Substitute y 2-u for ARTWO(t-u) to obtain: Substitute y 2-u for ARTWO(t-u) to obtain: y 2 =b 1 y 1 + b 2 y 0 y 2 =b 1 y 1 + b 2 y 0 Or y 2 - b 1 y 1 - b 2 = 0, which is a quadratic Or y 2 - b 1 y 1 - b 2 = 0, which is a quadratic

38 Note that the corresponding equation for the autocorrelation function has the same behavior: Note that the corresponding equation for the autocorrelation function has the same behavior:  (2) = b 1  (1) + b 2  (0)  (2) = b 1  (1) + b 2  (0) Let y 2-u  2-u), then Let y 2-u  2-u), then y 2 =b 1 y 1 + b 2 y 0 y 2 =b 1 y 1 + b 2 y 0 The same homogeneous equation for the autocorrelation function as for the process, so if the process cycles so will the autocorrelation function The same homogeneous equation for the autocorrelation function as for the process, so if the process cycles so will the autocorrelation function

39 Simulated ARTWO ARTWO = 0.6*ARTWO(-1) - 0.8*ARTWO(-2)+ WN ARTWO = 0.6*ARTWO(-1) - 0.8*ARTWO(-2)+ WN

40

41

42 Estimated Coefficients: Simulated ARTWO

43 Privately Owned Housing Starts

44

45

46

47

48

49

50

51

52

53 Part II: Unit Roots First Order Autoregressive or RandomWalk? First Order Autoregressive or RandomWalk? y(t) = b*y(t-1) + wn(t) y(t) = b*y(t-1) + wn(t) y(t) = y(t-1) + wn(t) y(t) = y(t-1) + wn(t)

54 Unit Roots y(t) = b*y(t-1) + wn(t) y(t) = b*y(t-1) + wn(t) we could test the null: b=1 against b<1 we could test the null: b=1 against b<1 instead, subtract y(t-1) from both sides: instead, subtract y(t-1) from both sides: y(t) - y(t-1) = b*y(t-1) - y(t-1) + wn(t) y(t) - y(t-1) = b*y(t-1) - y(t-1) + wn(t) or  y(t) = (b -1)*y(t-1) + wn(t) or  y(t) = (b -1)*y(t-1) + wn(t) so we could regress  y(t) on y(t-1) and test the coefficient for y(t-1), i.e. so we could regress  y(t) on y(t-1) and test the coefficient for y(t-1), i.e.  y(t) = g*y(t-1) + wn(t), where g = (b-1)  y(t) = g*y(t-1) + wn(t), where g = (b-1) test null: (b-1) = 0 against (b-1)< 0 test null: (b-1) = 0 against (b-1)< 0

55 Unit Roots i.e. test b=1 against b<1 i.e. test b=1 against b<1 This would be a simple t-test except for a problem. As b gets closer to one, the distribution of (b-1) is no longer distributed as Student’s t distribution This would be a simple t-test except for a problem. As b gets closer to one, the distribution of (b-1) is no longer distributed as Student’s t distribution Dickey and Fuller simulated many time series with b=0.99, for example, and looked at the distribution of the estimated coefficient Dickey and Fuller simulated many time series with b=0.99, for example, and looked at the distribution of the estimated coefficient

56 Unit Roots Dickey and Fuller tabulated these simulated results into Tables Dickey and Fuller tabulated these simulated results into Tables In specifying Dickey-Fuller tests there are three formats: no constant-no trend, constant-no trend, and constant-trend, and three sets of tables. In specifying Dickey-Fuller tests there are three formats: no constant-no trend, constant-no trend, and constant-trend, and three sets of tables.

57 Unit Roots Example: the price of gold, weekly data, January 1992 through December 1999 Example: the price of gold, weekly data, January 1992 through December 1999

58

59

60

61

62

63

64 5%

65 Dickey-Fuller Tests The price of gold might vary around a “constant”, for example the marginal cost of production The price of gold might vary around a “constant”, for example the marginal cost of production P G (t) = MC G + RW(t) = MC G + WN(t)/[1-Z] P G (t) = MC G + RW(t) = MC G + WN(t)/[1-Z] P G (t) - MC G = RW(t) = WN(t)/[1-Z] P G (t) - MC G = RW(t) = WN(t)/[1-Z] [1-Z][P G (t) - MC G ] = WN(t) [1-Z][P G (t) - MC G ] = WN(t) [P G (t) - MC G ] - [P G (t-1) - MC G ] = WN(t) [P G (t) - MC G ] - [P G (t-1) - MC G ] = WN(t) [P G (t) - MC G ] = [P G (t-1) - MC G ] + WN(t) [P G (t) - MC G ] = [P G (t-1) - MC G ] + WN(t)

66 Dickey-Fuller Tests Or: [P G (t) - MC G ] = b* [P G (t-1) - MC G ] + WN(t) Or: [P G (t) - MC G ] = b* [P G (t-1) - MC G ] + WN(t) P G (t) = MC G + b* P G (t-1) - b*MC G + WN(t) P G (t) = MC G + b* P G (t-1) - b*MC G + WN(t) P G (t) = (1-b)*MC G + b* P G (t-1) + WN(t) P G (t) = (1-b)*MC G + b* P G (t-1) + WN(t) subtract P G (t-1) subtract P G (t-1) P G (t) - P G (t-1) = (1-b)*MC G + b* P G (t-1) - P G (t-1) + WN(t) P G (t) - P G (t-1) = (1-b)*MC G + b* P G (t-1) - P G (t-1) + WN(t) or  P G (t) = (1-b)*MC G + (1-b)* P G (t-1) + WN(t) or  P G (t) = (1-b)*MC G + (1-b)* P G (t-1) + WN(t) Now there is an intercept as well as a slope Now there is an intercept as well as a slope

67

68

69 Augmented Dickey- Fuller Tests

70 ARTWO’s and Unit Roots Recall the edge of the triangle of stability: b 2 = 1 – b 1, so for stability b 1 + b 2 < 1 Recall the edge of the triangle of stability: b 2 = 1 – b 1, so for stability b 1 + b 2 < 1 x(t) = b 1 x(t-1) + b 2 x(t-2) + wn(t) x(t) = b 1 x(t-1) + b 2 x(t-2) + wn(t) Subtract x(t-1) from both sides Subtract x(t-1) from both sides x(t) – x(-1) = (b 1 – 1)x(t-1) + b 2 x(t-2) + wn(t) x(t) – x(-1) = (b 1 – 1)x(t-1) + b 2 x(t-2) + wn(t) Add and subtract b 2 x(t-1) from the right side: Add and subtract b 2 x(t-1) from the right side: x(t) – x(-1) = (b 1 + b 2 - 1) x(t-1) - b 2 [x(t-1) - x(t-2)] + wn(t) x(t) – x(-1) = (b 1 + b 2 - 1) x(t-1) - b 2 [x(t-1) - x(t-2)] + wn(t) Null hypothesis: (b 1 + b 2 - 1) = 0 Null hypothesis: (b 1 + b 2 - 1) = 0 Alternative hypothesis: (b 1 + b 2 -1)<0 Alternative hypothesis: (b 1 + b 2 -1)<0

71 Part III. Spring 2002 Midterm

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86