Using Market Breadth to Gauge Market Health (part 4)

Arroyo Verde in Ventura, CA USA, may 2007. "Two Trees" in the background. Taken from the eastern rim of the canyon.

Welcome to Part 4 of this series. We’re still trying to find a market breadth indicator that gives a better health assessment than using a simple moving average on SPY. For a description of what the heck I’m doing, please go back and read the first post (and the subsequent ones too):

Using Market Breadth to Gauge Market Health (part 1)

Back when momentum and dinosaurs ruled the earth (instead of our mean-reverting robot overlords, all praise be to them), traders would often use the Relative Strength Index (RSI) to gauge the performance of a stock. RSI is calculated by adding up some numbers, and I think there might be some division involved too…oh go look it up, this ain’t no site for baby traders.

Traditionally one would select an RSI with a period of 14. Why? Because “14” is twice as lucky as “7”, that’s why. And then a stock was considered to have great positive momentum when it hit 70, and strong downward momentum when it hit 30. Unless you thought it was over- or undersold, in which case it meant something completely different.

We can also measure overall market breadth by using the RSI values of individual stocks. Count up the number of all the stocks (historical constituents of the Russell 3000 index, in my case) with their RSI(14) values currently above 70, and also all the stocks that have their RSI(14) level below 30. Compute the diffusion so that there’s no confusion:

breadth = total_above_70 / (total_above_70 + total_below_30) * 100

The ” * 100 ” is there just so it feels more like a percentage to me. Completely optional.

RSI(14) is a slow-moving indicator, so this ought to give us a longer-term sense of how the market is feeling than say our previous attempt at using the up/down 4% daily breadth indicator.

We are using the period of 2010-2012 as our in-sample period for optimization, and we are using the buying and selling of SPY as a proxy for market health. As before, the breadth reading must be over its entry threshold for ten days for a trade to be triggered, and must be below the exit threshold for ten days to exit. If the breadth reading is whipsawing around the threshold, then the status quo is maintained.

So let’s go pick some entrance/exit thresholds!

As before, we are first looking for a single threshold that works best as both an exit and entry signal. After that, we look for a lower threshold that might work as a better exit signal. Doing it this way prevents the entrance threshold being lower than the exit threshold, which can result in small swing trades that don’t tell us anything about the state of the market.

type rsi14 3D 2010-2012 single thBefore you get excited about the 5 and 10 levels, know that this simply resulted in no trading, and is equivalent to buy-and-hold. That doesn’t tell us much about the market’s health. We want to be in and out of the market at least a few times over a three year period for the breadth indicator to make any sense. Fortunately the high end of the optimization set looks promising too. It’s a little ‘peaky,’ and the drop off from 75 to 70 is very steep. It’s usually wise to pick something in the middle of a local plateau for more reliable results in out-of-sample (OOS) testing. So I went with a value of 80, which had only a tiny decrease in CAR/MDD.

Now let’s see if there’s a lower exit threshold that gives us better results:

type rsi14 3D 2010-2012 th1 80

Well there’s that 75 value again, but this time there’s a much gentler slope downward. So we’ll make our exit threshold equal to 75. How did our in-sample results look?

type rsi14 80,75 2010-2012

We’re out of the market for a big chunk of the time, like 60%. Basically we take the summers off! We missed the summer ugliness of 2011 and 2012, which is a good thing. There were a total of 6 trades, averaging 51 days in length, and only two of them were winners. The losers were much shorter though, averaging a hold of 31 days rather than 91 days for the winners. CAR/MDD was 0.41.

Now for the actual results: our out-of-sample test period of 2013-2015 (or close enough to the end of 2015 anyway).

type rsi14 80,75 2013-2015We captured most of the run-up in 2013, which is a Very Good Thing. We got in and out too much in 2014, and ended the year at a loss, when it was another up year for buy-and-hold. And 2015…we took most of this year off! Looking at my portfolio, sometimes I wish I’d taken 2015 off as well. So I guess that’s not unreasonable. As for the numbers:

6 trades again, and this time 4 were winners. Average trade length was 61 days. CAR/MDD was 0.58.

And for the big picture, here’s how 2000-2015 would have looked:

type rsi14 80,75 2000-2015I look at this and I think to myself that the bear markets of 2000 and 2008 were very different beasts. Yes they were “bears,” but one was a polar bear and the other was a grizzly bear. 2000-2002 was still very painful using this breadth indicator, but look at 2008! We would have dodged a bullet/bear with this breadth indicator for sure.

Sadly, it still doesn’t beat out lowly moving-average baseline. The MA System beats this one on CAR/MDD for the OOS period, as well as total profit across all three time frames.

Surely there must be a breadth indicator that can help us? Surely not all information is contained solely in the price of the index?

Fortunately, there is. Next post, we finally get to see one that beats the pants off our MA System baseline.


2 thoughts on “Using Market Breadth to Gauge Market Health (part 4)”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.