Lesson 4.11: Autocorrelation: Detection and Consequences

This lesson addresses the final major violation of the CLM assumptions: Autocorrelation. Common in time-series data, this occurs when error terms are correlated with each other across time. We will explore the severe consequences for OLS and introduce the classic Durbin-Watson test for detection.

Part 1: Defining Autocorrelation

1.1 The Classical Assumption: No Autocorrelation

A core part of Gauss-Markov Assumption 4 is that the error terms are uncorrelated with each other. For time-series data, this means the error in one period is not correlated with the error in any other period.

Assumption: No Autocorrelation

E[ϵtϵsX]=0for all tsE[\epsilon_t \epsilon_s | \mathbf{X}] = 0 \quad \text{for all } t \ne s

In matrix form, this means the off-diagonal elements of the error covariance matrix E[ϵϵTX]E[\bm{\epsilon}\bm{\epsilon}^T | \mathbf{X}] are all zero.

1.2 The Violation: Autocorrelation (Serial Correlation)

Autocorrelation (or serial correlation) occurs when this assumption is violated. It's particularly common in financial and economic time series, where shocks in one period tend to persist into future periods.

Visual Intuition: The 'Memory' of Shocks

Imagine a regression of stock returns. On Monday, there is a surprisingly large, negative shock (a large negative residual, et<0e_t < 0) due to unexpected bad news.

  • No Autocorrelation: On Tuesday, the error term et+1e_{t+1} is completely random and has no memory of Monday's shock.
  • Positive Autocorrelation: The negative sentiment from Monday spills over. Tuesday's error is also likely to be negative. Negative errors tend to be followed by negative errors, and positive by positive.

A plot of the residuals over time would show "clumps" or "runs" of positive and negative values, rather than a random scatter.

The most common model for autocorrelation is the **first-order autoregressive model, AR(1)**, for the error term:

ϵt=ρϵt1+ut\epsilon_t = \rho \epsilon_{t-1} + u_t

where ρ<1|\rho| < 1 is the autocorrelation coefficient and utu_t is a well-behaved (homoskedastic, non-autocorrelated) error term.

Part 2: Consequences of Autocorrelation

The OLS Consequence of Autocorrelation

The consequences are nearly identical to those of heteroskedasticity:

  1. The OLS estimator β^\bm{\hat{\beta}} remains **unbiased** and **consistent**.
  2. The OLS estimator β^\bm{\hat{\beta}} is **inefficient** (no longer BLUE).
  3. The standard OLS variance formula Var(β^)=σ2(XTX)1\text{Var}(\bm{\hat{\beta}}) = \sigma^2(\mathbf{X}^T\mathbf{X})^{-1} is **incorrect and biased**, leading to invalid standard errors and t-tests.

Why the Variance Formula Fails

When autocorrelation is present, the error covariance matrix is no longer spherical. For an AR(1) process, it has the form:

E[ϵϵT]=Ω=σ2[1ρρ2ρ1ρρ2ρ1]σ2IE[\bm{\epsilon}\bm{\epsilon}^T] = \mathbf{\Omega} = \sigma^2 \begin{bmatrix} 1 & \rho & \rho^2 & \dots \\ \rho & 1 & \rho & \dots \\ \rho^2 & \rho & 1 & \dots \\ \vdots & \vdots & \vdots & \ddots \end{bmatrix} \ne \sigma^2\mathbf{I}

As we proved in the heteroskedasticity lesson, the true variance of β^\bm{\hat{\beta}} is Var(β^)=(XTX)1XTΩX(XTX)1\text{Var}(\bm{\hat{\beta}}) = (\mathbf{X}^T\mathbf{X})^{-1}\mathbf{X}^T\mathbf{\Omega}\mathbf{X}(\mathbf{X}^T\mathbf{X})^{-1}. Since Ωσ2I\mathbf{\Omega} \ne \sigma^2\mathbf{I}, the standard OLS formula is misspecified.

In the presence of positive autocorrelation (common in finance), OLS tends to severely *underestimate* the true variance of the coefficients, leading to artificially small standard errors and inflated t-statistics. This makes us think our predictors are more significant than they really are.

Part 3: Detection with the Durbin-Watson Test

The Durbin-Watson (DW) Test

The Durbin-Watson test is the classic method for detecting first-order autocorrelation in the residuals.

Hypotheses:

  • H0:ρ=0H_0: \rho = 0 (No first-order autocorrelation).
  • H1:ρ0H_1: \rho \ne 0 (First-order autocorrelation exists).

The Durbin-Watson Statistic (d)

d=t=2n(etet1)2t=1net2d = \frac{\sum_{t=2}^n (e_t - e_{t-1})^2}{\sum_{t=1}^n e_t^2}

Where ete_t are the OLS residuals.

It can be shown that for large samples, the statistic has a simple approximate relationship with the sample autocorrelation coefficient ρ^\hat{\rho}:

d2(1ρ^)d \approx 2(1 - \hat{\rho})
Interpreting the DW Statistic

The value of dd ranges from 0 to 4.

  • d2d \approx 2: If dd is close to 2, then ρ^0\hat{\rho} \approx 0. This is evidence of **no autocorrelation**. We fail to reject H₀.
  • d0d \approx 0: If dd is close to 0, then ρ^1\hat{\rho} \approx 1. This is evidence of strong **positive autocorrelation**.
  • d4d \approx 4: If dd is close to 4, then ρ^1\hat{\rho} \approx -1. This is evidence of strong **negative autocorrelation**.

The exact decision rule involves comparing dd to two critical values, dLd_L and dUd_U, from a Durbin-Watson table, which leads to a region of indecision. Modern software often reports a p-value directly, simplifying the test.

Part 4: Solutions and Remedies

How to Fix Autocorrelation

  1. Check for Model Misspecification: Autocorrelation is often a symptom of a deeper problem. You might be missing key variables, or the relationship might be non-linear. Before reaching for complex fixes, always check if your model is correctly specified.
  2. Use Robust Standard Errors: Similar to the fix for heteroskedasticity, we can use a different formula to calculate the standard errors. The **Newey-West** standard errors are consistent in the presence of both heteroskedasticity and autocorrelation (HAC). This is the most common and practical fix in finance.
  3. Transform the Model (GLS): A more advanced method is to use Generalized Least Squares (GLS), such as the **Cochrane-Orcutt procedure**. This involves estimating ρ\rho from the residuals and then transforming the original data to create a new regression equation whose error term is no longer autocorrelated. This restores the BLUE property but is more complex to implement.

What's Next? Module 4 Complete!

Congratulations! You have completed the full journey of Module 4. We have built the regression engine, proved its optimality under the CLM assumptions, and learned how to diagnose and fix the most common real-world violations of those assumptions.

You now possess the complete theoretical and practical toolkit of a classical econometrician. You are ready to build, interpret, and critically evaluate linear models in any context.

In **Module 5**, we will move beyond the classical framework into the specialized and powerful world of **Time Series Analysis**, where we will learn to model the dynamics of data over time with tools like ARMA, ARIMA, and GARCH models.