I am trying to reproduce the exact result I got running the daily simulation with the minute simulation, so I came-up with
def handle_data(context, data):
...
exchange_time = pd.Timestamp(get_datetime()).tz_convert('US/Eastern')
if not( exchange_time.hour == 9 and exchange_time.minute == 0):
return
#Code to run once a day
But I still get different results, so my question is on daily what time is the code executed at the open of the daily bar or at the close of the prev day?
What time should I use to get the same results?
Say on daily I have rebalance on day 30 of January on minute it should be 31st on open? or 30 on close?