financialnoob.me

Blog about quantitative finance

Momentum vs mean reversion in crypto

Momentum and mean reversion are two main phenomena that traders in different markets try to exploit. Those who believe in momentum buy the winners and sell the losers, hoping that the price of the asset will continue moving in the same direction. Those who believe in mean reversion tend to buy the losers and sell the winners, hoping that the prices will revert back to some mean value. In this post I would like to perform simple tests of momentum and mean reversion in cryptocurrency market.


I will use price data in 30min resolution from 01.07.2021 to 22.11.2021. It contain close prices of 25 coins in USD (USDT). The list of included 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']

There might be some bias in selected coins because I selected only coins that had a large enough market capitalization at the time of writing (top50 on coinmarketcap) and then removed all the coins for which I didn’t have data for the whole period.

I want to test a very simple thing: what are the next period returns of the winners\losers in the current period? If there is momentum, then we should see that current period winners have high returns in the next period, and that current period losers have low returns in the next period. In case of mean reversion it’s the opposite: the current period winners should have low returns in the next period and current period losers should have high returns in the next period.

I will test it on different time steps ranging from 30 minutes to 24 hours. For each period of a given length I am going to select 3 winners and 3 losers and calculate their average return in the current period and in the next period. For all time steps longer than 30 minutes, sliding 30minute window is used, so that I have similar sample size for each time step. To be honest, I’m not 100 percent sure if I can use such overlapping periods to increase the sample size, especially for longer time steps, but I will do it anyway.

Below is the code to perform the described procedures.

Now let’s look at the results:

Results: 3 winners and 3 losers

The dataframe has the following columns:

  • top_cp_mean — average return of the 3 winners in the current period
  • top_np_mean — average return of the 3 winners in the next period
  • bot_cp_mean — average return of the 3 losers in the current period
  • bot_np_mean — average return of the 3 losers in the next period
  • market_mean — average market return (mean return of all 25 coins)
  • btc_mean — average return of BTC

The last two columns are provided just for comparison.

For shorter time steps (30min and 1h) we can see reversion — winners tend to have negative returns and losers tend to have positive returns. But as the length of the time step increases further, something interesting happens. We see momentum in winners and reversion in losers. Reversion in losers is not that high and comparable to average market returns, but momentum in winners is very noticeable, especially for longer time steps. Another interesting thing to notice is that for all time steps average market return is more than 1.5 times higher than bitcoin return.

Now let’s try to perform several performance tests using Monte Carlo simulation. I have saved all the returns used for calculations for each time step. Now I can randomly choose 1-period returns to create a sample path and calculate cumulative returns. Below I will generate and plot the returns of contrarian strategy (buying losers and selling winners) using 30 minutes time step and total length of 100 days (4800 30min periods).

Monte Carlo simulations of contrarian strategy (no transaction costs)

We get impressive results. Average return among 100 samples is 2989, which means 298900% in 100 days. Now let’s try to include transaction costs. I will use 0.1% fee per trade and 4 trades per period (open\close positions for winners and losers).

Monte Carlo simulations of contrarian strategy (with transaction costs)

Now we get completely different picture. With transactions fees such strategy is not profitable at all.

Now I want to test momentum strategy on winners. Here the transaction costs will be lower, because we trade in 3 instruments, instead of 6. We need to earn more money per period, than we pay in transaction fees. Our transaction fees will be 0.2%. We can check the table above to see for what time steps the average return of the winners in the next period is bigger than 0.002. Now we know that we need to use time step bigger than 6 hours.

I am going to test all the periods from 6 to 24 hours. For each period 100000 sample paths will be generated. Each sample path will be 100 days long, so the number of periods will be adjusted according to the time step used. The generated paths will be used to calculate the mean of returns, standard deviation of returns, and the fraction of paths that end up losing money.

The code along with the results is provided below.

Here the results are promising. Using 24h time step we have average return of 352% (in 100 days) with only 5.99% of sample paths losing money. The average annualized Sharpe ratio for all periods is more than 3. Of course we need to keep in mind that I use the data from time period which is very short and during which the crypto market experienced a lot of growth.


Now I would like to perform the same tests, but using only 1 winner and 1 loser, instead of 3.

Results are similar to what we got before. Reversion for 30min and 1h time steps, momentum for winners and reversion for losers for longer time steps. But the momentum effect here seems to be more pronounced.

Now let’s look at the performance of momentum strategies using Monte Carlo simulations.

In this case we get higher average returns (especially for longer periods), but also higher standard deviations of returns and higher chances of losing money. This is due to the lack of diversification, since we are only trading in one coin at a time.


The results of my experiments suggest that depending on the time period used one can find both momentum and mean-reversion in cryptocurrency market. Mean reversion is found on smaller time steps and very difficult to exploit due to transaction costs. Momentum is found on longer time steps and potentially is easier to exploit, although more research is needed.


Jupyter notebook with source code is available here.

If you have any questions, suggestions or corrections please post them in the comments. Thanks for reading.

Leave a Reply

Your email address will not be published. Required fields are marked *