EDIT: After reviewing the docs, it seems before_trading_start
is a once per day function, not a once per bar function.
Please ignore the following question:
===ORIGINAL POST===
My Q1 algo ran in daily mode and collected fundamentals data via
before_trading_start
and then did some trading type stuff in
handle_data
. Since we're now going to use scheduled functions rather
thanhandle_data
for daily trading should it seems like I should
move my code to collect fundamentals data into mydaily_trade
function.However, when I try to implement that I get:
FunctionCalledOutsideOfTradingStart: 0069 'get_fundamentals' only permitted within before_trading_start function
-So, it seems I'm now being forced to collect new fundamentals data every minute even though I only need it once a day.-
No wonder my algo now takes hours upon hours to run. It used to take
less than 5m.
Having said that, I'm at a loss as to why my 5m execution in Q1 went to tens of hours in Q2. I'll go back to reveiwing my code now.