Autocorrelation in Trading: Test Before You Pick a Side

Every momentum strategy makes a quiet bet. So does every mean reversion strategy. Autocorrelation in trading is the property that decides which bet pays.
Momentum assumes rises tend to follow rises. Mean reversion assumes rises tend to be followed by falls. Both can’t be true at the same time on the same timeframe. Autocorrelation tells you which one your market has been doing.
What Is Autocorrelation?
Autocorrelation is the correlation between a series and an earlier copy of itself. In trading, it compares each candle’s return with the return a set number of candles before.
The gap is called the lag. Lag 1 compares each candle with the one just before. Lag 5 compares it with the candle five back. Wikipedia’s autocorrelation entry covers the maths.
The result runs from -1 to +1:
- Positive: moves tend to continue. That favours momentum.
- Negative: moves tend to reverse. That favours mean reversion.
- Near zero: past moves say little about the next one.
Why Autocorrelation Matters
Most strategies never state their assumption. A breakout rule simply buys strength. It only works if strength tends to keep going. That is positive autocorrelation.
An oversold bounce rule buys weakness. It only works if weakness tends to reverse. That is negative autocorrelation.
Checking autocorrelation first saves wasted testing. If your market’s returns barely relate to their past, both styles are fighting the data. You find out before building anything.
How Do You Measure It?
Take a list of candle returns. Line each one up next to the return before it. Then calculate the correlation between the two columns.
That single number is the lag-1 autocorrelation. Repeat with lag 2, lag 3 and so on. The pattern across lags is more useful than any single figure.
Is the Number Real or Noise?
Small autocorrelations appear by chance all the time. A rough rule says a reading matters only if it is bigger than 2 divided by the square root of the number of returns.
| Number of returns | Rough noise band |
|---|---|
| 365 daily returns (1 year) | ±0.105 |
| 1,000 daily returns | ±0.063 |
| 4,380 four-hour returns (2 years) | ±0.030 |
These bands come straight from the formula. A lag-1 reading of 0.04 on one year of daily data is inside the noise. The same reading on two years of four-hour data is just outside it.
Formal tests such as the Ljung–Box test check several lags at once. The rough band is enough for a first look.
What Autocorrelation Hides
Timeframe Changes Everything
A market can show negative autocorrelation on hourly candles and positive on weekly ones. Short-term noise reverses. Longer trends persist. Measure on the timeframe you intend to trade.
It Drifts Over Time
Autocorrelation is not fixed. A market can trend for a year and then chop for a year. Measure it separately for each year of your data. If the sign flips, any single-style strategy will struggle in some years.
Our posts on the Hurst exponent and mean reversion half-life look at the same question from different angles.
Size Clusters Even When Direction Doesn’t
Crypto returns often show little autocorrelation in direction. Their size is a different story. Big moves tend to follow big moves, in either direction.
That is volatility clustering. It shows up as strong autocorrelation in the size of returns, ignoring their sign. It helps with position sizing and stops, not with picking direction.
Fees Eat Small Edges
A real but small autocorrelation may still be untradeable. Lag-1 effects mean trading every candle or two. Fees and slippage can wipe out a tiny edge. Always test after costs.
How to Apply Autocorrelation in Arrow Algo
Arrow Algo has no single autocorrelation block. You can still test the idea directly with visual blocks. The test is a pair of simple strategies.
Build a follow-on version. Use a Lag block set to 1 to get the previous close. When the close is above it, the candle was up, so signal a buy. When the close is below it, signal a sell.
Then build a reversal version. Swap the signals. Buy after a down candle. Sell after an up candle.
Backtest both on the same pair, timeframe and dates. Run them once with zero fees and once with real fees. The zero-fee run shows the raw autocorrelation. The real-fee run shows whether it is tradeable.
You can also ask a connected AI assistant to calculate autocorrelation for a pair and timeframe. Ask for several lags, each year separately, and the noise band. Then use the result to choose which style to build.
Deployment is always your decision. If you deploy, your rules send signals to your own exchange account. The exchange decides whether to accept and execute.
What Are the Key Takeaways?
- Autocorrelation measures whether returns relate to earlier returns.
- Positive readings favour momentum. Negative readings favour mean reversion.
- Treat small readings as noise. Compare them with 2 divided by the square root of the sample size.
- Measure on your trading timeframe, and check each year separately.
- Size autocorrelation (volatility clustering) helps with risk, not direction.
- Test follow-on and reversal rules side by side, with and without fees.
Disclaimer: This content is for educational purposes only and does not constitute financial advice. Trading involves significant risk and you should only trade with capital you can afford to lose. Past performance is not indicative of future results. Always conduct your own research before making any trading decisions.
Ready to build your own automated trading strategies without writing a single line of code? Start for free at Arrow Algo and join thousands of traders who've made the switch to systematic trading.
See Arrow Algo first on Google. Add us as a preferred source and our articles show up more in your Top Stories.
Add as a preferred source on Google