Econ 240C Lecture 12
2 Part I: Forecasting Time Series Housing Starts Housing Starts Labs 5 and 7 Labs 5 and 7
3 Capacity Utilization, Mfg. First quarter of 1972-First Quarter 2003 First quarter of 1972-First Quarter 2003 Estimate for a sub-sample Estimate for a sub-sample Test the forecast for sub-sample Test the forecast for sub-sample
4 Identification Process Trace Trace Histogram Histogram Correlogram Correlogram Dickey-Fuller Test Dickey-Fuller Test
5
6
7
8
9 Estimation and Validation Process First Model: cumfn c ar(1) ar(2) First Model: cumfn c ar(1) ar(2) goodness of fit goodness of fit correlogram of residuals correlogram of residuals histogram of residuals histogram of residuals Second Model: cumfn c ar(1) ar(2) ma(8) Second Model: cumfn c ar(1) ar(2) ma(8) goodness of fit goodness of fit correlogram of residuals correlogram of residuals histogram of residuals histogram of residuals
10
11
12
13
14
15
16
17
18 Additional Validation Forecasting within the sample range for the subsample beyond the data range used for estimation Forecasting within the sample range for the subsample beyond the data range used for estimation
19
20
21
22
23
24 Estimation for the whole Period
25
26 Correlogram of Residuals from Estimated Model,
27 Augmenting Data Range for Forecasting Workfile Window in EVIEWS Workfile Window in EVIEWS PROCS menu PROCS menu
28 Equation Window; Forecast Instructions
29
30 Generating Forecast and Upper and Lower Bounds for the 95% Confidence Interval,
31 Compare the Observed to the Forecast Series with Bounds
32 Spreadsheet: Observed, Forecast and Bounds
33 Observed Series, Forecast, and 95% Confidence Interval
34 AdditionalProspective Model Validation How well do the forecasts for compare to future observations? How well do the forecasts for compare to future observations? Do future observations lie within the confidence bounds? Do future observations lie within the confidence bounds?
35 Part II. Augmented Dickey-Fuller Tests A second order autoregressive process A second order autoregressive process lecture 7-Powerpoint lecture 7-Powerpoint
36 Lecture 7-Part III. Autoregressive of the Second Order 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) = WN(t) ARTWO(t) - b 1 *ARTWO(t-1) - b 2 *ARTWO(t- 2) = WN(t) ARTWO(t) - b 1 *Z*ARTWO(t) - b 2 *Z*ARTWO(t) = WN(t) ARTWO(t) - b 1 *Z*ARTWO(t) - b 2 *Z*ARTWO(t) = WN(t) [1 - b 1 *Z - b 2 *Z 2 ] ARTWO(t) = WN(t) [1 - b 1 *Z - b 2 *Z 2 ] ARTWO(t) = WN(t)
37 Triangle of Stable Parameter Space: Heuristic Explanation b 1 = 0 b2b2 1 Draw a line from the vertex, for (b 1 =0, b 2 =1), though the end points for b 1, i.e. through (b 1 =1, b 2 =-1) and (b 1 =-1, b 2 =0), (1, 0)(-1, 0)
38 Triangle of Stable Parameter Space If we are along the right hand diagonal border of the parameter space then we are on the boundary of stability, I.e. there must be a unit root, and from: If we are along the right hand diagonal border of the parameter space then we are on the boundary of stability, I.e. there must be a unit root, and from: [1 - b 1 *Z - b 2 *Z 2 ] ARTWO(t) = WN(t) [1 - b 1 *Z - b 2 *Z 2 ] ARTWO(t) = WN(t) ignoring white noise shocks, ignoring white noise shocks, [1 - b 1 *Z - b 2 *Z 2 ] = [1 -Z][1 + c Z], where multiplying the expressions on the right hand side(RHS), noting that c is a parameter to be solved for and setting the RHS equal to the LHS: [1 - b 1 *Z - b 2 *Z 2 ] = [1 -Z][1 + c Z], where multiplying the expressions on the right hand side(RHS), noting that c is a parameter to be solved for and setting the RHS equal to the LHS:
39 [1 - b 1 *Z - b 2 *Z 2 ] = [1 + (c - 1)Z -c Z 2 ], so - b 1 = c - 1, and - b 2 = -c, or [1 - b 1 *Z - b 2 *Z 2 ] = [1 + (c - 1)Z -c Z 2 ], so - b 1 = c - 1, and - b 2 = -c, or b 1 = 1 - c, (line2) b 1 = 1 - c, (line2) b 2 = c, (line 3) b 2 = c, (line 3) and adding lines 2 and 3: b 1 + b 2 = 1, so and adding lines 2 and 3: b 1 + b 2 = 1, so b 2 = 1 - b 1, the formula for the right hand boundary b 2 = 1 - b 1, the formula for the right hand boundary
40 b 1 + b 2 = 1 is the condition for a unit root for a second order process b 1 + b 2 = 1 is the condition for a unit root for a second order process 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) add b 2 *ARTWO(t-1) - b 2 *ARTWO(t-1) to RHS add b 2 *ARTWO(t-1) - b 2 *ARTWO(t-1) to RHS ARTWO(t) = (b 1 + b 2 ) *ARTWO(t-1) - b 2 *ARTWO(t-1) + b 2 *ARTWO(t-2) + WN(t) ARTWO(t) = (b 1 + b 2 ) *ARTWO(t-1) - b 2 *ARTWO(t-1) + b 2 *ARTWO(t-2) + WN(t)
41 ARTWO(t) = (b 1 + b 2 ) *ARTWO(t-1) - b 2 *[ARTWO(t-1) - *ARTWO(t-2)] + WN(t) ARTWO(t) = (b 1 + b 2 ) *ARTWO(t-1) - b 2 *[ARTWO(t-1) - *ARTWO(t-2)] + WN(t) ARTWO(t) = (b 1 + b 2 ) *ARTWO(t-1) - b 2 ARTWO(t-1) + WN(t) ARTWO(t) = (b 1 + b 2 ) *ARTWO(t-1) - b 2 ARTWO(t-1) + WN(t) subtract ARTWO(t-1) from both sides subtract ARTWO(t-1) from both sides ARTWO(t) = (b 1 + b 2 - 1) *ARTWO(t-1) - b 2 ARTWO(t-1) + WN(t) ARTWO(t) = (b 1 + b 2 - 1) *ARTWO(t-1) - b 2 ARTWO(t-1) + WN(t)
42 Example Capacity utilization manufacturing Capacity utilization manufacturing
43
44
45 ARTWO(t) = (b 1 + b 2 ) *ARTWO(t-1) - b 2 *[ARTWO(t-1) - *ARTWO(t-2)] + WN(t) ARTWO(t) = (b 1 + b 2 ) *ARTWO(t-1) - b 2 *[ARTWO(t-1) - *ARTWO(t-2)] + WN(t) ARTWO(t) = (b 1 + b 2 ) *ARTWO(t-1) - b 2 ARTWO(t-1) + WN(t) ARTWO(t) = (b 1 + b 2 ) *ARTWO(t-1) - b 2 ARTWO(t-1) + WN(t) subtract ARTWO(t-1) from both sides subtract ARTWO(t-1) from both sides ARTWO(t) = (b 1 + b 2 - 1) *ARTWO(t-1) - b 2 ARTWO(t-1) + WN(t) ARTWO(t) = (b 1 + b 2 - 1) *ARTWO(t-1) - b 2 ARTWO(t-1) + WN(t)
46 Part III. Lab Seven New privately owned housing units and the 30 year conventional mortgage rate, April 1974-March 2003 New privately owned housing units and the 30 year conventional mortgage rate, April 1974-March 2003 starts(t) = c 0 mort(t) + c 1 mort(t-1) + c 2 mort(t-2) + … + resid(t) starts(t) = c 0 mort(t) + c 1 mort(t-1) + c 2 mort(t-2) + … + resid(t) starts(t) = c 0 mort(t) + c 1 Zmort(t) + c 2 Z 2 mort(t) + … + resid(t) starts(t) = c 0 mort(t) + c 1 Zmort(t) + c 2 Z 2 mort(t) + … + resid(t) starts(t) = [c 0 + c 1 Z + c 2 Z 2 + …] mort(t) + resid(t) starts(t) = [c 0 + c 1 Z + c 2 Z 2 + …] mort(t) + resid(t)
47 Output starts(t) C(Z) Input mort(t) Dynamic relationship + + Resid(t)
48 Identification Process for Mortrate Trace Trace Histogram Histogram Correlogram Correlogram Dickey-Fuller Test Dickey-Fuller Test
49
50
51
52
53 Looks like a unit root in the mortgage rate, so prewhiten by differencing Looks like a unit root in the mortgage rate, so prewhiten by differencing starts(t) = [c 0 + c 1 Z + c 2 Z 2 + …] mort(t) + resid(t) starts(t) = [c 0 + c 1 Z + c 2 Z 2 + …] mort(t) + resid(t)
54 Identification Process for dmort Trace Trace Histogram Histogram Correlogram Correlogram Dickey-Fuller Test Dickey-Fuller Test
55
56
57
58
59 Estimation of Model for dmort
60
61
62
63
64 Dstart(t) = C(Z) dmort(t) + dresid(t) Dstart(t) = C(Z) dmort(t) + dresid(t) dmort(t) = reside(t), where reside(t) = 0.577*reside(t-1) *reside(t-2) + N dm dmort(t) = reside(t), where reside(t) = 0.577*reside(t-1) *reside(t-2) + N dm dmort(t) = 0.577*dmort(t-1) *dmort(t-2) + N dm,, save N dm by GENR resdm=resid dmort(t) = 0.577*dmort(t-1) *dmort(t-2) + N dm,, save N dm by GENR resdm=resid dmort(t) *Zdmort(t) *Z 2 dmort(t) = N dm dmort(t) *Zdmort(t) *Z 2 dmort(t) = N dm
65 dmort(t) *Zdmort(t) *Z 2 dmort(t) = N dm dmort(t) *Zdmort(t) *Z 2 dmort(t) = N dm [ *Z *Z 2 ]dmort(t) = N dm [ *Z *Z 2 ]dmort(t) = N dm Dstart(t) = C(Z) dmort(t) + dresid(t) Dstart(t) = C(Z) dmort(t) + dresid(t) [ *Z *Z 2 ]*Dstart(t) = C(Z)* [ *Z *Z 2 ]dmort(t) + [ *Z *Z 2 ] dresid(t) [ *Z *Z 2 ]*Dstart(t) = C(Z)* [ *Z *Z 2 ]dmort(t) + [ *Z *Z 2 ] dresid(t) [ *Z *Z 2 ]*Dstart(t) = C(Z)* N dm + [ *Z *Z 2 ]* dresid(t) [ *Z *Z 2 ]*Dstart(t) = C(Z)* N dm + [ *Z *Z 2 ]* dresid(t)
66 Transform dstart(t) Transform dstart(t) w(t) = [ *Z *Z 2 ]*Dstart(t) w(t) = [ *Z *Z 2 ]*Dstart(t) Cross-correlate w(t) and N dm to reveal C(Z) Cross-correlate w(t) and N dm to reveal C(Z) w(t) = c 0 N dm + c 1 N dm (t-1) + c 2 N dm (t-2) +... dresidw(t) w(t) = c 0 N dm + c 1 N dm (t-1) + c 2 N dm (t-2) +... dresidw(t) Then specify and estimate the model: Then specify and estimate the model: w(t) = c 0 N dm + c 1 N dm (t-1) + c 2 N dm (t-2) +... dresidw(t) w(t) = c 0 N dm + c 1 N dm (t-1) + c 2 N dm (t-2) +... dresidw(t) where dresidw(t)=[ *Z *Z 2 ]* dresid(t) where dresidw(t)=[ *Z *Z 2 ]* dresid(t)
67