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.

Slides:



Advertisements
Similar presentations
Autocorrelation Functions and ARIMA Modelling
Advertisements

Dates for term tests Friday, February 07 Friday, March 07
CmpE 104 SOFTWARE STATISTICAL TOOLS & METHODS MEASURING & ESTIMATING SOFTWARE SIZE AND RESOURCE & SCHEDULE ESTIMATING.
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.
Time Series Building 1. Model Identification
Economics 310 Lecture 25 Univariate Time-Series Methods of Economic Forecasting Single-equation regression models Simultaneous-equation regression models.
Forecasting based on creeping trend with harmonic weights Creeping trend can be used if variable changes irregularly in time. We use OLS to estimate parameters.
How should these data be modelled?. Identification step: Look at the SAC and SPAC Looks like an AR(1)- process. (Spikes are clearly decreasing in SAC.
© 2010 Pearson Prentice Hall. All rights reserved Least Squares Regression Models.
1 ECON 240C Lecture Outline Box-Jenkins Passengers Box-Jenkins Passengers Displaying the Forecast Displaying the Forecast Recoloring Recoloring.
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 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.
Econ 240C Lecture Review 2002 Final Ideas that are transcending p. 15 Economic Models of Time Series Symbolic Summary.
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.
1 Econ 240 C Lecture 6. 2 Part I: Box-Jenkins Magic ARMA models of time series all built from one source, white noise ARMA models of time series all built.
1 Identifying ARIMA Models What you need to know.
1 Regression Econ 240A. 2 Outline w A cognitive device to help understand the formulas for estimating the slope and the intercept, as well as the analysis.
Econ 240C Lecture Part I: Forecasting Time Series Housing Starts Housing Starts Labs 5 and 7 Labs 5 and 7.
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.
ARIMA Forecasting Lecture 7 and 8 - March 14-16, 2011
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 Last Week §Normal Distribution §Lab Three: Sampling Distributions §Interval Estimation and HypothesisTesting.
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 Regression Econ 240A. 2 Retrospective w Week One Descriptive statistics Exploratory Data Analysis w Week Two Probability Binomial Distribution w Week.
Econ 240 C Lecture Part I: Exponential Smoothing Exponential smoothing is a technique that is useful for forecasting short time series where there.
BOX JENKINS METHODOLOGY
AR- MA- och ARMA-.
ARMA models Gloria González-Rivera University of California, Riverside
STAT 497 LECTURE NOTES 2.
#1 EC 485: Time Series Analysis in a Nut Shell. #2 Data Preparation: 1)Plot data and examine for stationarity 2)Examine ACF for stationarity 3)If not.
Autoregressive Integrated Moving Average (ARIMA) Popularly known as the Box-Jenkins methodology.
Data analyses 2008 Lecture Last Lecture Basic statistics Testing Linear regression parameters Skill.
K. Ensor, STAT Spring 2005 Model selection/diagnostics Akaike’s Information Criterion (AIC) –A measure of fit plus a penalty term for the number.
Big Data at Home Depot KSU – Big Data Survey Course Steve Einbender Advanced Analytics Architect.
K. Ensor, STAT Spring 2004 Memory characterization of a process How would the ACF behave for a process with no memory? What is a short memory series?
MULTIVARIATE TIME SERIES & FORECASTING 1. 2 : autocovariance function of the individual time series.
Time Series Analysis Lecture 11
Estimation Method of Moments (MM) Methods of Moment estimation is a general method where equations for estimating parameters are found by equating population.
Dynamic Models, Autocorrelation and Forecasting ECON 6002 Econometrics Memorial University of Newfoundland Adapted from Vera Tabakova’s notes.
Linear Filters. denote a bivariate time series with zero mean. Let.
The Box-Jenkins (ARIMA) Methodology
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.
Introduction to stochastic processes
STAT 497 LECTURE NOTES 3 STATIONARY TIME SERIES PROCESSES
1 Autocorrelation in Time Series data KNN Ch. 12 (pp )
REGRESSION DIAGNOSTIC III: AUTOCORRELATION
Chapter 6: Autoregressive Integrated Moving Average (ARIMA) Models
Econ 240 C Lecture 4.
Econ 240C Lecture 18.
ECON 240C Lecture 7.
Autocorrelation.
Autocorrelation.
BOX JENKINS (ARIMA) METHODOLOGY
Presentation transcript:

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 starts Polar form Polar form Inverse of B(z) Inverse of B(z) Autocovariance function Autocovariance function Yule-Walker Equations Yule-Walker Equations Partial autocorrelation function Partial autocorrelation function

3 Outline Cont. Parameter uncertainty Parameter uncertainty Moving average processes Moving average processes Significance of Autocorrelations Significance of Autocorrelations

4 Roots of the quadratic 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) y 2 –b 1 y – b 2 = 0, from substituting y 2-u for x(t-u) y 2 –b 1 y – b 2 = 0, from substituting y 2-u for x(t-u) y = [b 1 +/- (b b 2 ) 1/2 ]/2 y = [b 1 +/- (b b 2 ) 1/2 ]/2 Complex if (b b 2 ) < 0 Complex if (b b 2 ) < 0

5 Quadratic roots ax 2 + bx +c = 0 ax 2 + bx +c = 0 y 2 – b 1 *y – b 2 = 0 y 2 – b 1 *y – b 2 = 0 If b b 2 <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

6

7

8 Triangle of Stable Parameter Space: b 1 = 0 b2b2 (0, 1) (0, -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 = 0) and (b 1 =-1, b 2 =0), (1, 0)(-1, 0) 0.4, -0.4

9 X(t) = 0.4*x(t-1) -0.4*x(t-2) + wn(t)

10

11 Roots: y = {b 1 +/- [b b 2 ] 1/2 }/2 b 1 =0.4, b 2 = -0.4 Roots: y = {0.4 +/- [(0.4) 2 +4(-0.4)] 1/2 }/2 y ={ 0.4 +/- (0.16 – 1.6) 1/2 }/2 y = {0.4 +/- [-1.44] 1/2 /2 * y = i, 0.2 – 0.6 i

12 Pre-whiten

13 Roots: y = {b 1 +/- [b b 2 ] 1/2 }/2 b1 = , b2 = Roots: y = { /- [(-0.351) 2 +4(-0.132)] 1/2 }/2 y ={ /- (0.123 – 0.528) 1/2 }/2 y = /- [-0.405] 1/2 /2 * y = i, – i

14 Triangle of Stable Parameter Space: b 1 = 0 b2b2 (0, 1) (0, -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 = 0) and (b 1 =-1, b 2 =0), (1, 0)(-1, 0) ,

15 Roots in polar form y = Re + Im i = a + b i y = Re + Im i = a + b i sin  = b/(a 2 + b 2 ) 1/2 sin  = b/(a 2 + b 2 ) 1/2 cos  = a/(a 2 + b 2 ) 1/2 cos  = a/(a 2 + b 2 ) 1/2 y = (a 2 + b 2 ) 1/2 cos  + i (a 2 + b 2 ) 1/2 sin  y = (a 2 + b 2 ) 1/2 cos  + i (a 2 + b 2 ) 1/2 sin  Re Im a (a, b) b 

16 Roots in Polar form: Sim. Ex. Re + i Im = a + i b = (a 2 + b 2 ) 1/2 [cos  + sin  ] Re + i Im = a + i b = (a 2 + b 2 ) 1/2 [cos  + sin  ] Example: modulus, (a 2 + b 2 ) 1/2 = [(0.2) 2 +(0.6) 2 ] 1/2 = [ ] 1/2 = Example: modulus, (a 2 + b 2 ) 1/2 = [(0.2) 2 +(0.6) 2 ] 1/2 = [ ] 1/2 = Tan  = sin  /cos  = b/a = 0.6/0.2 = 3.00 Tan  = sin  /cos  = b/a = 0.6/0.2 = 3.00  = tan ~ 71.6 degrees = 0.2 fraction of a circle = 0.2*2  radians = 1.26 radians  = tan ~ 71.6 degrees = 0.2 fraction of a circle = 0.2*2  radians = 1.26 radians Period = 2*  /  = 2  /0.2*2  = 1/0.2 =5 months Period = 2*  /  = 2  /0.2*2  = 1/0.2 =5 months 5 months, the time it takes to go around the circle once 5 months, the time it takes to go around the circle once

17 Roots in Polar form: dhoust Re + i Im = a + i b = (a 2 + b 2 ) 1/2 [cos  + sin  ] Re + i Im = a + i b = (a 2 + b 2 ) 1/2 [cos  + sin  ] Example: modulus, (a 2 + b 2 ) 1/2 = [(-0.177) 2 +(0.318) 2 ] 1/2 = [ ] 1/2 = [0.132] 1/2 = Example: modulus, (a 2 + b 2 ) 1/2 = [(-0.177) 2 +(0.318) 2 ] 1/2 = [ ] 1/2 = [0.132] 1/2 = Tan  = sin  /cos  = b/a = 0.318/ = Tan  = sin  /cos  = b/a = 0.318/ =  = tan ~ 60.9 degrees = fraction of a circle = 0.169*2  radians = 1.06 radians  = tan ~ 60.9 degrees = fraction of a circle = 0.169*2  radians = 1.06 radians Period = 2*  /  = 2  /0.169*2  = 1/0.169 =5.9 months Period = 2*  /  = 2  /0.169*2  = 1/0.169 =5.9 months 5.9 months, the time it takes to go around the circle once 5.9 months, the time it takes to go around the circle once

:01 NA 1959: : : : : : : : : : : : : : : : :

19

20 Difference Equation Solutions x(t) –b x(t) –b 1 x(t-1) – b 2 x(t-2) = 0 Suppose b 2 = 0, then b 1 is the root, with x(t) = b 1 x(t-1). Suppose x(0) = 100, and b 1 =1.2 then x(1) = 1.2*100, And x(2) = 1.2*x(1) = (1.2) 2 *100, And the solution is x(t) = x(0)* b 1 t In general for roots r 1 and r 2, the solution is x(t) = Ar 1 t + Br 2 t where A and B are constants

21 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)

22 Inverse of [1-b 1 z –b 2 z 2 ] ARTWO(t) = wn(t)/B(z) =wn(t)/[1-b–b ARTWO(t) = wn(t)/B(z) =wn(t)/[1-b 1 z –b 2 z 2 ] [1-b–b ARTWO(t) = A(z) wn(t) = {1/[1-b 1 z –b 2 z 2 ]}wn(t) [1-b–b So A(z) = [1 + a 1 z + a 2 z 2 + …] = 1/[1-b 1 z –b 2 z 2 ] [1-b–b [1-b 1 z –b 2 z 2 ] [1 + a 1 z + a 2 z 2 + …] = 1 -b– a 1 b 1 + a 1 z + a 2 z 2 + … -b 1 z – a 1 b 1 z 2 - b 2 z 2 … = (a 1 – b 1 )z + (a 2 –a 1 b 1 –b 2 ) z 2 + … = 1 So (a 1 – b 1 ) = 0, (a 2 –a 1 b 1 –b 2 ) = 0, …

23 Inverse of [1-b 1 z –b 2 z 2 ] A(z) = [1 + a 1 z + a 2 z 2 + …] = [1 + b 1 z + (b 1 2 +b 2 ) z 2 + …. So ARTWO(t) = wn(t) + b 1 wn(t-1) + (b 1 2 +b 2 ) wn(t-2) + …. And ARTWO(t-1) = wn(t-1) + b 1 wn(t-2) + (b 1 2 +b 2 ) wn(t-3) + ….

24 Autocovariance Function 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) Using x(t) for ARTWO, Using x(t) for ARTWO, 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) By lagging and substitution, one can show that x(t-1) depends on earlier shocks, so multiplying by x(t-1) and taking expectations By lagging and substitution, one can show that x(t-1) depends on earlier shocks, so multiplying by x(t-1) and taking expectations

25 Autocovariance Function 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) x(t)*x(t-1) = b 1 *[x(t-1)] 2 + b 2 *x(t-1)*x(t-2) + x(t-1)*WN(t) x(t)*x(t-1) = b 1 *[x(t-1)] 2 + b 2 *x(t-1)*x(t-2) + x(t-1)*WN(t) Ex(t)*x(t-1) = b 1 *E[x(t-1)] 2 + b 2 *Ex(t-1)*x(t- 2) +E x(t-1)*WN(t) Ex(t)*x(t-1) = b 1 *E[x(t-1)] 2 + b 2 *Ex(t-1)*x(t- 2) +E x(t-1)*WN(t)  x, x   b 1 *  x, x   b 2 *  x, x   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)  x, x   b 1 *  x, x   b 2 *  x, x   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)

26 Autocovariance Function  x, x   b 1 *  x, x   b 2 *  x, x    x, x   b 1 *  x, x   b 2 *  x, x   dividing though by  x, x   dividing though by  x, x    x, x   b 1 *  x, x   b 2 *  x, x   so  x, x   b 1 *  x, x   b 2 *  x, x   so  x, x   b 2 *  x, x   b 1 *  x, x   and  x, x   b 2 *  x, x   b 1 *  x, x   and  x, x   b 2 ]  b 1  or  x, x   b 2 ]  b 1  or  x, x   b 1  b 2 ]  x, x   b 1  b 2 ] Note: if the parameters, b 1 and b 2 are known, then one can calculate the value of  x, x   Note: if the parameters, b 1 and b 2 are known, then one can calculate the value of  x, x  

27 Autocovariance Function 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) x(t)*x(t-2) = b 1 *[x(t-1)x(t-2)] + b 2 *[x(t-2)] 2 + x(t-2)*WN(t) x(t)*x(t-2) = b 1 *[x(t-1)x(t-2)] + b 2 *[x(t-2)] 2 + x(t-2)*WN(t) Ex(t)*x(t-2) = b 1 *E[x(t-1)x(t-2)] + b 2 *E[x(t- 2)] 2 +E x(t-2)*WN(t) Ex(t)*x(t-2) = b 1 *E[x(t-1)x(t-2)] + b 2 *E[x(t- 2)] 2 +E x(t-2)*WN(t)  x, x   b 1 *  x, x   b 2 *  x, x   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)  x, x   b 1 *  x, x   b 2 *  x, x   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)

28 Autocovariance Function  x, x   b 1 *  x, x   b 2 *  x, x    x, x   b 1 *  x, x   b 2 *  x, x   dividing though by  x, x   dividing though by  x, x    x, x   b 1 *  x, x   b 2 *  x, x    x, x   b 1 *  x, x   b 2 *  x, x   Note: if the parameters, b 1 and b 2 are known, then one can calculate the value of  x, x   as we did above from  x, x   b 1  b 2 ], and then calculate  x, x   Note: if the parameters, b 1 and b 2 are known, then one can calculate the value of  x, x   as we did above from  x, x   b 1  b 2 ], and then calculate  x, x  

29 Autocorrelation Function  x, x   b 1 *  x, x   b 2 *  x, x    x, x   b 1 *  x, x   b 2 *  x, x   Note also the recursive nature of this formula, so  x, x   b 1 *  x, x   b 2 *  x, x   for u>=2. Note also the recursive nature of this formula, so  x, x   b 1 *  x, x   b 2 *  x, x   for u>=2. Thus we can map from the parameter space to the autocorrelation function. Thus we can map from the parameter space to the autocorrelation function. How about the other way around? How about the other way around?

30 Yule-Walker Equations From slide 23 above, From slide 23 above,  x, x   b 1 *  x, x   b 2 *  x, x   and so  x, x   b 1 *  x, x   b 2 *  x, x   and so  b 1 =  x, x   b 2 *  x, x    b 1 =  x, x   b 2 *  x, x   From slide 25 above, From slide 25 above,  x, x   b 1 *  x, x   b 2 *  x, x   or  x, x   b 1 *  x, x   b 2 *  x, x   or  b 2 =  x, x   b 1 *  x, x   and substituting for b 1 from line 3 above  b 2 =  x, x   b 1 *  x, x   and substituting for b 1 from line 3 above b 2 =  x, x   [  x, x   b 2 *  x, x   ]  x, x   b 2 =  x, x   [  x, x   b 2 *  x, x   ]  x, x  

31 Yule-Walker Equations b 2 =  x, x   {[  x, x     b 2 * [  x, x   ] 2 } b 2 =  x, x   {[  x, x     b 2 * [  x, x   ] 2 } so b 2 =  x, x   [  x, x     b 2 * [  x, x   ] 2 so b 2 =  x, x   [  x, x     b 2 * [  x, x   ] 2 and b 2  b 2 * [  x, x   ] 2 =  x, x   [  x, x    and b 2  b 2 * [  x, x   ] 2 =  x, x   [  x, x    so b 2   x, x   ] 2 =  x, x   [  x, x    so b 2   x, x   ] 2 =  x, x   [  x, x    and  b 2 = {  x, x   [  x, x      x, x   ] 2 and  b 2 = {  x, x   [  x, x      x, x   ] 2 This is the formula for the partial autocorrelation at lag two. This is the formula for the partial autocorrelation at lag two.

32 Partial Autocorrelation Function b 2 = {  x, x   [  x, x      x, x   ] 2 b 2 = {  x, x   [  x, x      x, x   ] 2 Note: If the process is really autoregressive of the first order, then  x, x   b 2 and  x, x   b, so the numerator is zero, i.e. the partial autocorrelation function goes to zero one lag after the order of the autoregressive process. Note: If the process is really autoregressive of the first order, then  x, x   b 2 and  x, x   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. Thus the partial autocorrelation function can be used to identify the order of the autoregressive process.

33 Partial Autocorrelation Function If the process is first order autoregressive then the formula for b 1 = b is: If the process is first order autoregressive then the formula for b 1 = b is: b 1 = b =ACF(1), so this is used to calculate the PACF at lag one, i.e. PACF(1) =ACF(1) = b 1 = b. b 1 = b =ACF(1), so this is used to calculate the PACF at lag one, i.e. PACF(1) =ACF(1) = b 1 = b. For a third order autoregressive process, For a third order autoregressive process, x(t) = b 1 *x(t-1) + b 2 *x(t-2) + b 3 *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. x(t) = b 1 *x(t-1) + b 2 *x(t-2) + b 3 *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.

34 Partial Autocorrelation Function Then these three equations could be solved for b 3 in terms of  x, x   x, x   and  x, x  to determine the expression for the partial autocorrelation function at lag three. EVIEWS does this and calculates the PACF at higher lags as well. Then these three equations could be solved for b 3 in terms of  x, x   x, x   and  x, x  to determine the expression for the partial autocorrelation function at lag three. EVIEWS does this and calculates the PACF at higher lags as well.

35 Forecast of dhoust( ) Dhoust(t) – C = resid(t) Resid(t) = b 1 resid(t-1) + b 2 resid(t-2) + N(t)) Dhoust( ) = dhoust( ) dhoust( ) N( ) Taking expectations at time of last observation

36 Forecast of dhoust( ) Dhoust( ) = dhoust( ) dhoust( ) N( ) E dhoust( ) = dhoust( ) dhoust( ) Forecast = E dhoust( ) =-0.351* *-8 = 43.8 With an ser = 113.5

: NA 2008: NA 2008: NA 2008: NA 2008:04 NA Datedhoustforecastsef

38

39

40 Forecasts of dhoust through June 2008

41

42 Forecasts of Monthly Change in Housing Starts April-June 2008

43

44

45

46

47 Residuals from ARTWO Model for dhoust

48 IV. Economic Forecast Project Santa Barbara County Seminar Santa Barbara County Seminar  April 26, 2006 URL: URL: URL: URL:

49 V. Forecasting Trends

50 Lab Two: LNSP500

51 Note: Autocorrelated Residual

52 Autorrelation Confirmed from the Correlogram of the Residual

53 Visual Representation of the Forecast

54 Numerical Representation of the Forecast

55 One Period Ahead Forecast Note the standard error of the regression is Note the standard error of the regression is Note: the standard error of the forecast is Note: the standard error of the forecast is Diebold refers to the forecast error 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

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

57 Parameter Uncertainty Estimated error Estimated error

58 Forecast Formula

59 Expected Value of the Forecast E t E t

60 Forecast Minus its Expected Value Forecast = a + b*(t+1) + 0 Forecast = a + b*(t+1) + 0

61 Variance in the Forecast

62

63 Variance of the Forecast Error *( )* x10 -9 *(398) 2 +( ) SEF = ( ) 1/2 =

64 Numerical Representation of the Forecast

65 Evolutionary Vs. Stationary Evolutionary: Trend model for lnSp500(t) Evolutionary: Trend model for lnSp500(t) Stationary: Model for Dlnsp500(t) Stationary: Model for Dlnsp500(t)

66 Pre-whitened Time Series

67 Note: is monthly growth rate; times 12=0.1035

68 Is the Mean Fractional Rate of Growth Different from Zero? Econ 240A, Ch.12.2 Econ 240A, Ch.12.2 where the null hypothesis is that  = 0. where the null hypothesis is that  = 0. ( )/( /397 1/2 ) ( )/( /397 1/2 ) / = 3.76 t-statistic, so is significantly different from zero / = 3.76 t-statistic, so is significantly different from zero

69 Model for lnsp500(t) Lnsp500(t) = a +b*t +resid(t), where resid(t) is close to a random walk, so the model is: Lnsp500(t) = a +b*t +resid(t), where resid(t) is close to a random walk, so the model is: lnsp500(t) a +b*t + RW(t), and taking exponential lnsp500(t) a +b*t + RW(t), and taking exponential sp500(t) = e a + b*t + RW(t) = e a + b*t e RW(t) sp500(t) = e a + b*t + RW(t) = e a + b*t e RW(t)

70 Note: The Fitted Trend Line Forecasts Above the Observations

71

72 VI. Autoregressive Representation of a Moving Average Process MAONE(t) = WN(t) + a*WN(t-1) MAONE(t) = WN(t) + a*WN(t-1) MAONE(t) = WN(t) +a*Z*WN(t) MAONE(t) = WN(t) +a*Z*WN(t) MAONE(t) = [1 +a*Z] WN(t) MAONE(t) = [1 +a*Z] WN(t) MAONE(t)/[1 - (-aZ)] = WN(t) MAONE(t)/[1 - (-aZ)] = WN(t) [1 + (-aZ) + (-aZ) 2 + …]MAONE(t) = WN(t) [1 + (-aZ) + (-aZ) 2 + …]MAONE(t) = WN(t) MAONE(t) -a*MAONE(t-1) + a 2 MAONE(t-2) +.. =WN(t) MAONE(t) -a*MAONE(t-1) + a 2 MAONE(t-2) +.. =WN(t)

73 MAONE(t) = a*MAONE(t-1) - a 2 *MAONE(t-2) + …. +WN(t) MAONE(t) = a*MAONE(t-1) - a 2 *MAONE(t-2) + …. +WN(t)

74 Lab 4: Alternating Pattern in PACF of MATHREE

75 Part IV. Significance of Autocorrelations x, x (u) ~ N(0, 1/T), where T is # of observations

76 Correlogram of the Residual from the Trend Model for LNSP500(t)

77 Box-Pierce Statistic Is normalized, 1.e. is N(0,1) The square of N(0,1) variables is distributed Chi-square

78 Box-Pierce Statistic The sum of the squares of independent N(0, 1) variables is Chi-square, and if the autocorrelations are close to zero they will be independent, so under the null hypothesis that the autocorrelations are zero, we have a Chi-square statistic: that has K-p-q degrees of freedom where K is the number of lags in the sum, and p+q are the number of parameters estimated.

79 Application to: the Fractional Change in the Federal Funds Rate Dlnffr = lnffr-lnffr(-1) Dlnffr = lnffr-lnffr(-1) Does taking the logarithm and then differencing help model this rate?? Does taking the logarithm and then differencing help model this rate??

80

81

82

83

84

85

86 Correlogram of dlnffr(t)

87 How would you model dlnffr(t) ? Notation (p,d,q) for ARIMA models where d stands for the number of times first differenced, p is the order of the autoregressive part, and q is the order of the moving average part. Notation (p,d,q) for ARIMA models where d stands for the number of times first differenced, p is the order of the autoregressive part, and q is the order of the moving average part.

88 Estimated MAThree Model for dlnffr

89 Correlogram of Residual from (0,0,3) Model for dlnffr

90 Calculating the Box-Pierce Stat

91 EVIEWS Uses the Ljung-Box Statistic

92 Q-Stat at Lag 5 (T+2)/(T-5) * Box-Pierce = Ljung-Box (T+2)/(T-5) * Box-Pierce = Ljung-Box (586/581)* = compared to 1.132(EVIEWS) (586/581)* = compared to 1.132(EVIEWS)

93 GENR: chi=rchisq(3); dens=dchisq(chi, 3)

94 Correlogram of Residual from (0,0,3) Model for dlnffr

95

96 Serial Correlation Test

97 Estimated MAThree Model for dlnffr

98 Breusch-Godfrey Serial Correlation Test