Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Matt's Breadth Indicator

Hello folks,

As a mean to train myself (I'm a novice coder) I decided to code this described strategy - http://throwinggoodmoney.com/matts-breadth-indicator/ credits to the author.

So how does it work? You count up all the stocks that are current members of the Russell 3000 and that are up >30% in the last 60 trading days. You also count the number that are more than 30% down. You do a breadth diffusion calculation like this:

up30 / (up30 + down30 ) * 100

The magic threshold is 75. If the last ten days have a value greater than 75, it’s a ‘green’ day and ok to trade. If the last ten days have a value less than 75, it’s a ‘red’ day and you should exit long-term trades immediately. If the last ten days are neither all above or below the line, then you continue the status quo with no change.

There is just a difference due to the max 500 stocks universe limitation, I couldn't screen the whole Russel3000 and reevaluate each day so I decided to pick 500 stocks in the top 1000 to 1500 US stocks listed by marketcap.

Here is the result "out from the book", but I'm sure some improvement or strategy can be built from this idea.

2 responses

Here another attempt with different parameters and shorting allowed.

70 long threshold (instead of 75)
30 short threshold (instead of none)
12 days over/under (instead of 10)
20% (instead of 30%)

TYVM for sharing!

Do you have an updated version that uses new API calls?