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

I've found a couple of posts from people trying to implement CAN SLIM and I'd love to take a pass at it too. I'm struggling a bit with "Current quarterly earnings" and "Annual earnings growth".

Is "Current quarterly earnings per share": morningstar.income_statement.net_income_from_continuing_and_discontinued_operation / morningstar.valuation.shares_outstanding?
And "Annual earnings growth" based on just morningstar.income_statement.net_income_from_continuing_and_discontinued_operation?

What's the best way to use a custom factor to calculate this quarter over quarter? I'm assuming the data comes from quarterly reports which arrives at different times.

9 responses

I've been trying to do it uhh with very bad implementation. I used the custom factors at the top . However, I have changed the code beyond recognition so there is no point attaching it. If you want to try to salvage the code, I have attached:
It is the top bit that will interest you more, but I was working on implementing a different fundamental strategy that I had found some success with and combining it by using a filter for canslim stocks. The returns were less than impressive, and I eventually gave up despite promising results when I initially looked over it by hand.

Thanks John. I ended up getting a bunch of the missing data via iexcloud and uploading it. It cost about $20. Quantopian has the data I was looking for nicely structured but it's a paid service. With my implementation the limitation is that I can create a list of stocks for the present, but it doesn't work looking back for use with backtesting.

@ Radu

I’m tried the can slim method for 2 years discretionary but struggled, even with paying the IBD service.
Than I built a screener getting the same results as MarketSmith.
Than I used that screener and ran a backtest - it did not work.
I believe the can slim method works, but the magic is the breakout, the money management and market timing.
You buy the breakout with a betting average of around 50%. Than you gain around 10-15% with the winners and lose around 8% with the loosers.
That’s it, just do the coin flip as often as possible,
....and fundamentals are not the big driver, I believe. You might read mark minervini.
If you follow the guy on Twitter, you will notice that he only invest in times the market goes sure up.
In sideway markets you loose because of the necessity of the 8% stop loss.
I would be really interested to program that, the only issue how to do the breakout!
One needs price and volume action

@ and I struggled, because I tried to hold the stocks for longer times, 6 month plus. But for that you need to accept higher stop losses or a very low volatility. But than it’s not can slim anymore

@Carsten

I was able to build the algorithm and backtest it. Indeed, I tried a bit of Minervi + CAN SLIM and the results were very poor.

I wanted something long term (> 1 year) and the results were not that good.

@ Radu

I believe a simple momentum and breakout strategy with a proper money management a la Minervini with a market timing component should be quite profitable. The tricky part is the proper cup and handle breakout.

Seems like this is what you are looking for: https://www.quantopian.com/posts/an-empirical-algorithmic-evaluation-of-technical-analysis.

If you code it do you mind sharing it here?

Thanks, I’m going to check that....
What do you think about a pattern recognition system with machine learning. You teach the system the pattern of successful breakouts? I gues Someone had that idea already....

If the code works why use ML?