Download presentation
Presentation is loading. Please wait.
1
1 ECON 240C Lecture 10
2
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 3 Forecasting Seasonal Difference in the Fractional Change Estimation period: 1949.01 – 1960.12 Estimation period: 1949.01 – 1960.12 Forecast period: 1961.01 – 1961.12 Forecast period: 1961.01 – 1961.12
4
4 4 Eviews forecast command window
5
5 5 Eviews plot of forecast plus or minus two standard errors Of the forecast
6
6 6 Eviews spreadsheet view of the forecast and the standard Error of the forecast
7
7 7 Using the Quick Menu and the show command to create Your own plot or display of the forecast
9
9 9 Note: EViews sets the forecast variable equal to the observed Value for 1949.01-1960.12.
10
10 To Differentiate the Forecast from the observed variable …. In the spread sheet window, click on edit, and copy the forecast values for 1961.01-1961.12 to a new column and paste. Label this column forecast. In the spread sheet window, click on edit, and copy the forecast values for 1961.01-1961.12 to a new column and paste. Label this column forecast.
11
11 Note: EViews sets the forecast variable equal to the observed Value for 1949.01-1960.12.
12
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
13 Qick menu, show command window
15
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
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
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
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
20
As advertised, either order of differencing results in the Same pre-whitened variable
21
21 Using Eviews to Recolor DSDlnBJP(t) = SDlnBJPASS(t) – SDBJPASS(t-1) DSDlnBJP(t) = SDlnBJPASS(t) – SDBJPASS(t-1) DSDlnBJP(1961.01) = SDlnBJPASS(1961.01) – SDlnBJPASS(1960.12) DSDlnBJP(1961.01) = SDlnBJPASS(1961.01) – SDlnBJPASS(1960.12) 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(1961.01) = DSDlnBJPF(1961.01) + SDlnBJPASS(1960.12) SDlnBJPASSF(1961.01) = DSDlnBJPF(1961.01) + SDlnBJPASS(1960.12) We can use this formula in iterative fashion as SDlnBJPASSF(1961.01) = DSDlnBJPF(1961.01) + SDlnBJPASSF(1960.12), but we need an initial value for SDlnBJPASSF(1960.12) since this is the last time period before forecasting. We can use this formula in iterative fashion as SDlnBJPASSF(1961.01) = DSDlnBJPF(1961.01) + SDlnBJPASSF(1960.12), but we need an initial value for SDlnBJPASSF(1960.12) since this is the last time period before forecasting.
22
22 The initial value This problem is easily solved by generating SDlnBJPASSF(1960.12) = SDlnBJPASS(1960.12) This problem is easily solved by generating SDlnBJPASSF(1960.12) = SDlnBJPASS(1960.12)
23
23 Recoloring: Generating the forecast of the seasonal difference in lnBJPASS
25
25 Forecast of sdlnbjpa
26
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(1961.01) = lnBJPASS(1960.12) + SDlnBJPASSF(1961.01) Rearranging and putting in terms of the forecasts lnBJPASSF(1961.01) = lnBJPASS(1960.12) + SDlnBJPASSF(1961.01) 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
27
29
29 lnbjpassf
30
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
31
32
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
33
35
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
36
37
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
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
39 Simulated ARTWO ARTWO = 0.6*ARTWO(-1) - 0.8*ARTWO(-2)+ WN ARTWO = 0.6*ARTWO(-1) - 0.8*ARTWO(-2)+ WN
40
40
41
41
42
42 Estimated Coefficients: Simulated ARTWO
43
43 Privately Owned Housing Starts
44
44
45
45
46
46
47
47
48
48
49
49
50
50
51
51
52
52
53
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
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
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
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
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
58
59
59
60
60
61
61
62
62
63
63
64
64 5% - 1.65
65
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
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
67
68
68
69
69 Augmented Dickey- Fuller Tests
70
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
71 Part III. Spring 2002 Midterm
72
72
73
73
74
74
75
75
76
76
77
77
78
78
79
79
80
80
81
81
82
82
83
83
84
84
85
85
86
86
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.