Using Market Breadth To Gauge Market Health (Part 5)

This is part 5 of a multi-part series examining the use of market breadth indicators to judge the state of the market. For an overview of what I’m doing, you’d best start here so you can catch up:

And oh yeah, we finally have an indicator that beats our baseline! Just coincidence that I left this one until the end? Perhaps…

This next market breadth indicator counts all the stocks in the Russell 3000 that are up at least 30% over the last quarter (60 trading days), as well as all the stocks that are down at least 30% for the last 60 days. I’m using historical constituents of the Russell 3000 including delisted stocks to avoid survivorship bias. I am optimizing over the period of 2010-2012 inclusive, and our out-of sample data is 2013-2015 inclusive (well, almost to the end of the year). I also take a look at a wider period of 2000-2015 to see if the system holds up.

We calculate diffusion as before:

dif30qtr = total_up_30 / ( total_up_30 + total_down_30 ) * 100

I’m multiplying by 100 to give it a percent-y feel, but that part isn’t strictly necessary.

Now we need a single threshold for entry and exit as a starting point. And we will require that there be ten days of ‘signal’ (dif30qtr must be above or below the threshold for 10 trading days in a row before action is taken). We buy when we get ten days above the threshold, and sell when we have ten days below. if the indicator thrashes around above and below the threshold without giving 10 days on either side, we maintain the status quo.

Below are the optimization results for 2010-2012.

Thresholds at 10 or below never exited the market, so it was not a threshold that was suitable as a market-health indicator. Fortunately there’s a nice plateau of results in the 65-80 range. The best result was 75, which fortunately is right in the middle of the plateau as well. This means we can have greater confidence that the best value will hold up in out-of-sample testing.

Next we see if there is an exit threshold lower than 75 that increases performance:

Nope! Looks like 75 works best for an exit as well. Now let’s take a look at our equity curve and results for a 75 in/out threshold in our in-sample testing:

Five trades, three of which were winners. Average number of days per trade is 80 days. We are in the market just over half the time. CAR/MDD is 0.50.

And our out-of-sample testing…

On the down side, it kept us out of 2014 for much of the time, even though the year was an up year. However it also kept us out of almost all of 2015, which in my book is a good thing. Total number of trades was 4, of which 3 were winners. The average trade lasted 83 bars, although that’s very skewed since one was a very long one and the others were very short. We were in the market just 44% of the time. CAR/MDD was…wait for it…1.05! Which handily beats our baseline moving-average indicator (which was 0.69 for the OOS period).

Our longer period of 2000-2015 looks like this:

Note how well this indicator missed the 2008 crash.

This “30% up/down over 60 trading days” indicator really shines through, beating not only our baseline but all the other breadth indicators we tried as well. Here’s how it looks in action, using AmiBroker.

The blue line is the breadth reading. Red bars mean the previous ten bars were below threshold, green means the previous ten bars were above threshold, and no color means the breadth indicator was wobbling above and below the threshold line (which is also green).

There sure is a lot of red.

I like how this indicator said “get the heck out!” long before the market fell off a cliff in August. Coulda saved me some money!

Next post will wrap everything up. I’ll compare the breadth indicators side by side, talk briefly about some other breadth types I tested that were complete failures, and hint at some other ways to use breadth indicators.

4 thoughts on “Using Market Breadth To Gauge Market Health (Part 5)”

1. Excellent work! Can you share the Amibroker code for this indicator?

Happy Holidays,
Vance Regan

1. money matt says:

Thanks! I’ll do a new post with the code.

2. Andrew Bannerman says:

Cool work! I just stumbled across this and I am about to do similar metrics of breadth on the S&P500 constituents, I have the historical list of changes to 1970 and intend to build the SP500 lists in order to calculate these metrics like you have above!

My question would be: Where did you obtain the historical Russel constituent list? The russel list of stocks changes throughout history?

Thanks!
Andrew

1. money matt says:

Thanks for your comments Andrew. I use Norgate Premium Data, which maintains lists of historical index constituents.

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