“Buy when oversold, and sell when overbought. Time to PRINT MONEY.”
We have all been there, no shame in that.
After all, the idea of buying Bitcoin after a heavy sell-off, and selling it after a strong rally, makes intuitive sense.
But could our intuition be lying to us?
Time to run some actual backtests.
Teaser, this is what we’ll build at the end of the article:
Ok, first of all, let’s define the scope and parameters of the backtests.
- RSI periods of 14 and 2.
- H4, H1, and m30 timeframes.
- Only Bitcoin.
- Fees not included.
RSI entry conditions:
- 70 as the RSI overbought level (short entry).
- 30 as the RSI oversold level (long entry).
RSI exit conditions:
- 40 as the RSI exit level for shorts.
- 60 as the RSI exit level for longs.
- Long when oversold, exit at RSI exit level.
- Short when overbought, exit at RSI exit leve.
It’s also important to note that I used Pro Real Time for the backtests. Their Bitcoin price data is not the best, but it’s good enough.
Results for the H4 chart
The performance stats for both RSIs is horrendous on the H4 timeframe.
However, It’s interesting that the 2-period RSI gives significantly better results, even though the 14 period RSI is a LOT more popular among traders.
Let’s see if this holds up on other timeframes as well.
Results for the H1 chart
Well, for the H1 chart too, all performance metrics are incredibly poor.
But, we can also see again that the 2-period RSI outperforms the 14-period RSI.
Results for the m30 chart
Slightly better results than in the last 2 tests, but still horrible. Again, RSI(2) outperforms.
Interestingly, both RSIs were NOT profitable in 2019 in any of the backtests.
This is likely due to how price trended much harder in 2019 than in 2018, which isn’t ideal for a mean reversion strategy.
Creating a viable RSI strategy
We learned 3 main things:
- RSI(2) seems to give better signals than RSI(14).
- Lower timeframes are more profitable than higher timeframes.
- We need a trend filter to avoid getting run over.
Hence, I added the following rules to the existing entry/exit conditions already defined in the intro:
- We use the H1 MACD to determine trend direction.
- We use RSI(2) on the m30 chart to get overbought/oversold signals.
- Only go long if MACD is in a bull trend and RSI(2) gives an oversold signal.
- Only go short if MACD is in a bear trend and RSI(2) gives an overbought signal.
Now returns are OK-ish and the drawdown is fine.
Certainly much better than what we had so far.
That said, would I trade this strategy? In its current form, no.
But it’s interesting to see how much a simple trend filter and a shorter period can contribute to the profitability of an RSI strategy.
First of all, please remember that I did not include trading fees in the backtest. If you mostly trade using taker orders, then this is the first thing that you want to look into.
I didn’t include fees because mean reversion strategies usually trade during GREAT environments for limit order fills. If you’re using an exchange like BitMEX or Bybit, the hefty maker rebate is well worth the effort of making this work.
So, is this all there is to mechanical trading with RSI?
A few ideas that you can test next:
- Combine RSI(2) with another momentum indicator to get a confirmation for overbought/oversold signals. With this filter in place, try to run this on low timeframes (m15 and m5).
- Work with limit orders. e.g. if oversold, place limit order 1% below the current price.
- Try trend filters with less lag than the MACD.
- Test using cumulative RSI values. e.g. if the sum of the last 3 RSI values is more than x, go short.
RSI is a powerful indicator and can be used to trade profitably. But you’ll have to ditch the mainstream overbought/oversold concept and think a bit out of the box.
I have a few more backtests that I’ll be sharing publicly. I will probably publish one of these posts a week.
If there’s anything specific you’d like me to test, comment below or let me know on Twitter. I may add it to my to-do list if it’s interesting.