Momentum vs mean reversion in crypto. Attempt #2
My previous post on this topic had some problems which I will try to fix in this post.
First problem is that I used 30 minute sliding window and overlapping periods to create a collection of returns. That collection was then used to sample returns for Monte Carlo simulations. The problem with this approach is that many sampled returns will have high serial correlations. This problem gets worse as the period gets longer. For example, in case of 24 hour periods it is obvious that for a given period its return will be almost identical to the next period, which is shifted by 30 minutes. The overlap between consecutive periods ranges from 50% for 1 hour periods to 97.92% for 24 hour periods. You can find more detailed explanation of the problem here.
Another issue is that random sampling of simulated returns does not allow to capture any serial correlations that might exist in the historical data. On one hand I have a collection of returns some of which have very high serial correlations, and on the other hand my sampling method isn’t suited for finding such correlations. So the results I got are likely inaccurate.
I’ve made several changes in testing procedure. First of all, I won’t use overlapping periods and I won’t use random sampling for simulated returns. Second, I will test different lengths of lookback and holding periods (previously I only tested lookback\holding periods of equal length). And third, I will use correlation coefficient as a measure of momentum or mean reversion. If there is momentum (mean-reversion) in crypto market we expect that current period returns are positively (negatively) correlated with next period returns. It is possible that some pairs of lookback\holding periods will exhibit momentum and other pairs will exhibit mean-reversion. Such testing methodology is described in E.P.Chan’s book ‘Algorithmic trading: winning strategies and their rationale’.
I will use the same data as in previous part: close prices of 25 coins in 30 minute intervals from 01.07.2021 to 22.11.2021. The list of coins is provided below.
['BTC', 'ETH', 'BNB', 'XRP', 'DOT', 'DOGE', 'SHIB', 'LTC', 'UNI', 'LINK', 'MATIC', 'BCH', 'TRX', 'MANA', 'ATOM', 'ETC', 'XTZ', 'XMR', 'GRT', 'EOS', 'SAND', 'AAVE', 'LRC', 'NEO', 'ZEC']Let’s get started.
First I’m going to test the overall crypto market represented by 25 coins in my dataset. I will test all possible combinations of lookback and holding periods, where lookback period is at least as large as holding period (I don’t think it makes sense to test holding periods longer than lookback period). So for each pair of periods I need to calculate returns during lookback period and returns during the corresponding holding period (which starts immediately after lookback period).
Then I will select top 3 winners\losers in each lookback period and check how their performance in the lookback period correlates with their performance in the following holding period.
The method for avoiding overlapping intervals described in E.P.Chan’s book puzzles me. Below is the picture from the book along with a quote.

In computing the correlations of pairs of returns resulting from different look-back and holding periods, we must take care not to use overlapping data. If look-back is greater than the holding period, we have to shift forward by the holding period to generate a new returns pair. If the holding period is greater than the look-back, we have to shift forward by the look-back period.
I understand why the periods in the bottom are considered non-overlapping, but the periods on top of the picture look overlapping to me. Especially this would be noticeable if the holding period is significantly shorter than lookback period.
Since I’m not certain which shift period to use I will perform two tests. In one I will shift forward by holding period as suggested in the book (my holding periods are always less than or equal to lookback period). In another I will shift forward by lookback period.
I will start with the method described in the book: shifting by holding period. First I test the whole market. The python code for doing it and the results I got are provided below.













