QTQuant Terminal
A2-07A2·intermediate·~19 min

Regression diagnostics — when OLS lies

regressiondiagnosticsmulticollinearityheteroscedasticityresiduals

▸ Pretest — guess, even if you don't know

You regress AAPL returns on (SPY returns) and (QQQ returns) together. SPY and QQQ are 95% correlated. What happens to the estimated coefficients?

The four diagnostic questions

After running any regression, ask:

  1. Are the predictors collinear? (Multicollinearity)
  2. Are the residuals heteroscedastic? (Non-constant variance)
  3. Are the residuals autocorrelated? (Independence violated)
  4. Are the residuals normal? (Affects hypothesis tests, not point estimates)

We'll cover each. The fix is usually either a robust standard error or a different model.

1. Multicollinearity

When predictors are highly correlated with each other:

Diagnostic — Variance Inflation Factor (VIF):

VIFj=11Rj2\text{VIF}_j = \frac{1}{1 - R_j^2}

where Rj2R_j^2 is the R2R^2 from regressing predictor jj on all the others.

Rules of thumb:

Fix: drop one of the correlated predictors, combine them (e.g., PCA), or use a regularized regression (Ridge — shrinks correlated coefficients toward each other).

2. Heteroscedasticity

OLS assumes residuals have constant variance across the predictor range. Financial residuals usually don't:

Diagnostic: plot residuals vs. predicted values. Fan-shaped pattern = heteroscedasticity. Formal test: Breusch-Pagan.

Why it matters: OLS point estimates are still unbiased, but the standard errors are wrong → your t-stats and p-values are wrong.

Fix: use White / robust / heteroscedasticity-consistent (HC) standard errors. In statsmodels:

model.fit(cov_type='HC3')   # one of several heteroscedasticity corrections

3. Autocorrelation

If residuals at time tt are correlated with residuals at t1t-1, you've violated independence. Common in:

Diagnostic: Durbin-Watson statistic (close to 2 = no autocorrelation; close to 0 or 4 = strong autocorrelation). Ljung-Box test for multiple lags. ACF plot.

Fix: use Newey-West / HAC (heteroscedasticity and autocorrelation consistent) standard errors:

model.fit(cov_type='HAC', cov_kwds={'maxlags': 5})

maxlags is roughly how many periods of autocorrelation you suspect. Rule of thumb: N1/4\sim N^{1/4} for NN observations.

4. Non-normal residuals

Residuals don't need to be normal for OLS to give consistent point estimates. They do need to be roughly normal for:

For large samples (say N > 100), the CLT covers the test statistics regardless of residual distribution. For small samples or extreme fat tails, you might prefer non-parametric methods (bootstrap) or quantile regression.

Diagnostic: Q-Q plot of residuals against normal. Should be roughly diagonal. Strong tails curving away = problem.

Outliers and influence

A single extreme observation can drive the regression. Two related concepts:

Diagnostic: Cook's distance for influence. statsmodels' model.get_influence() gives a full diagnostic suite.

In finance, the 2008 financial crisis and March 2020 are often hugely influential observations. A regression run on 2010–2024 daily data is qualitatively different from one run on 2008–2024.

Robust strategy: examine the regression results with and without crisis periods. Big differences = your model isn't stable across regimes.

A practical checklist

Before publishing any regression result, run through:

This is a 20-minute exercise that catches 90% of "the regression said it was significant but actually isn't" problems.

⧉ Review card
What is Variance Inflation Factor (VIF)?
VIF_j = 1 / (1 − R²_j), where R²_j is from regressing predictor j on all others. VIF > 10 = serious multicollinearity. Drop a predictor or use regularization.
⧉ Review card
What's the fix for heteroscedastic residuals?
Use White / robust / HC standard errors (e.g., HC3 in statsmodels). Point estimates were already consistent; this fixes the standard errors.
⧉ Review card
What's the fix for autocorrelated residuals?
Newey-West / HAC standard errors. Set maxlags ≈ N^(1/4). Or model the autocorrelation explicitly (ARMA, etc.).
⧉ Review card
When does residual normality actually matter?
For small-sample t-statistics and F-tests. For large samples (N>100), CLT makes test statistics approximately normal anyway. Point estimates never need residual normality.
⧉ Review card
What's the most important diagnostic for financial regressions?
Examine residuals vs. time AND re-run excluding extreme periods (2008, COVID). If your coefficients change meaningfully, the model isn't stable across regimes.

Explain it back

In your own words: why do OLS point estimates often survive violations of OLS assumptions, while OLS standard errors do not? What's the practical implication for backtest hypothesis tests?

◈ Calibration check

Could you list three things to check after running a regression on financial data?

1 = guessing · 5 = could teach it

⏻ End of lesson

Mark it read to book its 5 review cards into your deck.

Sources & further reading