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

Hi,

I have scheduled function using schedule-function

schedule_function(trade, date_rule=date_rules.every_day(),  
    time_rule=time_rules.market_open(), half_days=True)  

In the before_trading_start below logic results in trade function scheduled not to be called as Quantopian data is empty when len(context.my_universe.index) <= 0

Logic below doesn't work
update_universe(context.my_universe.index)

However, for cases when len(context.my_universe.index) <= 0, updating universe with dummy data helps in triggering the scheduled function. Any idea why?
if len(context.my_universe.index) > 0: update_universe(context.my_universe.index) else: update_universe([sid(8554)])