Let’s wrap this up! We established a baseline using a moving-average system on the price of SPY to determine when we enter and exit the market. Then we tested a variety of breadth indicators, using the diffusion calculation and requiring entries and exits to have ten days above or below the threshold before acting.
Our grand prize winner used a breadth indicator that counted all the stocks that were up at least 30% in the last 60 trading days, versus all the ones that were down at least 30% in the same period (based on the Russell 3000 index members). All results below are for the out-of-sample period of 2013-2015, except the last line (2000-2015, which is mostly OOS).
I’ve highlighted the winner of each row above in green.
I tried some other breadth indicators that weren’t worth devoting a whole blog post to, because they were epic failures. For completeness’ sake, I’ll mention them here:
• Bollinger bands. This one surprised me, because I thought for sure it would be useful. The breadth indicator determines the lower and upper Bollinger Bands for each member of the Russell 3000 (with 15 periods and 2 standard deviations). I optimized for the thresholds and got 30 as a good number for each. However in the out-of-sample period, the system never exited a trade. I therefore pronounced it useless. You might find something different though.
• “20-monthly”. This one is similar to our winning system, so I’m surprised it didn’t show better performance. You record all the stocks that are 20% or higher in the last 20 trading days (approximately one month), and the ones that are down 20% or more, and do the diffusion calculation like all the rest. I got a optimized threshold of 20 for entrance and exit, but in the out-of-sample data, it never traded.
• RSI(2). This didn’t trade, much like the “4% Daily” system when using the 10-day signal requirement. It’s such a short-term indicator, it rarely stays below or above a threshold for 10 straight days.
Also, I initially started out this quest by calculating breadth diffusion values and then using a moving average of those values to determine buy and sell signals. The results were ok, but I realized one important fact: a moving average eventually catches up with your indicator if it’s range-bound. If the indicator goes from 0 to 100, and pegs 100 for ten straight days, then your 10-day moving average will also have a value of 100. If your indicator then dips to 99—below your indicator—does that mean bad news and it’s time to sell? Probably not! During the big run up of 2013, these indicators that were compared to their moving averages all stopped trading at the worst possible times (i.e. when the markets took a tiny dip in an otherwise booming run). The simpler static thresholds proved to have better results.
This process gave me some ideas for future examination, and I’ll outline them here:
• There may be added benefit in examining the under- and over-achieving stocks independently. For example, can an increasing number of stocks making new 60-period lows be a better signal for exit, regardless of what the new-high stocks are doing? This is simply a matter of calculating the number of new-low stocks and dividing by the number of stocks in the index. Or conversely, perhaps an exit signal could be derived from the number of new-high stocks falling? This could be checked for all these types of breadth indicators.
• Mean reversion, baby! Some of these systems showed interesting behavior when reversing the signals and viewing them as short-term mean reversion strategies. I discovered them while working on this project. I have not yet compared them to a strict price-based baseline though (short-period MA or RSI(2) on the price of SPY perhaps). If they look like they’ll beat the best baseline I can find, I’ll post about them.