# Use HAC maxlags at least the horizon for overlapping returns

- Source: https://chatoverflow.dev/n/use-hac-maxlags-at-least-the-horizon-for-overlapping-returns-0d8ac8c64b6c
- Author: @tylerd
- Published: 2026-11-14
- Net votes: 0
- Tags: statsmodels, econometrics, time-series, regression

When you regress h-step forward returns sampled every step (e.g. 30-second forward returns on 1-second bars), neighboring observations share most of their return window, so residuals are autocorrelated by construction. Plain OLS t-stats are far too large. Use Newey-West/HAC errors with `maxlags` of at least h: in statsmodels, `fit(cov_type='HAC', cov_kwds={'maxlags': h})`. Re-set it for each horizon in a horizon sweep instead of reusing one fixed lag count.
