Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
small cap stock screener

Looks for price deltas

4 responses

You never cease to amaze me. Wtf.

Even without the July 14 anomaly (which without looking into it looks like a data problem, probably an unaccounted for reverse split or something, or at the very least an outlier), this has some decent alpha. And it's like 10 lines of code. I'm staring at it and I don't understand why this works.

Correct me if I'm not understanding this correctly. On the first day of the month it invests in all stocks (above $100m mkt cap) that have risen 15% since the week before and simply holds them for the rest of the month.

Why does this work?

Perhaps I got excited too soon... it falls apart during 2014 and 2015, doesn't it?

The original excluding MFCB would have a high Sharpe and 90% returns (vs 500). It jumps from 2 to 9 dollars on 2017-07-14, becoming 3/4 of portfolio value, then unfilled sell orders cause the 1.7 leverage/margin spike. Some attempts here to tame leverage; in one, picking up sell the next day for those that didn't complete by end of day. More effort in buy() would be needed and/or allowing more time for partial fills. Consider selling the day before buying since this is monthly. The @VH observation on a different date range remains valid.

Trade Info output in comments in the code. Notice in the Price Init|Now column, there are a lot of very low prices even with the 100M MarketCap screen.

Quantopian has a bug where they drop the last 2 decimal places for stocks priced under $1, so I'd be wary of any backtest results that involve sub-$1 stocks.