Hi there,

I am using ScheduledUniverseSelectionModel - and trying to call it just before market open at 9:31 AM EST on weekdays. 

However, when I log self.Time from the callback method, it always shows 19:31:00+00:00 (which is 7:31 PM). 

Also, this universe gets populated for the previous day (not on the trading day).

This is how my initialization looks liks

self.SetUniverseSelection(ScheduledUniverseSelectionModel( self.DateRules.Every([DayOfWeek.Monday, DayOfWeek.Tuesday, DayOfWeek.Wednesday, DayOfWeek.Thursday, DayOfWeek.Friday]), #self.TimeRules.AfterMarketOpen("SPY", 1), self.TimeRules.At(9, 31), self.GetSymbolsFromChartMill )) self.Schedule.On( self.DateRules.EveryDay("SPY"), self.TimeRules.AfterMarketOpen("SPY", 5), Action(self.LongShortStrategy) )

And here are relevant logs to showcase the problem

  • Fetching data from ChartMill : 2017-01-03 19:31:00+00:00
  • Executing LongShortStrategy : 2017-01-04 09:35:00

(notice the 19:31 and difference in dates)

 

What am I doing wrong?

 

Thanks!

 

Author