Wouldn’t it be great to have an indicator that will help tell you when you are in a major bull or bear market? Imagine if you had a clear signal to exit the market on January 19, 2008 before the major market crash. Then the same indicator told you when to get back into the market on August 15, 2009. Such an indicator would have also gotten you out of the market during the dot-com crash on November 11, 2000. Well, this indicator I’m going to talk about does just that.
Below you will also find the EasyLanguage code for this indicator. This major trend indicator was inspired by an article entitled, “Combining RSI With RSI” by Peter Konner, and it appeared in the January 2011 issue of Technical Analysis of Stocks and Commodities.
How It Works
We are going to start with a well-known indicator: the Relative Strength Indicator (RSI). The goal is to identify major bull market and bear market regimes. In his article, Peter does this by simply using an RSI indicator on a weekly chart and identifying two unique thresholds. Peter noticed that during bull markets the RSI rarely goes below the value 40. On the other hand, during a bear market the RSI rarely rises above the value of 60. Thus, you can determine the beginning and ending of bull/bear markets when the RSI crosses these thresholds. For example, in the bear market during the financial crisis of 2008 the weekly RSI indicator did not rise above 60 until August of 2009. This signaled the start of a new bull trend. The next bear trend will be signaled when the weekly RSI falls below 40. This is clear in the images just below. With these simple rules you are able to determine bull and bear markets with a surprising amount of accuracy given the S&P futures market.
The two images below show the SPY ETF on a weekly chart. Below the price is a second pane with a 12-period RSI. Why a 12-period RSI? I simply chose that number because it represents a quarter of a year of trading, if you figure four weeks in a month. There was nothing optimized about this number, it just seemed to be a logical starting point. Other lookback values will produce very similar results.
In the image below (click to enlarge) you will see the RSI signal stays above the 40 level during the strong bull market of the 1990’s.
In the image below (click to enlarge) you will see the RSI signal stays below the 60 level during the strong bear market in the financial crisis of 2007-2009.
As you can see the RSI appears to do a fairly decent job of dividing the market into bull and bear regimes. You will also notice the RSI indicator paints red when it goes below 40, and only returns to a light blue when it rises above 60. It is these critical thresholds which highlight a significant turning point in the market that may be occurring.
Testing Lookback Periods
I’m curious to see how well this strategy holds up over various lookback periods. Ideally, a strategy should be robust enough to produce solid results over a range of lookback periods. To test this aspect of the strategy I’m going to use TradeStation’s optimization feature to optimize the lookback period over the values 2-24.
The first chart is the lookback period (x-axis) vs the net profit (y-axis).
The above chart shows rising profit as the lookback period increased from 2 to 10. Then the growth slows down. You can make the case for a stable region between 9 and 24. The midpoint is about 16. Feel free to experiment on your own and pick a different value. The main point here is this: all the values produce positive results and a wide range of values at the upper end of our scale generate very good results. This leads me to believe that this indicator is robust in signaling major market changes.
I decided to test the strategy on the S&P cash index going back to 1960. The following assumptions were made:
- Starting account size of $100,000.
- Dates tested are from 1960 through August 2020.
- The number of shares traded will be based on volatility estimation and risking no more than $5,000 per trade.
- Volatility is estimated with a three times 20-week 40 ATR calculation. This is done to normalize the amount of risk per trade.
- The P&L is not accumulated to the starting equity.
- There are no deductions for commissions and slippage.
- No stops were used.
Applying this to the S&P cash index we get the following overall results.
Notice the short side loses money. I would guess this tells us over the life of the market, there is a strong upside bias. Below is the equity curve.
Using this indicator we come up with the following turning points for major bull and bear markets for the US indices. The blowup of the dot-com bubble happened in 2000 and we got out in October 14, 2000. The indicator then tells us to go long on May 10, 2003. We then ride this all the way up to the financial crisis getting out of the market on January 12, 2008. Then on June 15, 2009 we go long. Overall, not too bad!
But does it still work that well today?
Here is what the strategy looks like when applied to the price chart over the past few years. You will also notice I painted the price bars based upon the RSI signal. Light blue price bars mean we are in a bull market, and red price bars mean we are in a bear market.
The recent price action of 2019 and 2020 have seen sharp selloffs which resulted in this indicator reacting slowly from a Bull-to-Bear transition. Will this trend continue into the future? Are we always going to experience sharp pullbacks? I really don't know.
Keep in mind the short trades are not profitable. In my opinion during these short times you're better off to step aside. That is close long positions and move to cash without attempting to short.
How Can This Indicator Help You?
How can this be used in your trading? Perhaps you can use this as a basis for a long-term swing strategy. Maybe this is an indicator to let you know when to go long or liquidate your long positions within your 401(k) and other retirement accounts. Or perhaps if you are a discretionary trader you can use this to focus on taking trades in the primary direction of the indicator. Maybe when the RSI indicator signals a bull market you may want to view this as another confirmation or green-light to pursue whatever investment strategy you prefer. Anyway, I thought it was an interesting and novel way to look at the RSI indicator.
Of course we only have 85 signals over the past 59 years. This is hardly a representative sample if we are talking about statistics. However, given the robust nature of the lookback period and the rising equity curve since 1960 this indicator may be worth keeping an eye on.
Where Are We Now?
Bull Market Signal Since August 1, 2020
Recent market behavior as we go into the fall of 2020 is signaling Bull Market. The signal triggered on the week of August 1, 2020. The Covid-19 event caused a panic sell during the spring which took us out of the market. The subsequent sharp bounce back of the market was largely missed.