Backtesting BTC-EUR RSI Strategy with Trality

| Trading | 0 seen

For the past couple of days, I've been testing Trality crypto trading bot a lot, executing a few trades.  I must say - I feel very impressed with what this bot can do, if you are new to Trality, see my brief review here: Simple Crypto Trading Bot From Trality

As I like testing and implementing ideas, in today's article I'm going to talk about the Relative Strength Index (RSI) and its usage in crypto trades. I believe RSI is one of the easiest ways to trade crypto. Not 100% proof, but a good starting point for sure. In fact, this is the one and only I understand the most. 

See my previous article about backtesting RSI with XLM (and ADA) coins: Backtesting XLM-EUR RSI Strategy with Trality

Disclosure: I'm not a financial advisor and I don't give you any advice, I'm just sharing my own experience. Investments in stocks, funds, bonds, or cryptos are risk investments and you could lose some or all of your money. Do your due diligence before investing in any kind of asset. 

The relative strength index (RSI) is a momentum indicator developed by noted technical analyst Welles Wilder, that compares the magnitude of recent gains and losses over a specified time period to measure speed and change of price movements of a security. It is primarily used to attempt to identify overbought or oversold conditions in the trading of an asset.

Backtesting BTC-EUR RSI

I decided to build my trading universe with one coin only, the BTC king of the crypto. As I recovered some "lost bitcoins" from Coinbase vault, I thought it would be a good idea to test how trading algorithms could help us avoid a sharp decline in price (there was a sharp 30% BTC price drop recently)

Here are my strategy settings:

  • Action: BUY RSI Candle size 1h, oversold 35 
  • Action: SELL RSI Candle size 1h, overbought 45

Let's start backtesting for the last 24 hours (1d) (05/19/2021 - 05/20/2021)

Backtesting BTC-EUR RSI strategy 24 hours

Backtesting BTC-EUR RSI strategy 24 hours

2 trades and a loss of -0.95%, while the total market dropped more than -38%.. quite good results I guess. you would save your ass.

now let's see how this algorithm would react in 3 days (05/17/2021-05/20/2021)

Backtesting BTC-EUR RSI strategy 3 days

Backtesting BTC-EUR RSI strategy 3 days

Now, this is quite awesome, we were able to generate 8.23% return in just 3 days, while buy and hold was losing -38.15% meantime

Let's have data for the past 7 days (05/13/2021-05/20/2021)

Backtesting BTC-EUR RSI strategy 7 days

Backtesting BTC-EUR RSI strategy 7 days

10 trades in 7 days and 5.44% return vs -34.46% if just holding. I like it.

Let's roll for 2 weeks (05/06/2021-05/20/2021)

Backtesting BTC-EUR RSI strategy 14 days

Backtesting BTC-EUR RSI strategy 14 days

14 trades in 14 days and a negative -1.82% return vs -35.54%.  bot was not able to catch the sharp drop, instead, it bought shortly before the drop. RSI dropped under 16 on May 12, while we bought BTC when RSI was 31.02 (which is a bit strange as our entry point is 35)

Let's try 30 days (04/20/2021-05/20/2021)

Backtesting BTC-EUR RSI strategy 30 days

Backtesting BTC-EUR RSI strategy 30 days

Good, we are back on the track, 28 trades and a decent 7.8% gain in a failing market. BTC lost 41% meantime. ouch.

How about 3-month testing (02/19/2021-05/20/2021)

Backtesting BTC-EUR RSI strategy 3 month

Backtesting BTC-EUR RSI strategy 3 month

Alright, despite the bot gave better results than just buying and holding, I guess it's time to stop here. further testing can be done but is not needed, instead, we should focus on fine-tuning our algorithm to get better results. But that already another story

What can we learn from this?

A simple trading algorithm based on RSI could help us if not make money, then at least not lose it significantly. Our bot did a good job in the backtesting. the most we were losing was -5.42% in 90 days, while BTC fell 40% at its highest.

The bot showed better results in a failing market than just buying and holding coins.

For the next 30 days, I've decided to launch a real trading bot with the above-listed setting, and let's see. All findings will be shared and possible improvements will be discussed.