Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Changed average to 2 day instead of three, 2013 earnings tripled

Wondering why this happened and if it is more sustainable than 3 day or not.

1 response

I think you're borrowing more than you have. In my backtest the algo goes long by 70,276,918 shares in QCOM?

You might be interested in the code from John L to prevent going into overdraft.

(EDIT) Sorry you just need to print "total shares = {0}".format(current_owned)