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

G

1 response

Leverage is a hell of a drug.

Pretty much always make sure you're tracking it, with

record('Leverage', context.account.leverage)

As for the problem, looks like you're doing a ton of shorting. -shares means either you sell what you own, or you are willing to short. If you're not meaning to short, then maybe order_target instead. It just looks like you keep compounding that short over and over. You should have some sort of limit on that. Your buys would likely be the same story, you just are selling at the moment only.