Autocorrelation
By LuxAlgoJun 5, 2026
Autocorrelation measures whether a market's moves persist, snap back, or carry no memory — with error bars attached. It keeps a rolling sample of the analyzed series, computes its autocorrelation at the primary lag, and bands the reading at 2/sqrt(n), so a value only counts once it clears the noise floor. A correlogram beside the last bar draws one shaded column per lag — ACF, or PACF with shorter-lag influence stripped out — and the dashboard names the regime: Momentum, Mean Reversion, or Noise.
How to Trade the Autocorrelation?
- Above the upper band: significant follow-through — momentum-friendly conditions, alerted on the crossing.
- Below the lower band: significant snap-back — mean-reversion-friendly conditions, likewise alerted.
- Inside the bands: persistence indistinguishable from noise — the honest default, alerted when a regime fades back inside.
- Series picks the question: Returns reads persistence of direction, Squared or Absolute Returns volatility clustering, Detrended Price cycles.
Autocorrelation Settings
- Source (default close): price series feeding the analyzed series.
- Series (default Returns): also Squared Returns, Absolute Returns or Detrended Price.
- Detrend Length (default 20): moving average subtracted from price in Detrended Price mode; ignored otherwise.
- Sample Window (default 200): rolling sample size n — longer tightens the bands but tracks regimes more slowly.
- Primary Lag (default 1): the lag plotted and monitored by the alerts; keep it well below the window.
- Show Correlogram (default on) with Lags (default 20) and Mode (default ACF): the per-lag profile.
- Show Dashboard (on) with Location (Top Right) and Size (Small); Gradient Fill (on).
Frequently Asked Questions
Autocorrelation or the Hurst Exponent for regime work?
The Hurst Exponent condenses persistence into a single scaling estimate; autocorrelation resolves it lag by lag with a significance test at each. Hurst asks whether a market trends or reverts overall; the correlogram asks at which lag, and whether it beats luck.
When should I use PACF instead of ACF?
When a long-lag reading might be short-lag correlation echoing through the chain: PACF strips out the shorter lags' influence so each column shows only that lag's direct effect. The pair is the classic combination for choosing model orders.
Why does my reading sit inside the bands most of the time?
Because that is what liquid markets mostly look like — weak serial correlation is the norm, and the bands stop noise being traded as signal. Small Sample Windows widen the bands sharply, so only large effects register there.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.
