Presentation is loading. Please wait.

Presentation is loading. Please wait.

ECON 240C Lecture 7.

Similar presentations


Presentation on theme: "ECON 240C Lecture 7."— Presentation transcript:

1 ECON 240C Lecture 7

2 Outline Autoregressive of Order two, one , and zero
The boundaries of stability for parameters b1, b2

3 Autoregressive Processes
Order two: x(t) = b1 * x(t-1) + b2 * x(t-2) + wn(t) If b2 = 0, then of order one: x(t) = b1 * x(t-1) + wn(t) If b1 = b2 = 0, then of order zero: x(t) = wn(t)

4 Quadratic Form and Roots
x(t) = b1 * x(t-1) + b2 * x(t-2) + wn(t) is a second order stochastic difference equation. If you drop the stochastic term, wn(t), then you have a second order deterministic difference equation: x(t) = b1 * x(t-1) + b2 * x(t-2) , Or, x(t) - b1 * x(t-1) - b2 * x(t-2) = 0 And substituting y2-u for x(t-u), y2 – b1*y – b2 = 0, we have a quadratic equation

5 Roots and stability Recall, for a first order autoregressive process, x(t) – b1 *x(t-1)= wn(t), i.e. where b2 = 0, then if we drop the stochastic term, and substitute y1-u for x(t-u), then y – b1 =0, and the root is b1 . This root is unstable, i.e. a random walk if b1 = 1. In an analogous fashion, for a second order process, if b1 = 0, then x(t) = b2 *x(t-2) + wn(t), similar to a first order process with a time interval twice as long, and if the root b2 =1, we have a random walk and instability

6 Unit Roots and Instability
Suppose one root is unity, i.e. we are on the boundary of instability, then factoring the quadratic from above, y2 – b1*y – b2 = (y -1)*(y –c), where (y-1) is the root, y=1, and c is a constant. Multiplying out the right hand side and equating coefficients on the terms for y2, y, and y0 on the left hand side: y2 – b1*y – b2 = y2 –y –c*y + c = y2 –(1+c)*y + c So – b1 = -(1+c), and –b2 = c Or b1 + b2 =1, and b2 = 1 – b1 , the equation for a boundary of the triangle

7 Triangle of Stable Parameter Space
If b2 = 0, then we have a first order process, ARTWO(t) = b1 ARTWO(t-1) + WN(t), and for stability -1<b1 <1 -1 1 b1

8 Triangle of Stable Parameter Space
If b1 = 0, then we have a process, ARTWO(t) = b2 ARTWO(t-2) + WN(t), that behaves like a first order process with the time interval two periods instead of one period. For example, starting at ARTWO(0) at time zero, ARTWO(2) = b2 ARTWO(0) , ignoring the white noise shocks, and ARTWO(4) = b2 ARTWO(2) = b22 ARTWO(0) and for stability -1<b2 <1

9 Triangle of Stable Parameter Space
1 b2 b1 = 0 -1

10 Triangle of Stable Parameter Space:
Boundary points b2 = 1 – b1 If b1 = 0, b2 = 1, If b1 = 1, b2 =0, If b2 = -1, b1 =2 1 b2 -1 b1 = 0 +1 -1 Draw a horizontal line through (0, -1) for (b1, b2)

11 Triangle of Stable Parameter Space:
(0, 1) b2 (-1, 0) (1, 0) b1 = 0 (0, -1) Draw a line from the vertex, for (b1=0, b2=1), though the end points for b1, i.e. through (b1=1, b2= 0) and (b1=-1, b2=0),

12 Triangle of Stable Parameter Space:
(0,1) b2 = 1 - b1 b2 (-1, 0) (1, 0) b1 = 0 (2, -1) -1 Note: along the boundary, when b1 = 0, b2 = 1, when b1 = 1, b2 = 0, and when b2 = -1, b2 = 2.

13 Triangle of Stable Parameter Space:
(0, 1) b2 b1<0 b2>0 b1>0 b2>0 (-1, 0) (1, 0) b1<0 b2<0 b1 = 0 b1>0 b2<0 (0, -1)

14 Is the behavior different in each Quadrant?
(0, 1) II b2 b1<0 b2>0 b1>0 b2>0 (-1, 0) I (1, 0) b1<0 b2<0 b1 = 0 b1>0 b2<0 III IV (0, -1)

15 We could study with simulation

16 Is the behavior different in each Quadrant?
(0, 1) II b2 b1= -0.3 b2= 0.3 b1= 0.3 b2= 0.3 (-1, 0) I (1, 0) b1= -0.3 b2= -0.3 b1 = 0 b1= 0.3 b2= -0.3 III IV (0, -1)

17 Simulation Sample 1 1000 Genr wn=nrnd Sample 1 2 Genr artwo =wn
Genr artwo = 0.3*artwo(-1)+0.3*artwo(-2) + wn

18 (0, 1) (-0.3, 0.3) 0.3, 0.3) (-1, 0) (1, 0) (-0.3, -0.3) (0.3, -0.3) (0, -1)

19 Three Study Possibilities
I. Analytical derivation II. Simulation III. Empirical “analysis” or deconstruction Capacity utilization, manufacturing

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46 Forecast C = 0 E dcaputmfg(2006.4) - C ] = E {0.278*[dcaputmfg(2006.3) - C] [dcaputmfg(2006.2)- C] + wn*(2006.4)} E dcapumfg(2006.4) = 0.278*[0.2] *[-0.3] E dcapumfg(2006.4) = *[0.2] [-0.3] E dcapumfg(2006.4) = – = Forecast ~ with ser = 0.582

47

48

49

50

51

52

53 Forecast through end of 2006

54

55 Three Study Possibilities
I. Analytical derivation II. Simulation III. Empirical “analysis” or deconstruction Capacity utilization, manufacturing Private housing starts

56

57

58

59

60

61

62

63

64 Correlogram of residuals from ARTWO
Model of Starts. Significant Q-stat. No obvious pattern

65

66

67 Correlogram of residuals from
ARTHREE Model of Starts

68

69

70

71

72

73

74

75

76 Correlogram of residuals from
ARTWO Model of dstarts. Q-stats better

77 Quadratic roots ax2 + bx +c = 0 y2 – b1*y – b2 = 0
If b12 + 4b2 <0 then we have the square root of a negative Number, and imaginary or complex roots. For example, (-4)1/2 = 2(-1)1/2 =2i, where i is the imaginary number

78

79

80 (-0.34, -0.14) dstarts (1.49, ) capumfg

81 Part III. Autoregressive of the Second Order
ARTWO(t) = b1 *ARTWO(t-1) + b2 *ARTWO(t-2) + WN(t) ARTWO(t) - b1 *ARTWO(t-1) - b2 *ARTWO(t-2) = WN(t) ARTWO(t) - b1 *Z*ARTWO(t) - b2 *Z*ARTWO(t) = WN(t) [1 - b1 *Z - b2 *Z2] ARTWO(t) = WN(t)

82 Autocovariance Function
ARTWO(t) = b1 *ARTWO(t-1) + b2 *ARTWO(t-2) + WN(t) Using x(t) for ARTWO, x(t) = b1 *x(t-1) + b2 *x(t-2) + WN(t) By lagging and substitution, one can show that x(t-1) depends on earlier shocks, so multiplying by x(t-1) and taking expectations

83 Autocovariance Function
x(t) = b1 *x(t-1) + b2 *x(t-2) + WN(t) x(t)*x(t-1) = b1 *[x(t-1)]2 + b2 *x(t-1)*x(t-2) + x(t-1)*WN(t) Ex(t)*x(t-1) = b1 *E[x(t-1)]2 + b2 *Ex(t-1)*x(t-2) +E x(t-1)*WN(t) gx, x (1) = b1 * gx, x (0) + b2 * gx, x (1) + 0, where Ex(t)*x(t-1), E[x(t-1)]2 , and Ex(t-1)*x(t-2) follow by definition and E x(t-1)*WN(t) = 0 since x(t-1) depends on earlier shocks and is independent of WN(t)

84 Autocovariance Function
gx, x (1) = b1 * gx, x (0) + b2 * gx, x (1) dividing though by gx, x (0) rx, x (1) = b1 * rx, x (0) + b2 * rx, x (1), so rx, x (1) - b2 * rx, x (1) = b1 * rx, x (0), and rx, x (1)[ 1 - b2 ] = b1 , or rx, x (1) = b1 /[ 1 - b2 ] Note: if the parameters, b1 and b2 are known, then one can calculate the value of rx, x (1)

85 Autocovariance Function
x(t) = b1 *x(t-1) + b2 *x(t-2) + WN(t) x(t)*x(t-2) = b1 *[x(t-1)x(t-2)] + b2 *[x(t-2)]2 + x(t-2)*WN(t) Ex(t)*x(t-2) = b1 *E[x(t-1)x(t-2)] + b2 *E[x(t-2)]2 +E x(t-2)*WN(t) gx, x (2) = b1 * gx, x (1) + b2 * gx, x (0) + 0, where Ex(t)*x(t-2), E[x(t-2)]2 , and Ex(t-1)*x(t-2) follow by definition and E x(t-2)*WN(t) = 0 since x(t-2) depends on earlier shocks and is independent of WN(t)

86 Autocovariance Function
gx, x (2) = b1 * gx, x (1) + b2 * gx, x (0) dividing though by gx, x (0) rx, x (2) = b1 * rx, x (1) + b2 * rx, x (0) Note: if the parameters, b1 and b2 are known, then one can calculate the value of rx, x (1), as we did above from rx, x (1) = b1 /[ 1 - b2 ], and then calculate rx, x (2).

87 Autocorrelation Function
rx, x (2) = b1 * rx, x (1) + b2 * rx, x (0) Note also the recursive nature of this formula, so rx, x (u) = b1 * rx, x (u-1) + b2 * rx, x (u-2), for u>=2. Thus we can map from the parameter space to the autocorrelation function. How about the other way around?

88 Yule-Walker Equations
From slide 20 above, rx, x (1) = b1 * rx, x (0) + b2 * rx, x (1), and so b1 = rx, x (1) - b2 * rx, x (1) From slide 23 above, rx, x (2) = b1 * rx, x (1) + b2 * rx, x (0), or b2 = rx, x (2) - b1 * rx, x (1) , and substituting for b1 from line 3 above b2 = rx, x (2) - [rx, x (1) - b2 * rx, x (1)] rx, x (1)

89 Yule-Walker Equations
b2 = rx, x (2) - {[rx, x (1)]2 - b2 * [rx, x (1)]2 } so b2 = rx, x (2) - [rx, x (1)]2 + b2 * [rx, x (1)]2 and b2 - b2 * [rx, x (1)]2 = rx, x (2) - [rx, x (1)]2 so b2 [1- rx, x (1)]2 = rx, x (2) - [rx, x (1)]2 and b2 = {rx, x (2) - [rx, x (1)]2}/ [1- rx, x (1)]2 This is the formula for the partial autocorrelation at lag two.

90 Partial Autocorrelation Function
b2 = {rx, x (2) - [rx, x (1)]2}/ [1- rx, x (1)]2 Note: If the process is really autoregressive of the first order, then rx, x (2) = b2 and rx, x (1) = b, so the numerator is zero, i.e. the partial autocorrelation function goes to zero one lag after the order of the autoregressive process. Thus the partial autocorrelation function can be used to identify the order of the autoregressive process.

91 Partial Autocorrelation Function
If the process is first order autoregressive then the formula for b1 = b is: b1 = b =ACF(1), so this is used to calculate the PACF at lag one, i.e. PACF(1) =ACF(1) = b1 = b. For a third order autoregressive process, x(t) = b1 *x(t-1) + b2 *x(t-2) + b3 *x(t-3) + WN(t), we would have to derive three Yule-Walker equations by first multiplying by x(t-1) and then by x(t-2) and lastly by x(t-3), and take expectations.

92 Partial Autocorrelation Function
Then these three equations could be solved for b3 in terms of rx, x (3), rx, x (2), and rx, x (1) to determine the expression for the partial autocorrelation function at lag three. EVIEWS does this and calculates the PACF at higher lags as well.

93 Part IV. Forecasting Trend

94 Lab Two: LNSP500

95 Note: Autocorrelated Residual

96 Autocorrelation Confirmed from the Correlogram of the Residual

97 Visual Representation of the Forecast

98 Numerical Representation of the Forecast

99 Note: The Fitted Trend Line Forecasts Above the Observations

100 One Period Ahead Forecast
Note the standard error of the regression is Note: the standard error of the forecast is Diebold refers to the forecast error without parameter uncertainty, which will just be the standard error of the regression or with parameter uncertainty, which accounts for the fact that the estimated intercept and slope are uncertain as well

101 Parameter Uncertainty
Trend model: y(t) = a + b*t + e(t) Fitted model:

102 Parameter Uncertainty
Estimated error

103 Forecast Formula

104 Forecast Et

105 Forecast Forecast = a + b*(t+1) + 0

106 Variance in the Forecast Error

107

108 Part II: Autocovariance of a First Order Moving Average Process
MAONE(t) = WN(t) + a*WN(t-1) MAONE(t) = WN(t) + a*Z*WN(t) MAONNE(t) = [! + a*Z]WN(t) Mean Function, m(t) = E[WN(t) + a*WN(t-1)] = 0

109 Autocovariance at Lag Zero
E[MAONE(t)*MAONE(t)] = E{[WN(t) + a*WN(t-1)][WN(t) + a*WN(t-1)]} E{MAONE(t)*MAONE(t)} =EWN(t)*WN(t) +2EaWN(t) WN(t-1) + Ea2WN(t-1)WN(t-1) E{MAONE(t)*MAONE(t)}= s2 +a2 s2

110 Autocovariance at Lag One
E[MAONE(t)*MAONE(t-1)] = E{[WN(t) + a WN(t-1)][WN(t-1) + a WN(t-2)]} = a s2 rMA,MA (1) = a/(1 + a2)

111 Autocovariance at Lag two
E[MAONE(t)*MAONE(t-2)] = E{[WN(t) + a WN(t-1)][WN(t-2) + a WN(t-3)]} = 0 Note: there are no cross-product terms of white noise that are at the same time period, so by the property of independence, rMA,MA (u) = 0, u>1 Note that the the autocorrelations are zero for lags greater than the order of the MA process, so that the autocorrelation function identifies the order of an MA process.

112 Autocorrelation Function, Moving Average of the first Order

113 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: [1 - b1 *Z - b2 *Z2] ARTWO(t) = WN(t) ignoring white noise shocks, [1 - b1 *Z - b2 *Z2] = [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:

114 [1 - b1 *Z - b2 *Z2] = [1 + (c - 1)Z -c Z2], so - b1 = c - 1, and - b2 = -c, or
b1 = 1 - c , (line2) b2 = c , (line 3) and adding lines 2 and 3: b1 + b2 = 1, so b2 = 1 - b1 , the formula for the right hand boundary

115 Part I: Variance of an ARONE
ARONE(t) = b*ARONE(t-1) + WN(t) ARONE(t) - b*ARONE(t-1) = WN(t) ARONE(t) - b*Z*ARONE(t) = WN(t) [1 – b*Z]ARONE(t) =WN(t) ARONE(t) = {1/[1-b*Z]}WN(t) ARONE(t) = {1+b*Z+b2*Z2+…]WN(t) ARONE(t) = WN(t)+b*Z*WN(t) + …. ARONE(t) = WN(t) + b*WN(t-1) + b2*WN(t-2) + … With the ARONE expressed in synthetic form,

116 Take expectation of the product [ARONE(t)]2:
E{ARONE(t)*ARONE(t)} = E{[WN(t) +b*WN(t-1) + …][WN(t) + b*WN(t-1) + …]} E{ARONE(t)*ARONE(t)}=E[WN(t)*WN(t) + b2 WN(t-1)*WN(t-1) + b*WN(t)WN(t-1) + …] E{ARONE(t)*ARONE(t)}= s2 + b2* s2 + b4s2 + …. =[1 + b2 + b4 …] s2 E{ARONE(t)*ARONE(t)}= {1/[1-b2]}* s2 Note the role independence of white noise plays

117

118

119

120


Download ppt "ECON 240C Lecture 7."

Similar presentations


Ads by Google