Last Updated on June 19, 2022 by Quantified Trading
Today we are presenting three free mean reversion strategies. They were partially published on this website a few years back, and today we make some small adjustments and present their performance on different ETFs. Furthermore, we discuss why mean reversion works and which markets are best for mean reversion trading strategies and also some historical backtesting.
We start with defining what mean reversion is:
What is mean reversion trading?
Mean reversion means the same in trading as in statistics: over time the price of the asset gravitates over and under a moving average. Abnormal rises tend to revert down and vice versa.
A good example of mean reversion can be found in this chart:
The price of SPY moves in waves as it creeps upwards. It never goes too long in either direction before it “reverts”.
Even during the bear market of 2008/09, the market has sharp reversals, even though the trend is down:
Perhaps quite remarkably, most mean reversion strategies perform the best during a bear market, see more about that below.
Mean reversion trading strategies
There are many trading strategies that can be labeled mean reversion. The most popular are these:
- Overbought and oversold indicators (RSI, MACD, Stochastics, Bollinger Bands, etc.)
You can find examples of all these kinds of strategies on our landing page which contains all our free trading strategies.
The opposite of mean reversion is trend-following:
Mean reversion vs. trend following
Mean reversion is the opposite of trend following: Mean reversion normally has a high win ratio with many small winners and occasionally a big loser. Trend following shows the opposite statistics: many losers and more reliant on the rare big winners and outliers.
This means the trade distribution is different. Mean reversion more left tail losers, while trend following has more right tail winners:
We have previously written about both types of trading strategies:
Why Does mean reversion work? Which markets are most mean revertive?
Mean reversion strategies work best in stocks and are less helpful in other markets, commodities for example.
Why is that?
Mean reversion in the stock market didn’t work so well prior to the 1990s. We believe one of the reasons is the rise in futures trading which leads to arbitrage between stocks and the futures contract.
Another reason for mean reversion is the constant battle between buyers and sellers. When a stock goes up in value, many are tempted to sell to realize some gains while others might want to short. This creates selling pressure.
Opposite, when a stock falls in value, at some point, there are more buyers than sellers and the price decline stops and reverses. Additionally, those who are short might want to lock in profits and thus buy back their shares. The latter might be the reason for many of the very powerful bear market rallies.
We provided some interesting data of the bear market of 2000/02 in a previous article:
Mean reversion work best in a bear market
Contrary to what many believe, our experience is that mean reversion in the stock market works best during a bear market. It might sound counterintuitive but the reason is increased volatility. And perhaps even more counterintuitive is that long works better than short!
Back in 2008/09, we were day trading and we made the most money on the long side even though the market fell over 50%.
The velocity of a bear market creates opportunities. The bleak future gets discounted fast, while opposite, a bull market rises slowly over time. The stock market spends significantly more time above the 200-day moving average than below.
Perhaps more importantly, bear-market rallies are very explosive. We have published some data from the GFC in other articles, but we repeat them:
From May 2008 until early March 2009 the S&P 500 lost about 50% of its value. Still, look at these numbers:
There were 99 up days and 104 down days during that period.
The average up day was 1.79%. The average down day was minus 2.32%.
From May 2008 to early March 2009, it was 51 days with a rise >1%, 30 days with a rise >2%, 76 days with losses >1%, and 45 days with losses >2%.
The market fell, but still we had many explosive days on the upside. This makes shorting difficult, but it also makes buying weakness and selling strength very profitable. Most of our monthly Trading Edges make the most money in bear markets!
Short-term trading needs prey and this comes in the form of volatility. The graph below shows the 25-day moving average of the absolute values in the daily changes from close to close:
3 free mean reversion strategies
Let’s present our free mean reversion strategies. As mentioned at the beginning of the article, all these strategies have been published earlier, but today we make some small changes to them.
Mean reversion strategy number 1: Deviation from a recent high in XLP
This strategy is in the ETF with the ticker code XLP (consumer staples). The strategy was published in 2013 and in plain English, it is like this:
- Calculate an average of the H-L over the last 25 days.
- Calculate the (C-L)/(H-L) ratio every day (IBS).
- Calculate a band 2.25 times lower than the high over the last 25 days by using the average from point number 1.
- If XLP closes under the band in number 3, and point 2 (IBS) has a lower value than 0.6, then go long at the close.
- Exit when the close is higher than yesterday’s high.
100 000 invested at inception and compounded until the summer of 2021 has produced decent returns:
- No. of trades: 453
- Average gain per trade: 0.37%
- CAGR: 7.7% (buy and hold 7.7%)
- Time spent in the market: 32%
- Max drawdown: 20%
- Profit factor: 1.8
Mean reversion strategy number 2: An IBS short strategy in FXI
FXI is the ticker code for the Chinese ETF. It has shown strong mean reversion tendencies over the last decade and the below strategy has worked pretty well:
- If today’s IBS (C-L)/(H-L) is higher than 0.9 then short at the close.
- Exit at the close when the IBS is 0.25 or lower.
100 000 shorted in 2010 and reinvested until the spring of 2021 has produced this equity curve:
- No. of trades: 224
- Average gain per trade: 0.63%
- CAGR: 12.4% (buy and hold 3.3%)
- Time spent in the market: 34%
- Max drawdown: 12%
- Profit factor: 1.75
Mean reversion strategy number 3: 5-day low in the S&P 500
Strategy number three is a strategy that is made for the S&P 500.
This strategy was published in 2012 and in plain English can be described like this:
- If today’s close is below yesterday’s five-day low, go long at the close.
- Sell at the close when the two-day RSI closes above 50.
- We have a time stop of five days if the sell criterium is not triggered.
It can hardly get any simpler than this!
How has this strategy performed? 100 000 compounded from 1993 until July 2021 has produced this equity curve (the graph on the bottom is the drawdown):
- No. of trades: 448
- Average gain per trade: 0.52%
- CAGR: 8% (buy and hold 10.4%)
- Time spent in the market: 16%
- Max drawdown: 20%
- Profit factor: 1.8
The strategy also works on the futures contract (of course), but beware of the drawdown and leverage.
If you want the Amibroker or Tradestation (Easy Language) code for the 3 mean reversion strategies, plus all the other testable strategies among our free trading strategies, you can order it at the link below:
Alternatively, you can learn basic coding in our Amibroker course.
If you like this article please follow us on one or all of our platforms:
- By registering your e-mail in the upper right corner of this webpage (for our newsletter)
- Follow our Twitter account
- We also recently started a Substack service.
3 free mean reversion trading strategies
As you you have learned in this article, trading doesn’t need to be complicated to get good results. These three free mean reverting trading strategies we presented in this article will give you a head start.