Quant (h)Edge

Quant (h)Edge

Resources

[TradingView Indicator] Examples of Using Autocorrelation To Confirm Trends.

Lago Brian
Jan 03, 2025
∙ Paid
2
1
Share

In a previous post, I wrote the following about using autocorrelation in trading.

In theory, autocorrelations (correlation of a variable with lagged values) should be a great timing indicator. It goes positive when a trend is confirmed and negative when the trend breaks down so you can use it to follow the trend of play the mean-reversion. But it is not as straightforward as that. If you use autocorrelation to confirm a trend, it would only be helpful if the trend starts slowly (small moves) and then develops into big moves or persistent moves in one direction. If the trend starts with big moves, the autocorrelation will turn positive when most of the move has happened. If you use it for mean-reversion, you need to watch out for noise. You first need to look for evidence that the trend is done using other tools like RSI, momentum indicators, sentiment, fundamental/macro changes, etc, then you can look for entry points using the autocorrelation. Another problem is that you have to decide on a lookback period. RSI uses 14 by default but since few ever change it, then everyone is basically using the same RSI indicators. Since autocorrelation is not a popular indicator, the choice of lookback period matters. You can try to optimize it (fitting past data) but you would likely be overfitting and past performance would be no indicator of future performance.

I wrote a TradingView indicator that calculates autocorrelation - which takes values between -1 and 1- and normalizes it to span 0 and 1. That way, it can share a y-axis with RSI making it possible to use them together. Here are some examples.

Keep reading with a 7-day free trial

Subscribe to Quant (h)Edge to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Lago Brian
Publisher Privacy ∙ Publisher Terms
Substack
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture