BTC trading strategy in times of uncertainty – crypto bot with safeties

BTC trading strategy in times of uncertainty – crypto bot with safeties

Bitcoin went down 50% barely 2 weeks ago. Now, it has almost retraced this drastic move. It’s clear that trading opportunities are out there and crypto bots may be more useful than ever. 

Coronavirus is wreaking havoc on all markets. However crypto markets are open 24/7. There are no safeties nor can trading be paused. That’s why it is wise to use automation and protect yourself from loses. Take your funds out of harm’s way, but still be in a great position to profit. 

We want to help you navigate the process of building such a strategy. After following the guide, you will be able to deploy a crypto bot in which you are confident, and trade with minimal effort. 

The strategy for crypto trading in times of uncertainty 

We sat down and tried to create a strategy, that is HODLer-friendly, and can provide protection from undesirable downward price movements. When deployed as a crypto bot it should open opportunities while giving you a piece of mind. 

Crypto trading strategy in times of uncertainty goals: 

The criteria is: 

  1. We want to have an open position  most of the time
  2. The strategy must close our position higher then where it will open a new position – ergo protecting us from unwanted loss of capital 
  3. The strategy should open fewer trades, rather than actively trading 
  4. The strategy should have a relatively small drawdown 
  5. The strategy should have Sortino ratio above 2 (the higher the better) 

When creating a successful strategy, we should: 

  • Create an OPEN CONDITION that is generic enough, so that we are in open position most of the time, but specific enough so that we do not open a position during unwanted market occurrences 
  • Create a CLOSE CONDITION that is our FLASHING RED LIGHT – a warning of some potential unexpected market situation. 
  • We must be willing to lose a little blood with our close conditions. We want to be successful in locating the flashing red light and avoid trading false signals. 
  • If we are focused on protecting all our BTC, we should fill the VOLUME column with “100% of balance”. This way every single position will transfer all of our bitcoin to safety of stablecoin or fiat and then again open position for everything we have in that stablecoin/fiat. 

The full process of creating a crypto trading strategy in times of uncertainty

You can follow this guide and create a strategy on any platform for backtesting and automation or use it in your manual trading. If using CLEO.one click on “Create new strategy” button in the side menu:

CLEO.one side menu - click "create new strategy"

Step 1: Backtesting parameters 

We are focusing on a version of a HODLing strategy. Therefore we chose to focus on Bitcoin vs. fiat or a stablecoin pair – any BTC/USD, BTC/USDT or BTC/BUSD will do.

We want to focus on higher time-frames to minimize noise, so the bot will trade on Daily chart (D1). Since we want to test if the strategy will perform well during a longer time period, we will test on a longer time-frame than just a few years. 

So we will invest our backtesting efforts on a trading pair and exchange that have been around for some time. Backtesting the strategy on Bitfinex or Coinbase PRO data is the best way to go about it.  

💡 TIP: If you then want to deploy the trading bot on a different exchange, you can! Just create the same strategy on that exchange’s historical data. We are simply using these two exchanges, because their BTC/USD pairs have a long history. 

Step 2. Open Condition 

Objective: 

  • Create an OPEN CONDITION that is generic enough, so that we are in open position most of the time, but specific enough so that we do not open a position during unwanted market occurrences 

CLEO.one offers a wide variety of technical indicators, candlesticks and candlestick patterns, price movements and fundamentals. Everyone should be able to find what they need to successfully implement such an open condition. 

In our strategy, we will create two rules – one based on exponential moving average (EMA) and a second one combining the EMA with a candlestick pattern.  

💡  TIP: You can use up to three rules in every strategy in your CLEO.one Free account, Up to 10 rules for a Starter account and unlimited number of rules for any other Premium account! Check Subscription for more information. 

Rule no. 1: When PRICE is above 3000 and Price is above EMA (20)

Rule no. 1: When BTC PRICE is above 3000 USDand Price is above EMA (20)
Rule 1: When BTC PRICE is above 3000 and Price is above EMA (20)

This rule will open a trade anytime the Price of Bitcoin is above 3000 USD and when the price is above the EMA 20 at the same time. 

IMPORTANT: Notice that the strategy says “Price is above” and not “Price is crossing up” – we are not trying to time the market by finding the exact moment the sentiment (represented here by the EMA20) turns positive. We are simply trying to make sure the price is above the exponential moving average. 

Rule no. 2: When Price is above EMA (20) and Candle is bullish Engulfing

When Price is above EMA (20) and Candle is bullish Engulfing:
Rule 2: When BTC Price is above EMA (20) and Candle is bullish Engulfing:

This rule combines the generic “ positivity” of the market captured by Price being above EMA. Plus it demands that the Daily candle of BTC/USD is Engulfing.  

💡 TIP: Feel free to try any other bullish candle type or candlestick patter. In CLEO.one you can find a total of 9 bullish candlestick types and patterns. 

Bullish engulfing candle:  Candle 1 - dark color. Candle 2 - light color, engulfing candle 1
Bullish engulfing candle:  Candle 1 – dark color. Candle two – light color, engulfing the next candle

Step 3: Close Condition 

Objective: 

  • Create CLOSE CONDITION that is our FLASHING RED LIGHT – a warning of some potential unexpected market situation. 

From the variety of options that CLEO.one offers we prefer to combine information about the total state of the Bitcoin market with some technical indicator. If you haven’t noticed yet, we’re big fans of using at least two concurrent events to support our thesis.

In both of our Rules we are using the same close condition, that uses Bitcoin Market Cap change and Lower Band of 2 standard deviation of rolling VWAP of period 20. 

ℹ️ INFORMATION:  Read more about how VWAP (Volume-weighted average price) works on Investopedia

Close condition: BTC Market Cap is down by 5% and Price is below VWAP (lower band) set in CLEO.one
Close condition: BTC Market Cap is down by 5% and Price is below VWAP (lower band)

If the Market Cap of Bitcoin drops down by 5% in a day, that is a flashing red light for us. Price below 2 st. dev. of VWAP could mean a buying opportunity in ranging markets. Here coupled with drop in Market cap we know something bad is going on and we want to exit the BTC position ASAP.

Open and close conditions for trading BTC in uncertainty
Open and close conditions for trading BTC in uncertainty

Step 4: Asset & Management 

We’re HODLing BTC, so that’s the only asset we want to trade. We are using 100% of available balance to make sure the crypto bot gets out of the whole position. 

Asset management: 100% of balance and an overarching Take Profit

IMPORTANT: Using multiple Rules trading the same asset for 100% of available balance means that whichever Rule happens first, gets executed first. 

This is exactly what we were going for – we want to get back into the market as soon as something positive happens – whichever indication is triggered is not that important. 

Asset management: 100% of balance and an overarching Take Profit in CLEO.one

Asset management: 100% of balance and an overarching Take Profit

We are not using Stop Loss, because we are using a Close Condition instead. Take Profit is almost symbolic – we are HODLing – we are in this for the long run. Therefore an overarching Take Profit of 100,000 USD for 1 BTC seems like a good target to aim for. 

After we set everything up this is what our strategy about to be tested looks like:

The full BTC trading strategy in times of uncertainty in CLEO.one
The full BTC trading strategy in times of uncertainty

Step 5: Strategy Results + iterations 

We’ve tested our strategy on the last 5 years using Coinbase PRO data, starting with 1000 USD. 

 BTC trading strategy in times of uncertainty backtest results
BTC trading strategy in times of uncertainty backtest results

As you can see our strategy made profit of 115% per year, with Total Return of 4,240%. As a comparison – BTC at the start of our strategy (mid-April 2015) was priced at 235 USD. If we simply HODLed our return would be: 2,810%. Our safety strategy therefore managed to beat the naked BTC market. 

In this sense our goal was accomplished. 

Looking closer at the statistics – we have placed 20 trades – we won 11 and lost 9. 

Won/lost trades on the trading BTC in times of uncertainty strategy, statistics by CLEO.one
Won/lost trades on the trading BTC in times of uncertainty strategy

And what is most important for us right now – it would’ve saved us from the carnage that happened just recently: 

Exiting the BTC position on March 9th
Exiting the BTC position on March 9th

The strategy would get us out of the BTC market on 9th of March, saving us from this on March 12th: 

BTC drop on March 12th and 13th
BTC drop on March 12th and 13th. Source: TradingView

Interestingly enough Rule 2 placed only 5 positions, winning all of them.

The performance of the rules compared: Rule 2 won every trade it opened
The performance of the rules compared: Rule 2 won every trade it opened

ℹ️ INFORMATION: These statistics on backtests, paper trading and live trading are available on free and paid accounts in CLEO.one.

Since our rules traded with 100% of balance this simply means, that Rule 1 was able to open position sooner than the second one. This makes sense, since both conditions were based on EMA, but Rule 2 had extra condition of Candle being Engulfing. 

Let’s remove Rule 1 and just keep Rule 2 and see if we can enhance our (already pretty darn decent) results. 

This iteration of the strategy yielded “only” 4020% total return (annualized return of 112%), while placing only 12 trades, winning and losing 6 of them. This version has better Sortino ratio and profit Factor and lower Drawdown. 

Backtest results after removing the 1st trading rule
Backtest results after removing the 1st trading rule

Choosing between the two versions depends on the level of automation we are comfortable with. The trading bot version with two rules had a higher peak. 

If you think you’ll be able to close the position sooner than the strategy, it might be an option for you. Since we’re trading on the daily chart, there is up to 24 hours in which you could’ve already closed the position. Not to mention bad signals of Market Cap dropping 4,9% that you could manually observe. Yet it would not trigger the close conditions of our strategy, We are going to continue with the 1st version of our strategy – keeping two Rules. 

Step 6: Goal accomplishment summary 

Now let’s have a look at our initial goals for this Safety strategy: 

  1. Majority of the time we want to have an open position ✔️

Positions were keeping us in BTC for months at a time, we had funds in USD for total time circa year and a half out of the five years tested. 

2. The strategy must close our position higher then where it will open a new position – ergo protecting us from unwanted loss of capital  〰

No Strategy is perfect and therefore out of the 20 positions we entered only 7 fulfilled this condition. It did save us from massive drops on certain occasions, but this might be the target of our future strategy iterations. 

3. The strategy should open fewer trades, rather than actively trading  ✔️

The strategy opened only 20 positions in 5 years. 

4. The strategy should have a a relatively small drawdown  ✔️

Our strategy generated cca 30% Drawdown. Comparing that to 80% drawdowns BTC was going through during those 5 years, we’d consider 30% DD good. 

5. The strategy should have Sortino ratio above 2 (the higher the better) ✔️

Sortino ratio is similar to better known Sharpe ratio with the crucial difference of not “penalizing” upside volatility – read more about the difference between the two. Our Sortino ratio was over 10, which is really good.

Without further testing on crypto markets we are can’t establish how common is the occurrence of such Sortino ratio on crypto markets / buy and hold strategies. From experience on Forex markets, Sortino ratio of this value would be unheard of. 

Potential drawbacks 

Trading fees 

Currently CLEO.one backtest engine does not take into account exchange fees for entering and exiting position. These fees can significantly influence the strategy’s performance. That’s another point as to why entering only 20 positions during those 5 years is desired. 

Volume 

Significant trading volume could cause additional slippage due to inability to fulfill the order fully at the desired level. It can be fixed by using Limit order instead of placing Market orders. We are trying to exit the market sooner than the rest of the market participants. So we wouldn’t expect any problems with fulfilling even a sizable limit order. 

Overfitting and the hindsight bias 

Since we know exactly what happened, creating a strategy that benefits from it is quite simple. This should be ever-present thought in your head when you look at your backtested strategy results.

The main rational question then should be: Does the strategy beat the benchmark (in our case BTC)? Follow up question should be: does the strategy minimize my risk? In our case answers to both questions is YES. 

Step 7: Deploying the strategy live as a crypto bot 

Before we implement any safety strategy (it could be the one presented here or whichever one you created yourself), we need to move our current holdings into USD (USDT/BUSD/EUR – or whatever fiat/stablecoin you are trading your BTC against). It’s so that our strategy can open a new position (for 100% of balance – meaning transfer all of our USDT to BTC). This is the only way CLEO.one can be monitoring close conditions for you and protect you against the downside. 

  1. Head to CLEO.one and create an account if you have not already
  2. Hit “Create new strategy” on the left as described above and select crypto:

3. Select your backtest settings. In our case we tested on Coinbase Pro data, D1 time frame and tested on 5 years. The most important thing is to set the Market Currency as USD. This is the only thing you will not be able to change latter.

Strategy settings on CLEO.one
STrategy settings for trading BTC in times of uncertanty

4. Insert your open and close rules and add asset management:

5. Choose “Build Strategy” in the upper right and your test will begin:

6. Then if you are happy with the results, choose “Trade” in the upper right corner.

Deploy a crypto bot by clicking trade in CLEO.one
Deploy your crypto bot by clicking trade

7. In order to live trade a strategy you need to have your exchange account connected in the same market currency, in this case USD.

Details on how to connect your Coinbase or other exchange account are available in our Help Center.

8. Select your connected account and hit “Trade”. That’s it, your crypto bot is is trading for you and making sure you are exposed to minimal risk.

You can also watch this explanation on the strategy by DataDash himself taken from his recent live stream.

You can set up, test and paper trade this strategy free on CLEO.one. Copy it, change it and trade it on any of the exchanges we support.

If you are not ready to automate your strategy check out how to create signals from the market by paper trading.

Stay safe and see you on the trading floor!