ECON 240C Lecture 7.

Slides:



Advertisements
Similar presentations
Autocorrelation Functions and ARIMA Modelling
Advertisements

Autoregressive Integrated Moving Average (ARIMA) models
Stationary Time Series
Dates for term tests Friday, February 07 Friday, March 07
Part II – TIME SERIES ANALYSIS C5 ARIMA (Box-Jenkins) Models
Unit Roots & Forecasting
Time Series Building 1. Model Identification
R. Werner Solar Terrestrial Influences Institute - BAS Time Series Analysis by means of inference statistical methods.
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 Part I. VAR Does the Federal Funds Rate Affect Capacity Utilization?
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.
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 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.
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 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.
BOX JENKINS METHODOLOGY
ARMA models Gloria González-Rivera University of California, Riverside
STAT 497 LECTURE NOTES 2.
Autoregressive Integrated Moving Average (ARIMA) Popularly known as the Box-Jenkins methodology.
Byron Gangnes Econ 427 lecture 11 slides Moving Average Models.
Data analyses 2008 Lecture Last Lecture Basic statistics Testing Linear regression parameters Skill.
Derivation of the Quadratic Formula The following shows how the method of Completing the Square can be used to derive the Quadratic Formula. Start with.
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.
Interval Notation Interval Notation to/from Inequalities Number Line Plots open & closed endpoint conventions Unions and Intersections Bounded vs. unbounded.
Linear Filters. denote a bivariate time series with zero mean. Let.
Review and Summary Box-Jenkins models Stationary Time series AR(p), MA(q), ARMA(p,q)
Lecture 8: Ordinary Least Squares Estimation BUEC 333 Summer 2009 Simon Woodcock.
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.
STAT 497 LECTURE NOTES 3 STATIONARY TIME SERIES PROCESSES
Analysis of financial data Anders Lundquist Spring 2010.
EC 827 Module 2 Forecasting a Single Variable from its own History.
Section 2.5 – Quadratic Equations
The simple linear regression model and parameter estimation
Covariance, stationarity & some useful operators
Chapter 4 Quadratic Equations
Solve a quadratic equation
Lecture 8 ARIMA Forecasting II
Chapter 6: Autoregressive Integrated Moving Average (ARIMA) Models
Statistics 153 Review - Sept 30, 2008
Econ 240 C Lecture 4.
Model Building For ARIMA time series
Autocorrelation.
Quadratic Equations by Dr. Terri
Box-Jenkins models Stationary Time series AR(p), MA(q), ARMA(p,q)
KS4 Mathematics A6 Quadratic equations.
Review: Simplify.
Linear Filters.
The Spectral Representation of Stationary Time Series
Autocorrelation.
Dear Power point User, This power point will be best viewed as a slideshow. At the top of the page click on slideshow, then click from the beginning.
CH2 Time series.
Lesson 5–5/5–6 Objectives Be able to define and use imaginary and complex numbers Be able to solve quadratic equations with complex roots Be able to solve.
BOX JENKINS (ARIMA) METHODOLOGY
Presentation transcript:

ECON 240C Lecture 7

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

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)

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

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

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

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

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

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

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)

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

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.

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)

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)

We could study with simulation

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)

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

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

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

Forecast C = 0 E2006.3 dcaputmfg(2006.4) - C ] = E2006.3 {0.278*[dcaputmfg(2006.3) - C] +0.250[dcaputmfg(2006.2)- C] + wn*(2006.4)} E2006.3 dcapumfg(2006.4) = 0.278*[0.2] + 0.25*[-0.3] E2006.3 dcapumfg(2006.4) = 0.278*[0.2] + 0.25[-0.3] E2006.3 dcapumfg(2006.4) = 0.0556 – 0.075 = -0.0194 Forecast ~- 0.02 with ser = 0.582

Forecast through end of 2006

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

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

Correlogram of residuals from ARTHREE Model of Starts

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

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

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

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)

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

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)

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)

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)

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

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?

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)

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.

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.

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.

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.

Part IV. Forecasting Trend

Lab Two: LNSP500

Note: Autocorrelated Residual

Autocorrelation Confirmed from the Correlogram of the Residual

Visual Representation of the Forecast

Numerical Representation of the Forecast

Note: The Fitted Trend Line Forecasts Above the Observations

One Period Ahead Forecast Note the standard error of the regression is 0.2237 Note: the standard error of the forecast is 0.2248 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

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

Parameter Uncertainty Estimated error

Forecast Formula

Forecast Et

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

Variance in the Forecast Error

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

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

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)

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.

Autocorrelation Function, Moving Average of the first Order

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:

[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

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,

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