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

I had posted earlier today about using an Excel spreadsheet to execute my screened stocks using Quantopian. The screener parameters follow below. Is this feasible to implement with Pipeline? I've been trying to get it to work, but am not familiar enough with Python or using the correct syntax to get it 'just right'

MktCapM is >= US$ 300 million (basis year 2000) adjusted yearly
Rank all stocks according to Price 1-Day ago / TTM Free Cash Flow Per Share (lower is better)
Rank all stocks according to ( TTM Cash from Operations – TTM Net Income) / latest Filing Market Cap (higher is better)
Rank all stocks according to TTM Cash from Financing Activities / latest Filing Market Cap (lower is better)
Rank all stocks according to Latest FY Return on Invested Capital (higher is better)
Rank all stocks according to 26 week Excess Total return (higher is better)
Take the 200 stocks with the smallest sum of these ranks added up.

3 responses

Attached below is a backtest that sort of follows the general theory of the screener, however, this does not accurately reflect my trades or performance on the live market.

After thinking about it for a while, is it possible to give the stocks a score using something along the lines of "context.score", tally that up, and then take the top stocks out of that using the pipeline parameters?

Maybe take a look at this post for a simple way to combine ranks and get a 'context.score' as you noted https://www.quantopian.com/posts/how-to-combine-factors-in-alphalens .

Also, Trailing Twelve Month (TTM) fundamental data isn't directly available in the Morningstar dataset. The Morningstar data returns whatever was reported on the latest quarterly filing. This may or may not impact your algorithm.