Prior to Q2, this code did not time-out:
import time
def initialize(context):
context.stocks = sid(8554)
context.iterations = 4*6*1000000000 # ~ 4.4 minutes
# context.iterations = 5*6*1000000000 # TimeoutException: Call to before_trading_start timed out
def before_trading_start(context,data):
start = time.clock()
for k in xrange(context.iterations):
pass
elapsed = time.clock() - start
print 'Running time: ' + str(elapsed/60) + ' minutes'
Now, when I run it, I get the error:
TimeoutException: Call to before_trading_start timed out
There was a runtime error on line 13.
My understanding is that there were no hardware/platform changes in going to Q2. So why would it run less efficiently?