Profiting in Bear Markets with 5 Useful Algorithmic Trading Strategies


blog photo
Eric TangJuly 1, 2022
Trading


You may have heard the term “bear market” being thrown around a lot recently on the news and online. Perhaps you have looked at your favourite stock picks and only see red.

Title card: Profiting in Bear Markets with 5 Useful Algorithmic Trading Strategies

Judging from all the talk of entering a bear market in the news, we at lemon.markets🍋 (a FinTech start-up from Berlin, Germany dedicated to building a trading API for developers) thought it’d be a good time to explain what bear markets are and algorithmic strategies that can be advantageous during a bear market.

What’s a Bear Market? 🐻

By definition, a bear market is when a financial instrument (most commonly indices such as DAX,CAC,STOXX, etc.) has fallen +20% from its peak. On the other hand, a bull market is when prices of stocks are generally rising and expected to continue rising. If you follow business-related news, you may have heard that we are entering a bear market, as many US and European indices have dropped 15–20% compared to record highs in January of this year. With the market trending downwards, what can you do to make sure your portfolio stays green?

Beating the Bear with Algos (🧠 vs. 🐻)

If you have not done so already, algorithmic trading may be the strategy you need to confront the current market. Why? During a bear market, many people may be panic selling, FOMO-ing into bad trades or simply constantly checking their investment accounts out of fear. By using an algorithm you can be sure that your trading decisions are not affected by your mood or state of mind after reading some sensational news headline, seeing red on all your candle charts or simply a bad day at work. Instead, consistent trades can be executed based on statistical concepts and established strategies used by large financial institutions like hedge funds. Let’s dive into some of these strategies!

5 Useful Algorithmic Strategies:

Below we will cover five key strategies you can automate and deploy in a bear market. Many of these strategies have actually been covered here in the lemon.markets Medium blog and on the lemon.markets YouTube channel before!

1. Swing Trades

Image depicting swing trading through labeled swing highs and swing lows.

Buy low, sell high, swing up to make a profit.

Even in bear markets there can be small bullish runs. A swing trading algorithm can help you take advantage of these. This strategy involves taking short term trades that can last from a few days to a few months to profit from an anticipated price move.

Swing trading often involves utilising technical analysis but many swing traders also study the fundamentals of companies to guide their decisions. The logic behind swing trades usually boils down to utilising an established risk/reward ratio or looking for technical indicators in a stock’s price movement, all of which could potentially be handled by a trading algorithm.

If you want to learn more about swing trading, take a look at our previous blog post: 3 more strategies to level up your trading!

2. Mean Reversion

This strategy relies on the assumption that a stock usually converges to some average price (calculated over a long time frame). If the stock price is above this calculated mean, you sell. If it is below, buy. Using this strategy with a trading algorithm may help in deciding what buy-in opportunities could be considered “buying the dip”, the next strategy we will explore.

To see a much more in-depth explanation of the mean reversion strategy and get started yourself, browse through our other blog post and explore some Python starter code on our GitHub!

3. Buying The Dip

American Chopper Argument meme in which a father shouts at his son to buy the dip, but it keeps dipping and the son runs out of money.

This can serve as a reminder to do your own extensive research before buying dips, or really buying anything.

If you have been trading and investing through other bear markets, you have likely heard of this term before. This strategy is all about buying in when a stock price has fallen to grab a good bargain with the expectation that, in the long term, the stock will trend upwards. As many indices and stock prices with long-term upward trends fall during a bear market, it may be worthwhile to set up an algorithm to detect dips, buy and hold until the bull market returns.

An example of this can be observed following the 2020 stock market crash during the COVID-19 pandemic. Growing instability due to economic impacts of the pandemic led many tech stocks to fall significantly during the crash, but the same stocks returned to hit record highs a year later (e.g. Alphabet Inc., parent company of Google, fell over 20% during the crash but is now over twice as valuable). However, not every dip is a buy opportunity, since some stocks may be falling for very good reason, such as mortgage and financial companies after the 2007–08 financial crisis.

4. Dollar-Cost Averaging

This is a great strategy to use for investing long-term and in conjunction with buying the dip. Dollar-cost averaging involves spreading out your buy-ins to mitigate risk. As a stock or index trends downward in a bear market, you could (1) attempt to guess when the absolute minimum price will come, or (2) simply decide to invest increments of your cash into the market over time. As anyone who has attempted to perfectly predict the market has learned, option 1 isn’t really feasible. By choosing option 2 and consistently buying-in, you reduce your average cost. With a trading algorithm set up to do this, you can control when you regularly invest, what to buy and for how long you want to run the strategy.

If this appeals to you, check out this blog post we have made detailing how this strategy works and pull some Python starter code from our GitHub to help get you started!

5. Shorting

Ever heard of the The Big Short? Shorting is the practice of borrowing shares from a broker to sell with the expectation that the price will fall. You can then later buy back the stock at a lower price and pocket the difference. Since many stocks are trending downwards in a bear market, an algorithm for shorting stocks can be a reliable way to turn a profit. Beware, however, that you take on the risk of losses if the stock price goes up instead, as in the case of the GameStop short squeeze in early 2021 where large hedge funds shorting the stock lost billions.

Ready to Begin Algotrading?

While bear markets certainly lack the excitement and ease of bull markets, there are no lack of methods to continue profiting during them. As you’ve likely heard before:

“Be fearful when others are greedy and greedy when others are fearful.”

— Warren Buffet

Furthermore, the list of strategies presented above is by no means exhaustive! If you wish to learn more about algorithmic trading and levelling up your stock market knowledge, take a look around and follow the lemon.markets Medium page. We have much more content about how to get started with our stock market APIs as well as useful Python and R packages to incorporate in your own projects!

I hope you enjoyed this article. The goal was to present many of the automated trading strategies you could build with the lemon.markets API to beat the un-bear-able (sorry 🙂) bear market.

Don’t forget to sign up to lemon.markets to start building your own algorithmic trading project. If you have any questions, make sure to contact us via support@lemon.markets or join our Slack community.

We are looking forward to your projects with lemon.markets :)

🍋 Eric

You might also be interested in

blog photo

4 reasons why YOU should automate your trading strategy

In the current volatile market conditions, everyone is trying to find ways to minimise portfolio loss. In that context, have you ever thought about automating your trading strategy? In this article, we will dive into 4 reasons for doing so. Expect to learn how it can save you time, make your trading more efficient and lead to data-based decisions.

blog photo

Profiting in Bear Markets with 5 Useful Algorithmic Trading Strategies

You may have heard the term “bear market” being thrown around a lot recently on the news and online. Perhaps you have looked at your favourite stock picks and only see red. In this article, we explain what bear markets are and algorithmic strategies that can be advantageous during a bear market.

blog photo

Using Google Assistant & Zapier to automate your buy & sell orders

In this blog post we’ll show you how to use Google Assistant & Zapier and connect the two to the lemon.markets Trading API.

Dive Deeper

Find more resources to get started easily

Check out our documentation to find out more about our API structure, different endpoints and specific use cases.

Engage

Join lemon.markets community

Join our Slack channel to actively participate in our community, ask questions to other users and stay up to date at all times.

Contribute

Interested in building lemon.markets with us?

We are always looking for great additions to our team that help us build a brokerage infrastructure for the 21st century.

Need any help?
Ask a question in our CommunityAsk a question in our CommunityGet started with our DocumentationGet started with our DocumentationGet inspired on our BlogGet inspired on our Blog
© lemon.markets 2022Privacy PolicyImprint
Systems are down

As a tied agent under § 3 Sec. 2 WplG on the account and under the liability of DonauCapital Wertpapier GmbH, Passauer Str. 5, 94161 Ruderting (short: DonauCapital), lemon.markets GmbH offers you the receipt and transmission of orders for clients (§ 2 Sec. 2 Nr. 3 WpIG) of financial instruments according to § 3 Sec. 5 WpIG as well as brokerage of accounts.