Education

Basic automated trading strategies for bear markets

, January 17, 2023

Imagine that you have been invited to a party, but you don’t know when it starts or ends. If you arrive too early, you may be bored; too late — you could miss all the fun. Furthermore, there could be hundreds of these invitations, meaning you will be physically unable to join them all. So what is your decision? Try jumping into a few dozen parties to check whether or not the fun is there? 

This scenario is similar to ones regular traders face. They analyze different assets and check what potential they have in the short and long term. This takes a lot of time and effort, and, hence, it may restrict the ability to consider them all. However, traders could be present at all the parties and have fun at several of them simultaneously. This is made possible through the use of application programming interfaces (APIs).

With APIs, traders can monitor market data for numerous assets in real-time, and develop their own trading strategies based on collected information. When integrating API into automated trading systems, traders will be able to follow their trading strategies 24/7 and seize more opportunities.

In this article, we outline several strategies that could be useful during bear markets, and explain how API and automated trading systems may be valuable in implementing them. It’s party time!

Portfolio rebalancing

Not all cryptocurrencies are the same, and thus they perform differently during bear markets. This may require traders to balance risk and returns by forming a diversified portfolio. The idea behind portfolio diversification is to compensate for the possible depreciation of some assets at the expense of others.

However, establishing an appropriate portfolio of assets is a dynamic process. Depending on asset performance, risk/return ratio, and personal goals, the mix can change. As a result, you may want to do a periodic portfolio reassessment, and update the asset allocation ratio. There are several major ways to do it:

  • Strategic and tactical reassessments — Traders periodically rebalance their portfolios to the original allocations when they deviate significantly from initial levels. If investors anticipate significant short-term movement, they can make a tactical deviation from strategic asset allocation, and temporarily rebalance their portfolio in favor of certain assets.
  • Pro-cyclical strategy — This refers to the process where investors buy assets that increase, and sell assets that decline, constantly rebalancing asset allocation. The idea behind this strategy is that following a trend can be beneficial for investors in the long term. However, it also often requires them to include assets in the portfolio with opposite, or at least low correlation. 
  • Counter-cyclical strategy — Purchase more assets that decline in price and sell assets that increase. This essentially means following the investment tenet of “buy low, and sell high.” Such an approach empowers investors to consistently keep their asset allocation within a certain range.
  • Hybrid strategy — Dividing the portfolio into core and tactical parts. For example, the core portfolio (a larger part) may follow a counter-cyclical strategy, while the tactical part may be based on a pro-cyclical strategy.

These strategies typically include investing in different asset classes, not just crypto. Nevertheless, they still could be implemented when building a crypto portfolio to achieve a certain level of diversification. However, it may require users to do additional research to analyze the correlation between assets included.

Following these strategies may also require users to set predefined conditions for reassessment in executing trades. For this reason, they could be automated with relative ease. 

Momentum strategies

During bear markets, crypto prices do not just move downwards. They may experience recovery and consolidation periods (green arrows), with increased or decreased volatility. Momentum strategies use this volatility to capitalize on near-term trends. 

Momentum strategies are dedicated to purchasing assets as their prices go up, and selling them when they are about to decline. The most important part of these approaches is determining a potential change in momentum. To find an appropriate time to enter and exit the market, traders use momentum indicators. The most popular among them are relative strength index (RSI), moving average convergence divergence (MACD), Stochastic, combinations of moving averages (MA) with different lengths, and more.

Momentum trading is best practiced using multiple indicators and data from the exchange the user is using to trade. When building a strategy, traders typically use a set of momentum triggers that may signal a potential change in movement. Here are some of the basic triggers:

  • Simple breakout — The current close is the highest close of the last X bars.
  • Simple MA strategy — The current close crosses above/below the average close of the last X bars.
  • MA crossovers — One MA crosses another MA from top to bottom, or vice versa.
  • RSI strategy — RSI is less than 30 (oversold) or above 70 (overbought).

Instead of finding triggers manually, traders may include indicator specifications in an automated trading system, and execute trades once preferred market conditions appear.

Dollar-cost averaging

“Buy the dip and get another dip as a gift” — this is a quite common situation when investors enter the bear market in an active phase. Instead of catching the bottom, traders may allocate a set amount of funds to invest into assets over a continually set period of time (i.e. weekly, monthly, etc.).

Dollar-cost averaging (DCA) is typically focused on long-term investing and preparing for the next potential bullish market. However, traders may also use the DCA strategy during bull runs, gradually selling assets obtained during the bearish DCA allocation. This may help traders avoid an early exit from the market.

This strategy aims to completely remove the emotional aspect of trading, and decrease the impact of price volatility. Due to its straightforward inputs, DCA is considered one of the most beginner-friendly strategies, and one of the most common candidates for automation. 

Mean reversion

Mean reversion strategies are based on a theory that suggests asset price volatility will revert to the long-term mean, or average historical price level (yellow line). If the asset price is above this calculated average value, traders could be focused on setting up sell orders, and vice versa. Mean reversion is typically used as an add-on to an overall trading strategy that identifies abnormal activity that will, theoretically, revert to a normal pattern.

However, a return to the average historical price level is not guaranteed, and unexpected highs or lows could initiate a shift in the norm for a longer period. As the chart above depicts, Bitcoin is currently trading near its mean line.

Why use automated trading systems

Due to their statistical nature, many strategies based on technical analysis and periodic trades are considered quite suitable for automation. Furthermore, advanced strategies may require collecting and analyzing a plethora of data, which could be difficult to achieve manually. Some other benefits of using automated trading systems include:

  • Discipline — Emotions may lead to hasty decisions and deviation from the established strategy. Automated trading systems can help avoid potential human errors.
  • High order execution  Increased entry speed can help traders get in and out of the market faster, and open access to advanced trading strategies.
  • Precise trigger validation — Automated trading systems can find more potential market entry points, which could be missed during personal analysis.
  • Wider presence on the market — Traders can execute their strategies in numerous markets at the same time.

But there could also be some automation drawbacks that must be considered:

  • Overoptimization — Adding too many inputs could lead to trading strategies that look great on paper, but perform poorly on live markets. This could be resolved by gradually adjusting basic strategies.
  • Monitoring — Trading systems may experience anomaly trades, or do not execute trades, for a certain reason. This could be resolved by using a durable API like CEX.IO API.

In order to enrich the API trading experience for our customers, we partnered with HaasOnline, which offers an ecosystem of automated trading tools. CEX.IO was added to HaasOnline TradeServer Cloud, empowering traders to combine the advantages of both platforms. 

What is HaasOnline TradeServer Cloud?

HaasOnline TradeServer Cloud is an automated trading platform that features cloud management, with top-tier trade automation tools. With HaasOnline, traders can be more focused on their strategies, because installing or applying software updates is maintained on the platform side.

HaasOnline offers a variety of pre-built trading bots with quick setup, integration, and customization features. Furthermore, traders can use the platform to create their own trading bots. The platform developed HaasScript, an advanced crypto trading scripting language that powers all the custom technical indicators and trading bots that run on their platform.

As a result, HaasOnline TradeServer Cloud could be the ultimate solution for deploying bots for automated trading. The platform supports backtesting, allowing users to test bots with historical CEX.IO market data, to see how the strategy could perform during specific market conditions. Another powerful feature is paper trading with simulated CEX.IO accounts. This allows traders to test real-time market data with trading bots, without risking any capital.

Explore crypto trading bots for free with HaasOnline TradeServer Cloud and CEX.IO.

 

 

Conclusion

Automated trading systems offer a huge variety of opportunities, but a lot of inputs are not necessarily required to make a trading bot valuable. Even a bot that performs several straightforward actions could be a big time saver. In turn, curbing emotions and following a trading plan are crucial for success in the long run. 

If you are new to API trading, you may want to start with basic strategies, which require a few triggers, and then adjust them to your preference. And if you decide to go further, you will have all you need. By combining CEX.IO and HaasOnline TradeServer Cloud, you will obtain a comprehensive toolkit to build your own trading strategies, and implement them on a variety of markets.

Disclaimer: Not investment advice. Seek professional advice. Digital assets involve risk. Do your own research.

Related

Education

The Ethereum Block Space War

If the Ethereum network wants to grow, it must solve its scaling issues or relinquish even more control to Layer 2 solutions. Our latest article dives into this conflict.

Aug 12, 2022 | 11 min read
CEX.IO News Education

What are the Orphaned Blocks?

There are plenty of people out there who are upset at the amount of computing power and electricity that is currently going into Bitcoin mining, and these people would likely be even more upset after learning about the intricacies of orphaned blocks. Although the first person to find a

Sep 12, 2014 | 4 min read