Sei sulla pagina 1di 34

Serial Correlation

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Econometrics Regression Analysis with Time Series Data: Serial Correlation and Heteroskedasticity
Joo Valle e Azevedo a
Faculdade de Economia Universidade Nova de Lisboa

Spring Semester

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

1 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Serially Correlated Errors: Consequences


With assumptions TS.1 through TS.3, OLS estimators are unbiased With assumptions TS.1 through TS.3, OLS estimators are consistent Could have serial correlation in the errors (TS.5 or TS.5 could be violated) But for inference, results are NOT valid if TS.5 (or TS.5) fail With serial correlation in the errors, usual OLS variances are NOT valid

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

2 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Serially Correlated Errors


But notice, can have consistency even in the presence of serial correlation in the errors and lagged dependent variables as regressors Example: yt = 0 + 1 yt1 + ut
where E [ut |yt1 ] = 0 and {ut } are serially correlated

However, if yt = 0 + 1 yt1 + ut and ut = ut1 + et , t = 2, ..., n et are i.i.d., || < 1 and E [et |ut1 , ut2 , ...] = E [et |yt1 , yt2 , ...] = 0 Then, Cov (yt1 , ut ) = E [yt1 (ut1 + et )] = E (yt1 , ut1 ) = E [yt1 (yt1 0 1 yt2 )] = 0 unless = 0
Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, May 2011 3 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Serially Correlated Errors (Cont.)


In this case the OLS estimators are not consistent for 0 ,1 . This is a special (although typical) form of autocorrelation But in the previous case, it turns out that: yt = 0 + 1 yt1 + (yt1 0 1 yt2 ) + et = 0 (1 ) + (1 + )yt1 1 yt2 + et = 0 + 1 yt1 + 2 yt2 + et
where E [et |yt1 , yt2 , ...] = 0 and

E [yt |yt1 , yt2 , ...] = E [yt |yt1 , yt2 ] = 0 + 1 yt1 + 2 yt2 Thus, the relevant model is an AR(2) model for y. With further conditions on the parameters (that ensure stability) we can estimate the j s consistently
Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, May 2011 4 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Serially Correlated Errors (Cont.)


Conclusion: Models with lagged dependent variables and serial correlation in the errors can often be easily transformed into models without serial correlation in the errors (e.g., by adding more lags of the dependent variable as regressors)

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

5 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Testing for AR(1) Serial Correlation (Cont.)


Want to be able to test whether the errors are serially correlated or not yt = 0 + 1 xt1 + ... + k xtk + ut Want to test the null that = 0 in ut = ut1 + et ,t=2,...,n
where ut is the model error term, || < 1 and et is an i.i.d. sequence 2 with E [et |ut1 , ut2 , ...] = 0 and Var [et |ut1 ] = e

With strictly exogenous regressors, E (ut |X) = 0, t = 1, 2, ..., n, the test is straightforward
Obtain the OLS residuals of the original model Then, regress the residuals on (one period) lagged residuals (use OLS) Then, use a typical t-test for H0 : = 0 (dont need intercept) We assume TS.1 through TS.4 hold. If TS.4 fails use a heteroskedasticity robust statistic

Detects correlation between ut and ut1 but not between ut and ut2
Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, May 2011 6 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Testing for AR(1) Serial Correlation (Cont.)


An alternative is the Durbin-Watson (DW) statistic, which is calculated by most Econometric packages. Need TS.1 through TS.6 holding
n n

DW =
t=2

(t ut1 )2 / u
t=1

ut 2(1 ) 2

where is that of the previous test If the DW statistic is around 2, then we do not reject H0 (absence of serial correlation of AR(1) type), while if it is signicantly < 2 we reject the null (against the alternative H1 : > 0, the most typical)

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

7 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Testing for AR(q) Serial Correlation


If the regressors are not strictly exogenous, previous t or DW test will NOT be valid. Have alternatives under TS.1 through TS.4 (that are valid also with TS.1 through TS.4). Also, can have more general forms of serial correlation (e.g., AR(q) serial correlation) yt = 0 + 1 xt1 + ... + k xtk + ut
where ut = 1 ut1 + 2 ut2 + ... + q utq + et et is an i.i.d. sequence with E [et |ut1 , ut2 , ...] = 0 and 2 Var [et |xt , ut1 , ut2 , ..., utq ] = e The null is H0 : 1 = 2 = ... = q = 0

Regress the OLS residuals (or y) on the q lagged residuals and all of the xs (this makes the test valid without assuming strict exogeneity. Dont need to include the xs if strict exogeneity is assumed) Then use a usual test of multiple exclusion restrictions (on the coecients of the lagged residuals)
Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, May 2011 8 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Testing for AR(q) Serial Correlation (Cont.)


Can use F test or LM test (or even t test if q=1), where the LM version is called the Breusch-Godfrey test: LM = (n q)R 2 2 q (approx.) under the null where R 2 is from the residuals regression. If there is heteroskedasticity in the error term ut , can use heteroskedasticity-robust statistics

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

9 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Correcting Serial Correlation with strictly exogenous regressors


If there is serial correlation in the errors, inference as usual with OLS is Not valid Let us assume TS.1 through TS.4 hold in our model, but TS.5 (no serial correlation) fails to hold. Also, assume stationarity and weak dependence as in TS.1 Assume errors follow an AR(1) so ut = ut1 + et , t = 2, ..., n, where || < 1 and et is an i.i.d. sequence with E [et |X ] = 0 and 2 Var [et |X ] = e
2 Var [ut |X ] = e /(1 2 )

We can transform the equation so we have no serial correlation in the errors

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

10 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Correcting Serial Correlation with strictly exogenous regressors (Cont.)


Consider the case of one regressor (similar analysis with more) yt = 0 + 1 xt + ut Then, yt1 = 0 + 1 xt1 + ut1 Subtract this from previous equation to get: yt yt1 = (1 )0 + 1 (xt xt1 ) + et
since et = ut ut1 for t 2

In this quasi-dierenced model for t 2, TS.1 through TS.5 hold!


Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, May 2011 11 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

GLS Estimation
yt yt1 = (1 )0 + 1 (xt xt1 ) + et for t 2 Can transform equation for t=1, y1 = 0 + 1 x1 + u1 , so that TS.1 through TS.5 hold for t 1 (not yet the case since u1 and et have a dierent variance)
2 Var (ut |X ) = e /(1 2 ), so can multiply equation by (1 2 )1/2 to have TS.1 through TS.5 holding for t 1

(1 2 )1/2 y1 = (1 2 )1/2 0 + (1 2 )1/2 1 x1 + (1 2 )1/2 u1 In this quasi-dierenced model, TS.1 through TS.5 hold!

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

12 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

GLS Estimation (Cont.)


Transformed model is: yt = 0 xt0 + 1 xt1 + et , t 1 yt = yt yt1 , t 2 and (1 2 )1/2 y1 for t = 1 xt1 = xt xt1 , t 2 and (1 2 )1/2 x1 for t = 1 xt0 = (1 ), t 2 and (1 2 )1/2 for t = 1

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

13 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

GLS Estimation (Cont.)


If is known, can estimate the transformed regression by OLS This is called the GLS estimator of the original model GLS is BLUE if TS.1 through TS.5 hold in the transformed model Can use t and F tests from the transformed equation to conduct inference on the parameters of the original equation These tests are valid (asymptotically) if TS.1 through TS.5 hold in the transformed model (along with stationarity and weak dependence in the original variables) and distributions (conditional on X) are exact (and with minimum variance) if TS.6 holds for the et

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

14 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Feasible GLS
Problem: dont know , need to get an estimate rst
Run OLS on the original model and then regress residuals on lagged residuals (with OLS) Use OLS on the transformed regression (using the estimated ). This is a feasible GLS (FGLS) estimator (or Prais-Winsten estimator) If we just forget the rst equation (t=1) we have the Cochrane-Orcutt estimator (also a FGLS estimator) These FGLS estimators are not unbiased, but are consistent if TS.1 through TS.5 hold in the transformed model (along with stationarity and weak dependence in the original model) There is no dierence, asymptotically, between the two procedures

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

15 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Feasible GLS
t and F tests from the transformed equations are valid (asymptotically). If TS.6 holds for the et , relevant distributions also hold only asymptotically. FGLS is asymptotically more ecient than OLS This basic method can be extended to allow for higher order serial correlation, AR(q), in the error term. Econometrics packages deal automatically with estimation of AR serial correlation

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

16 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Serial Correlation-Robust Standard Errors


FGLS asymptotic distributions rely on strict exogeneity of the regressors If strict exogeneity does not hold, we can still use OLS (it is consistent with only contemporaneous exogeneity, or TS.1, along with TS.2 and TS.3). Further, we can calculate serial correlation-robust standard errors Idea is to scale the OLS standard errors to take into account serial correlation Actually, with only TS.1 through TS.3 we can derive Heteroskedasticity and Serial Correlation robust standard errors and corresponding t-statistics

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

17 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Serial Correlation-Robust Standard Errors (Cont.)


Estimate the model with OLS to get the residuals ut , the standard deviation of the regression, , and the usual standard errors se(1 ) Run the auxiliary regression of xt1 on xt2 , ..., xtk , get the residuals, t , r and form t = t ut a r Choose a g - typically the integer part of n1/4 Compute
n g 2 at t=1 n

= Then,

+2
h=1

[1 h/(g + 1)]
t=h+1

t th aa

Robust se(1 ) = [se(1 )/ ]2


and similarly for any j
Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, May 2011 18 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Serial Correlation-Robust Standard Errors (Cont.)


These Heteroskedasticity and Serial Correlation robust standard errors can be poorly behaved in small samples (typical in Macro time series) in the presence of heavy serial correlation Also, standard errors can be very large (OLS is far from eciency with heavy serial correlation and small samples) If you believe the regressors are strictly exogenous and errors follow an AR(1) (or more generally an AR(q)), use FGLS Even if you think the errors do not follow an AR(1) (but regressors are still strictly exogenous) apply FGLS (as if errors followed an AR(1)) and compute robust standard errors in the quasi-dierenced model So, use only Heteroskedasticity and Serial Correlation robust standard errors if strict exogeneity fails Will not deal with F statistics robust to serial correlation
Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, May 2011 19 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Heteroskedasticity in Time Series Regressions


With assumptions TS.1 through TS.3, OLS estimators are unbiased (no role of homoskedasticity, TS.4) With assumptions TS.1 through TS.3, OLS estimators are consistent (no role of homoskedasticity, TS.4) But for inference, usual OLS results are NOT valid if TS.4 (or TS.4) fail With assumptions TS.1 through TS.3, we can derive Heteroskedasticity and Serial Correlation robust standard errors We can do better than this if TS.1, TS.2, TS.3 and TS.5 hold (need only heteroskedasticity robust standard errors) Can compute heteroskedasticity robust standard errors and use robust t and LM statistics, exactly as in the cross sectional case

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

20 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Testing for Heteroskedasticity in Time Series Regressions


However, in small samples we know these robust standard errors can be large. Therefore, we may want to test for heteroskedasticity It turns out that we can also use the tests for heteroskedasticity of the cross-sectional case (Chapter 8) But for this, need TS.1, TS.2, TS.3 and TS.5 holding. So, cannot have serial correlation in the errors Also, e.g., for the Breusch-Pagan test where we specify u 2 = 0 + 1 x1 + ... + k xk + and test H0 : 1 = 2 = ... = k = 0, we need to be homoskedastic and serially uncorrelated (which is dierent from serial correlation in the us) Later, we will see how to deal with dynamic heteroskedasticity (where something like the s above can be correlated across time)
Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, May 2011 21 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Testing for Heteroskedasticity in Time Series Regressions


So, if we nd heteroskedasticity can use heteroskedasticity robust statistics. If we know the form of heteroskedasticity can also use Weighted Least Squares (WLS), along the same lines of the cross-sectional case. But still, TS.5 (No serial Correlation) must be in place!

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

22 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Autoregressive Conditional heteroskedasticity


Now assume TS.1 through TS.5 hold, so we have Conditional (on X!) Homoskedasticity and no Serial Correlation in the Error term Let yt = 0 + 1 xt1 + ... + k xtk + ut
2 We can have E [ut |X] = Var (ut |X) = Var (ut ) = 2 for t=1,2,...,n but still: 2 2 2 E [ut |X, ut1 , ut2 , ...] = E [ut |X, ut1 ] = 0 + 1 ut1 or 2 2 ut = 0 + 1 ut1 + t where E [|X, ut1 , ut2 , ...] = 0

with 0 > 0 and 1 0

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

23 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Autoregressive Conditional heteroskedasticity (Cont.)


2 t are not independent of past u since t 0 1 ut1 (variance must be positive)

Also 1 < 1. If this model holds, we have Autoregressive Conditional heteroskedasticity (ARCH) in the errors So, even if the errors are not correlated (TS.5 holds), its squares can be correlated OLS is still BLUE with ARCH errors. Usual OLS inference is valid if TS.6 (Normality) holds Even if Normality does not hold we know that usual OLS inference is valid asymptotically with TS.1 through TS.5 (so can have ARCH errors in this setting as well)

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

24 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Autoregressive Conditional heteroskedasticity (Cont.)


So, why do we care about ARCH errors? Because we can obtain asymptotically more ecient estimators than OLS (albeit non-linear), with a sort of WLS obtained by rst 2 2 estimating ut = 0 + 1 ut1 + t (by OLS, using squared residuals). No more details in this course ARCH behavior is interesting in itself, can analyze behavior of volatility

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

25 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Example - BVLG index, Lisbon

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

26 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Example - BVLG index, Lisbon (Cont.)


BVLG Lisbon daily returns, January 2, 1995 to November 23, 2001

Just take the index Apply logs Take rst dierences


Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, May 2011 27 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Example - BVLG index, Lisbon (Cont.)


Under the ecient market hypothesis, stock returns should be uncorrelated with past returns. Also, should not have calendar eects...But this is (was?) Portugal

Dependent variable: Daily Returns Regressors: Day of the week dummies, Tuesday* for Tuesdays from Jan 88 to Apr 89 and three lags of returns F test is for the hypothesis that all Day of the week dummies are equal *, ** and *** denote signicance at the 10%, 5% and 1% respectively
Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, May 2011 28 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Example - BVLG index, Lisbon (Cont.)

Dependent variable: Daily Returns Regressors: Day of the week dummies, Tuesday* for Tuesdays from Jan 88 to Apr 89 and three lags of returns F test is for the hypothesis that all Day of the week dummies are equal *, ** and *** denote signicance at the 10%, 5% and 1% respectively

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

29 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Example - BVLG index, Lisbon (Cont.)


Besides, there is volatility clustering in the returns series

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

30 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Example - BVLG index, Lisbon (Cont.)


White Heteroskedasticity Test: F-statistic Obs*R-squared 63.32189 112.7329 Probability Probability 0.000000 0.000000

Test Equation:

Dependent Variable: RESID^2


Method: Least Squares

Sample: 3 1004 Included observations: 1002 Variable Coefficient Std. Error t-Statistic Prob.

C
Y(-1) Y(-1)^2 R-squared Adjusted R-squared S.E. of regression Sum squared resid Log likelihood

0.000144
-0.000222 0.299471 0.112508 0.110731 0.000541 0.000292 6117.708

1.82E-05
0.001125 0.026700

7.933013
-0.197479 11.21598

0.0000
0.8435 0.0000 0.000213 0.000573 -12.20501 -12.19031 63.32189

Mean dependent var S.D. dependent var Akaike info criterion Schwarz criterion F-statistic

Durbin-Watson stat 2.075790 Prob(F-statistic) 0.000000 y denotes returns Assume there are no calendar eect but y , y (1), are correlated, yt = 0 + 1 yt1 + ut Find evidence of heteroskedasticity But if we accept that TS.4 holds, the signicant coecient on y (1)2 can be due to ARCH eects

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

31 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Example - BVLG index, Lisbon (Cont.)


ARCH effects F-statistic Obs*R-squared 114.8229 103.1921 Probability Probability 0.000000 0.000000

Test Equation: Dependent Variable: RESID^2

Method: Least Squares

Sample(adjusted): 4 1004 Included observations: 1001 after adjusting endpoints Variable C RESID^2(-1) R-squared Adjusted R-squared S.E. of regression Sum squared resid Log likelihood Coefficient 0.000145 0.321081 0.103089 0.102191 0.000543 0.000295 6105.819 Std. Error 1.83E-05 0.029964 t-Statistic 7.903650 10.71555 Prob. 0.0000 0.0000 0.000213 0.000573 -12.19544 -12.18564 114.8229

Mean dependent var S.D. dependent var Akaike info criterion Schwarz criterion F-statistic

Durbin-Watson stat

2.064939

Prob(F-statistic)

0.000000

Find evidence of ARCH eects Remember, can have serial correlation in the squared errors even if there is no serial correlation in the errors
Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, May 2011 32 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Heteroskedasticity and Serial Correlation


Can have violation of TS.4 (Homoskedasticity) and TS.5 (No serial correlation) simultaneously. Assume still that TS.1 through TS.3 hold (along with stationarity and weak dependence) yt = 0 + 1 xt1 + ... + k xtk + ut ut = t ht

t = t1 + et
where X are independent of et , ht is a function of the regressors Also the process {et } has mean zero, constant variance and is serially uncorrelated

1 x k x u y t = 0 + t1 + ... + tk + t ht ht ht ht ht
Joo Valle e Azevedo (FEUNL) a Econometrics Lisbon, May 2011 33 / 34

Serial Correlation Time Series Analysis

Heteroskedasticity

Example

Heteroskedasticity and Serial Correlation

Heteroskedasticity and Serial Correlation (Cont.)


We can estimate the function h exactly as in chapter 8 This transformed equation has still serial correlation but no heteroskedasticity Use the estimated h in the equation above and apply Cochrane-Orcutt or Prais-Winsten This leads to a feasible GLS estimator that is asymptotically ecient. Test statistics from Cochrane-Orcutt or Prais-Winsten are asymptotically valid

Joo Valle e Azevedo (FEUNL) a

Econometrics

Lisbon, May 2011

34 / 34

Potrebbero piacerti anche