Quant Memo
Advanced

Prewhitening and Bandwidth Choice for HAC Estimators

HAC standard errors fix autocorrelated residuals, but the answer they give depends heavily on a bandwidth choice you have to make yourself — prewhitening is a trick that makes that choice less painful.

Prerequisites: Long-Short Spread Versus Single-Leg Inference

Backtest returns are usually autocorrelated — today's residual leaks into tomorrow's. Ordinary standard errors assume no such leakage, so they understate the true uncertainty and make a mediocre strategy look statistically solid. A Newey-West (HAC) standard error corrects this by weighting nearby-in-time covariances, but the correction needs a bandwidth: how many lags of autocorrelation to include. Pick too few and you're back to understating error; pick too many and the estimate gets noisy and can even lose the positive-definiteness that makes it usable.

Prewhitening strips out a strategy's own autocorrelation with a small AR model first, so the HAC correction only has to clean up what's left — letting you use a smaller, less noisy bandwidth for the same protection.

Prewhitening runs the return series through a low-order autoregression, keeps the residuals (now much closer to independent), applies the HAC estimator to those, then "recolors" the variance estimate back to account for the AR filter. The intuition: instead of asking a wide, sloppy averaging window to soak up correlation, remove the correlation directly and let the window do a smaller job.

Suppose a signal's raw returns have first-lag autocorrelation of 0.4. Fitting an AR(1) and prewhitening drops the residual autocorrelation toward zero, so a HAC estimator with bandwidth 2 on the residuals can do what a bandwidth of 6–8 would have needed on the raw series. Fewer lags means less estimation noise in the covariance matrix, which in turn means a tighter, more trustworthy confidence interval around the strategy's Sharpe ratio.

The tradeoff is that the AR fit itself is estimated with error, and a badly misspecified prewhitening model can introduce its own bias. In practice, quants treat bandwidth choice (often via the Newey-West or Andrews rule-of-thumb formulas) and prewhitening as complements, not substitutes — prewhiten first, then let an automatic bandwidth rule pick a small number of remaining lags.

Related concepts

Practice in interviews

Further reading

  • Andrews and Monahan, 'An Improved Heteroskedasticity and Autocorrelation Consistent Covariance Matrix Estimator'
ShareTwitterLinkedIn