Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
2-Hour Backtest Limit vs handle_data()

I recently ran into the 2-hour backtest limit for the Q Open.

I know a lot of people view intraday volatility as just noise, but I'm finding getting in and out at the right moment whenever that moment happens throughout the day to be a non-insignificant source of alpha. But just a simple algorithm checking moving average crossovers and a trailing stop loss against maybe a universe of 100 stocks in handle_data()/minute mode takes foooorever to backtest, now let alone trying to do anything actually sophisticated. What are people doing to get around this? Is it just a matter of sacrificing ideal entry/exit points by checking for signals fewer times a day, or is there some clever workaround, or what?

I actually don't understand why it is so slow. I realize there are some nested loops, and I realize Python is a very slow language , but really does it have to be this slow? Are there any performance tweaks that work such as turning off unneeded features?