# Algorithmic Crypto Trading VII: Regime Filter

Source: https://robuxio.com/education/algorithmic-crypto-trading-vii-regime-filter
Markdown: https://robuxio.com/education/algorithmic-crypto-trading-vii-regime-filter.md

Part 7 of 16. Regime filters: how to systematically detect bull, bear, and sideways markets and switch between trend-following and mean-reversion.

---

[![Robuxio - Algorithmic Crypto Trading Solutions](https://robuxio.com/images/logos/logo.svg)](https://robuxio.com/) [Home](https://robuxio.com/)[Crypto](https://robuxio.com/crypto)[Equities](https://robuxio.com/equities)[Whitelabel](https://robuxio.com/whitelabel)[Resources](https://robuxio.com/resources)

[Book a Call](https://robuxio.com/call)

 [← Algorithmic Crypto Trading](https://robuxio.com/education/series)

# Algorithmic Crypto Trading VII: Regime Filter

 Part 7 of 16 • Dries • June 23, 2023

 Earlier in this series, we discussed why trading crypto and adopting a systematic/algorithmic approach can be beneficial. This article focuses on the regime filter.

## Why do you need a regime filter?

 Developing a strategy that works in all market conditions is challenging. In this blog, we will demonstrate how to create a basic regime filter that can help identify bull and bear markets in crypto.

 A regime filter determines the broader market trend. Certain strategies perform better when aligned with this trend. For example, being long on crypto when the broader market is trending up, but staying in cash when the broader market trend is down.

 This concept is not new and has been used for decades in the stock market. For those trading [S&P 500](https://en.wikipedia.org/wiki/S%26P_500) equities, the 200-day moving average (MA200) is the most popular regime filter for the index itself. It's as simple as identifying a bull market when the price is above the MA200 and a bear market when it's below.

 Let's compare the results of the regime filter on the index to a buy and hold approach.

![MA200 on S&P 500](https://robuxio.com/_next/image?url=%2Fimages%2Fblog%2Fseries-07%2Fsp500-200m.png&w=1920&q=75)

![Buy and Hold Approach](https://robuxio.com/_next/image?url=%2Fimages%2Fblog%2Fseries-07%2Fsp500-buy-and-hold.png&w=1920&q=75)

 It's evident that using the regime filter can reduce risk, minimize time spent in the market, and experience lower drawdowns. Although the absolute profit is lower, you won't be tempted to sell your shares during a 50%+ drawdown, unlike with a maximum drawdown of 21% when using the MA200.

## Applying the Regime Filter to Crypto Trading

 In this blog, we will keep the focus on crypto and simplify the concept as much as possible. I will show you how to create a favorable regime for trading crypto.

 To quote one of America's most successful stock traders, [Mark Minervini](https://twitter.com/markminervini): "To trade with ease, you must learn to wait patiently until the wind is at your back. Why not wait for a breezy day to set sail?"

## The Influence of Bitcoin on the Market

 In the crypto world, everyone claims that Bitcoin is king and the market follows its lead. Let's find out if this is really the case and if we can utilize it to determine the broader market trend.

 So, let's conduct a quick test.

 For this test, we will use the spot non-survivorship bias data from Binance (we will explain this concept in detail later in this series).

 We will also employ a simple moving average, which is popular in stock trading, as a regime filter. Let's use the 50-day moving average (MA50) for crypto since a shorter moving average suits the volatile and fast-moving crypto market.

![MA50 on BTC](https://robuxio.com/_next/image?url=%2Fimages%2Fblog%2Fseries-07%2Fma50-btc.png&w=1920&q=75)

 You might think it's too simple to work. However, let's examine the results from November 1, 2017, onwards on BTC only.

![MA50 on BTC](https://robuxio.com/_next/image?url=%2Fimages%2Fblog%2Fseries-07%2Fresults-btc.png&w=1920&q=75)

 We outperform holding BTC by 5 times, indicating that it definitely works in identifying trends in BTC. It's also the most basic form of a [trend following](https://robuxio.com/education/algorithmic-crypto-trading-iv-trend-following) strategy.

 Now, let's return to our experiment to see if BTC influences the market.

 To test this theory, we will buy the top 15 most traded pairs on Binance when BTC closes above its MA50 and sell when BTC closes below its MA50. This should provide a clear indication of whether the wind is in our favor or not.

![Top 15 if BTC > 50ma](https://robuxio.com/_next/image?url=%2Fimages%2Fblog%2Fseries-07%2Ftop15-regime-test.png&w=1920&q=75)

 Look at this! We are in the market 45% of the time and experience approximately 55% drawdown, which is much lower than the buy and hold approach. We can verify if this regime offers favorable trading conditions by reversing the buy and sell conditions.

![Top 15 if BTC

 It's evident that it's not a good time to buy crypto when BTC is below its MA50.

 Theory is confirmed: BTC is king and dictates the market!

 Imagine how much easier you made it yourself when creating a strategy to find good entries to buy or short, when you already gave yourself such favorable regimes!

## Regime filter on a Mean Reversion strategy

 Now, let's test this entire approach on a classic [mean reversion](https://robuxio.com/education/algorithmic-crypto-trading-v-mean-reversion) strategy called RSI2 by Larry Connors.

 The conditions for this strategy are quite simple:

 Buy: RSI(2) < 5 and the regime is bullish.

 Exit: Close price (C) > 5-day moving average (MA5).

 Let's test it on a small portfolio of 5 pairs, prioritizing the entry of pairs based on the highest trading volume on Binance.

 First, let's test it without the regime filter:

![RSI2 no regime filter](https://robuxio.com/_next/image?url=%2Fimages%2Fblog%2Fseries-07%2Frsi2-without-regime.png&w=1920&q=75)

 And now, let's test it with the regime filter:

![RSI with regime filter](https://robuxio.com/_next/image?url=%2Fimages%2Fblog%2Fseries-07%2Frsi2-with-regime.png&w=1920&q=75)

## Conclusion

 You can clearly see how trading with the wind at your back can be incredibly helpful.

 By incorporating a regime filter that aligns with the broader market trend, you can significantly improve your trading outcomes. It allows you to take advantage of favorable conditions and avoid unfavorable ones.

 It's important to note that while we demonstrated a straightforward method to create a regime filter in this blog, there are many other ways to determine a regime.

 In conclusion, the regime filter is a valuable tool in algorithmic crypto trading. It helps identify bull and bear markets, reduces risk, minimizes drawdowns, and improves overall trading performance. Waiting for the wind to be at your back can make all the difference.

 [Algorithmic Crypto Trading](https://robuxio.com/education/series) Part 7 of 16

 [Part 6 · Previous Breakout Trading](https://robuxio.com/education/algorithmic-crypto-trading-vi-breakout-trading)[Part 8 · Next Risk Of Ruin](https://robuxio.com/education/algorithmic-crypto-trading-viii-risk-of-ruin)

 Newsletter

### Keep reading the work

 Get our writing on systematic trading, market structure and live portfolio updates — delivered occasionally, when there's something worth saying.

 Website

 First name Email address Subscribe One-click unsubscribe.

 Disclaimer: All information provided by Robuxio.com is intended solely for the purpose of studying topics related to crypto trading and is in no way intended as a specific investment or trading recommendation. We are not a registered broker or investment advisor. Trading and investing in financial instruments (and cryptocurrencies in particular) is high risk. The decision to trade cryptocurrencies is the responsibility of each individual and only they are fully responsible for their decisions.

 Share this article:

### Algorithmic Crypto Trading

 16-Part Series

 Progress 7 of 16

 [Trading vs. Hodling](https://robuxio.com/education/algorithmic-crypto-trading-i-trading-vs-hodling)[Volatility – Ultimate Reason to Trade Crypto](https://robuxio.com/education/algorithmic-crypto-trading-ii-volatility)[Trading Approaches](https://robuxio.com/education/algorithmic-crypto-trading-iii-trading-approaches)[Trend Following](https://robuxio.com/education/algorithmic-crypto-trading-iv-trend-following)[Mean Reversion](https://robuxio.com/education/algorithmic-crypto-trading-v-mean-reversion)[Breakout Trading](https://robuxio.com/education/algorithmic-crypto-trading-vi-breakout-trading)[7 Regime Filter](https://robuxio.com/education/algorithmic-crypto-trading-vii-regime-filter)[8 Risk Of Ruin Up next →](https://robuxio.com/education/algorithmic-crypto-trading-viii-risk-of-ruin)[9 Martingale vs. Anti-Martingale](https://robuxio.com/education/algorithmic-crypto-trading-ix-martingale-vs-anti-martingale)[10 Trading Biases](https://robuxio.com/education/algorithmic-crypto-trading-x-trading-biases)[11 Position Sizing](https://robuxio.com/education/algorithmic-crypto-trading-xi-position-sizing)[12 Building a Profitable Strategy](https://robuxio.com/education/algorithmic-crypto-trading-xii-building-a-profitable-crypto-trading-strategy)[13 Robustness Testing](https://robuxio.com/education/algorithmic-crypto-trading-xiii-robustness-testing)[14 Portfolio](https://robuxio.com/education/algorithmic-crypto-trading-xiv-portfolio)[15 Drawdowns](https://robuxio.com/education/algorithmic-crypto-trading-xv-drawdowns)[16 The Power of Compounding](https://robuxio.com/education/algorithmic-crypto-trading-xvi-compound)

 [![Robuxio — institutional systematic trading](https://robuxio.com/images/logos/logo-footer.svg)](https://robuxio.com/) Institutional-grade algorithmic exposure across all asset classes and market regimes.

 Solutions

 [Crypto](https://robuxio.com/crypto)[Equities](https://robuxio.com/equities)[White Label](https://robuxio.com/whitelabel)[Capital Management](https://robuxio.com/capital)

 Learn

 [Education Hub](https://robuxio.com/education)[Research](https://robuxio.com/research)[The Book](https://robuxio.com/education/book)[The Course](https://robuxio.com/course)

 Resources

 [Resources](https://robuxio.com/resources)[Benchmarks](https://robuxio.com/benchmarks)[Exchange Setup](https://robuxio.com/setup)[Dashboard](https://app.robuxio.com/)

 Company

 [Team](https://robuxio.com/#team)[Contact](https://robuxio.com/contact-us)[Book a Call](https://robuxio.com/call)[Newsletter](https://robuxio.com/newsletter)

 © 2026 ROBUXIO [Terms](https://robuxio.com/terms-of-service)[Privacy](https://robuxio.com/privacy-policy)[Read as Markdown](https://robuxio.com/education/algorithmic-crypto-trading-vii-regime-filter.md)
