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

Hi,

The SMA code attached runs extremely slow in the backtest. How can I speed this up?

Also, when I use the variable max_percentage for position sizing, it never purchases anything, however if I use long/short_weights then it will purchase stocks. Why doesn't max_percentage work?

Thanks