Mean Reversion Trading Systems and Cryptocurrency Trading [A Deep Dive]

899 reads

@ alok310 Alok Passionate Trader, Analyst and Part time Blogger

Prices move in a wave like fashion, moving back and forth following a broader trend. While doing so, it often revolves around a mean. It might move across or bounce off the mean. Mean reversion systems are designed to exploit this tendency.

Prices much above the mean are considered expensive and the ones below the mean are considered cheap and the positions are taken accordingly. This back and forth movement of prices or the standard deviation needs to be high enough to make profits otherwise the system might fail. There would not be much room to take profits if the volatility is very low. Costs

such as slippage, brokerage etc. will make it difficult to remain profitable.

reactions

We will first look at frequency distribution of prices of Bitcoin and

visualize the mean reversal tendency through curves. Then we will move

on to create a simple counter-trend strategy for the prevailing trend in

the crypto space.

reactions

Statistical Evidence for Mean Reversion :

Rather than using frequency distribution of prices itself, we have

calculated frequency distribution of hourly returns. Lets look at some

of the statistics that I obtained after analyzing hourly price returns

for BTC/USDC pair trading on Coinbase from 13th November 2018 to 5th

April 2019 and BTC/USD pair trading on Coinbase from July 2017 to April

2019.

reactions

It can been seen that the graphs are not perfectly Bell Shaped. It is

worth noting that the values are very tightly distributed and it

resembles a double exponential distribution.With a little tolerance

mean, median and mode are almost equal.

reactions

Quoting mathworld.wolfarm.com :

reactions

“Reversion to the mean, also called regression to the mean, is the statistical phenomenon stating that the greater the deviation of a random variate from its mean, the greater the probability that the next measured variate will deviate less far. In other words, an extreme event is likely to be followed by a less extreme event.”

It can be seen in the Fig. 1.1 & Fig. 1.2 that, the further we move

away from the mean returns, the value of probability distribution

function decreases, making the probability of having further higher

deviation in returns less probable.

reactions

This might not be the best example to explain mean reversion but here we can see the tendency of periodic returns to return towards the mean which

can explain the validity of mean reversion of freely traded instruments.

reactions

How does mean reversion compare with trend following strategies?

An attempt at building my own Mean Reversion Strategy for Crypto Currencies

Disclaimer : This resource is for educational purpose

only and does not constitute a recommendation to buy, sell or otherwise

deal in investments or trading.

reactions

Entry Condition : SELL when RSI MA(14,close,triple,2,0) crosses below RSI MA(14,close,simple,10,0) and 14 RSI higher than 70.

reactions

Exit Condition : BUY at stop loss of 1.0% or target profit of 2.5%.

reactions

Cryptos have been in a bullish trend recently. Here we are trying to create a

bearish strategy to demonstrate how corrections in prices can be traded

within a broader general trend that is against our direction of trade by

trying to catch the mean reverting moves.

reactions

RSI higher than 70 condition is used to check for overbought levels. Since RSI itself is a very volatile indicator, we smoothen its value by applying averages.

Then we check for crossover of the smoothened RSI values when the RSI is

already in the overbought region. Crossover of a smaller period MA with a

larger period MA is checked for fading short term relative strength.

And when the setup is complete, we go short.

reactions

Instead of defining mean and taking profits at the mean, to keep the strategy simple, profit taking is done on fixed %. The strategy was backtested to evaluate the performance. While it does not work for all the pairs, it performs well on some other pairs. Here are some of the successful backtest results :

reactions

It can be seen in the above images that against a positive period return of

16.26%, the short strategy has managed to make 7% returns by doing 4

trades out of which 3 were profitable. The backtest period is 03/17/2019

to 04/16/2019 and it is carried out on 10 min candle interval.

reactions

Conclusion

While there are evidences mentioned in the article suggest that mean

reversion works in freely traded markets, there is a lot of room for

further research. Simple strategies can be created to trade counter to

the direction of trend and also for the periods of sideways trends.



reactions

Traders must consider to diversify their strategies across trend

following and mean reversion which might be helpful in reducing

drawdowns or risks associated with using just one kind of strategy.

reactions

Bibliography :

reactions

https://streak.world for backtesting strategies and charting.

reactions

http://mathworld.wolfram.com/ReversiontotheMean.html for defining mean reversion.

reactions

The data used to calculate the probability distribution of price changes can be downloaded by clicking on the tickers BTCUSD, BTCUSDC.

reactions

reactions

Share this story @ alok310 Alok Read my stories Passionate Trader, Analyst and Part time Blogger

Tags