Skip to content

Performance & Risk Metrics

Autocorrelation Lag Test

A statistical test that measures whether past returns or signals exhibit correlation with their lagged values, detecting serial dependence that may indicate exploitable patterns or statistical anomalies in trading strategy performance.

Autocorrelation lag tests, commonly run with the Ljung-Box or Durbin-Watson statistic, check whether consecutive observations in a series are independent. Significant autocorrelation at a given lag means they are not, which can reflect a genuine market microstructure effect or, in a backtest, contamination by look-ahead bias. Unexplained autocorrelation can inflate a strategy's apparent hit rate and make a fragile edge look robust.

Significant autocorrelation at lag-1 alongside positive returns can reflect genuine momentum, which is fine if it is truly causal. The warning sign is autocorrelation that shows up only in the backtest window and vanishes out-of-sample: that points to overfitting rather than a real, repeatable edge. The test helps you ask whether the alpha is structural or just correlated noise.

Formula

n
Sample size (number of observations)
\rhok
Sample autocorrelation coefficient at lag k
h
Number of lags being tested
LB
Ljung-Box test statistic (follows chi-squared distribution with h degrees of freedom under null hypothesis of no autocorrelation)
Sources: Ljung, G. M., & Box, G. E. (1978). On a Measure of Lack of Fit in Time Series Models. Biometrika, 65(2), 297-303. · Durbin, J. (1970). Testing for Serial Correlation in Least-Squares Regression. Biometrika, 57(3), 409-428.