Capture The Big Moves!

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).

Lookback Period vs Net Profit

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.

Testing Environment

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.

Results

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.


About the Author Jeff Swanson

Jeff is the founder of EasyLanguage Mastery - a website and mission to empowering the EasyLanguage trader with the proper knowledge and tools to become a profitable trader. Join our EasyLanguage FaceBook group to interact with other EasyLanguage traders! Click the FaceBook icon to join.

follow me on:
  • Red says:

    Nice Job, you have a typo..

    “In the image below you will see the RSI signal stays above the 60 level during the strong bear market of the financial crisis of 2007-2009”

    The word “above” should be “below” ??

    Thanks,

    Red

    • Jeff Swanson says:

      Red Thanks! Just fixed it.

      • shabber merchant says:

        HELLO JEFF
        CAN YOU PLEASE MAKE A SAME FILE IN ESIGNAL FORMAT,
        THANKS

        • Jeff Swanson says:

          I wish I could, but I’m not familiar with that platform. Maybe somebody else can do it and I can post the solution. Anyone?

  • Axel says:

    Interesting article ! I tested this indicator on my weekly spy-chart. and i just wanted to mention that the signals look exactly like those generated by the TSI (true strength index, Close, 25,13). i.e. the weekly TSI also seems to be a great tool for discrimination between bear and bull markets, but obviously not as a stand-alone trading tool since it is a lagging indicator. i think it might work well with daily rsi(2)-signals in a pullback or mean-reversion system.

    greetings from germany !

  • Aui says:

    Why do you use rsi(2-24) if i trade intraday and use rsi(30) it work? Thx you

    • Jeff Swanson says:

      Picking 24 was largely arbitrary. I’ve never tested it on an intraday basis, so it would be worth testing. However, I have a feeling it will not be nearly as effective.

      • Alex Argyros says:

        Thanks, Jeff. Very interesting concept.

        I was wondering if you have any maximum drawdown data (assuming $100,000 per trade?

  • Alex Argyros says:

    Thank you, Jeff. A follow-up question, if you don’t mind. Is there a way to estimate either the CAGR or the annualized return of this strategy?

    Again, many thanks for all your great ideas.

    Alex

  • Alex Argyros says:

    I guess that I meant a more apples to apples figure (i.e., compared to other strategies), that is, based on the assumption that 100% of one’s capital were invested using its signals.

  • Prashanth says:

    A variant of this strategy(system) called RSI rollercoaster, can also be profitable.. What are your views on that system?

    • Mark says:

      Did you see this question, Jeff?

      • Jeff Swanson says:

        I’m not overly familiar with RSI roller-coaster but briefly looking at it there are some similarities but they are completely different in scope and intent. The Weekly RSI is not a trading strategy exactly. It’s a longer term Bullish/Bearish trend indicator. It looks like the roller-coaster is more of a mean reverting trading system with stops and profit targets. Weekly RSI does not have stops or targets. Weekly RSI is more of an indicator, not a trading system. Of course you could turn it into a long-term trading system, if you wish. In the end, Weekly RSI displays major market moves which can last years. It’s a trend indicator which could be used as the basis for a long term trend following strategy. RSI Roller-coaster highlights medium term counter trend movies which might last weeks. It’s a counter trend strategy. So, there are significant differences between them.

  • Salvo says:

    Thanks Jeff, just came across this website and loving it. Is it possible to run the backtest being 100% fully invested during Bull Mode and in 100% during Bear mode. Would love to see returns compared to S&P. This may be a great system for 401k.
    Thanks again.

  • Salvo says:

    Ok,

    I’ve been messing around with this formula and also using the RSI(2) on the daily. What I have determined and found is there is a flaw in backtesting using a a “fixed” number of contracts. The good news, the end result should be much better. I tested using 1000 shares buy and hold on MSFT going back to 1984. I made $57,000. Seemed wrong for a stock that went up so much. What I found, since the starting price was $0.1, I only started with $100 worth of shares for $100,000 account.

  • eric says:

    How often do you update this indicator ? Can you put a “last updated” date on the page by the indicators ? thanks.

    • Jeff Swanson says:

      Thanks for the idea. I update the article’s last paragraph (“Where Are We Now?”) whenever the signal changes. As it stands today, the last update was July of 2016.

  • Andy Shaffer says:

    This is a very interesting idea. And I really appreciate Jeff and what he does on his site! His research and development methodology is excellent!

    However, if you use $INDU with this strategy going back 119 years, you’ll see there are very long periods of time that this is not useful AT ALL. The 1966 to 1982 period is particularly awful! The fundamental flaw in so many strategies is the age old, and incredibly outmoded, “lookback” period.

    All my work is based on some new fundamentals:

    * No Tradestation function calls. They are cost is prohibitive.
    * It’s about THE LEVELS. There is no idea more important than this. Buy near support in uptrends and cycles. Sell near resistance in downtrends and cycles. Unless you use the “traditional” tools to discern support and resistance accurately, your strategies are destined to fail under different circumstances. A strategy that eventually fails or goes flat as the circumstances change is a flawed strategy (i.e. 1966 to 1982 in the above example). You may not have lost much money during that period, but would you be able to SIT through it the whole time? Of course not.
    * Minimal, if any, “lookback” periods. I use cumulative and “break” processing. Moving average “lengths” are accumulated, and reset at appropriate times. As price “breaks”, levels are trailed up or down with a possible reset of the MAs (and I use VERY few MAs, as they are LAGGARDS! – IT’S ABOUT THE LEVELS!!!! ).

    System Trading is like magic. The old hands will only show you enough to get you started, and it’s all OLD. You’ve GOT to break new ground, because they aren’t going to show you stuff the works CURRENTLY! Why would they share that? It’s proprietary! And you better believe they are willing to SELL it to you! 🙂

    Andy Shaffer

    • Jeff Swanson says:

      Thanks for the great comments, Andy. A couple of points. While the strategy may not work well from 1966 to 1982, that is not much concern for me since I can only trade today. So I’m much more concerned about “lately”. While it’s true the longer the history, the more confidence I have, today is what matters. Next, I would not call the strategy presented a trading model. It’s more of an indicator to help gauge the overall market direction. Anyway, thanks again for the comments about your trading style and levels.

  • Ryan watson says:

    How about testing on a broad range of country ETF’s? Good robustness check.

    • Jeff Swanson says:

      That’s a good idea. I’ll put that down as an idea for a future idea for another article. Until then remember, the code is available to download and test as you please. 🙂

  • Sal Mig says:

    Thank you for sharing this idea. I had been tinkering around with this weekly RSI strategy to use it when to go long with the daily RS(2) strategy. I realized it works pretty well when to be long the market and when to stay out of trying to get into long positions.

    I was curious though if your back-testing software allows you to optimize the buy/sell threshold levels of 40 and 60?
    Thank you again!

  • >