Hello friends. I've been a member of the Quantopian gang for about a week now, and the Python crew not much longer than that. I am hoping to post a new algorithm as frequently as I can in the hopes they will all get picked apart by you, who are all much smarter than I am, and that I can get some constructive criticism on what I am doing wrong so I can correct it and learn :) Since I am new not only to this platform, but to Python as well, I am expecting there to be issues with my code; so please don't hold back I am really interested in learning from you guys and getting better!
I've attached my very first attempt at a simple algorithm. Basically it's a long only strategy (I think) that aims to invest in companies with a $2B + market cap, current ratios above 2, P/B within the range of 1 and 2.5, P/E of less than 15. The goal was to be evenly weighted in however many assets made it through the pipeline, and rebalance daily. I also thought I was managing leverage, but it still seems to be above 1 in some months.
I guess my first question is, is there something wrong with my code, or is my "value" idea I tried to use just that terrible? Any recommendations on how I can improve this either code wise or pipeline wise would be very much appreciated. I'm looking to make some alterations and post version 2 next week for anyone that wants to come along on the journey!
Thanks everyone, and I apologize in advance to anyone who looks at the code.