I did some test from 11/21/2016 to 11/23/2016
Question1 : When i backtest with
time_rules.market_open(hours = 0, minutes = 5))
,the log result shows a time from 2016-11-21 22:35 to 2016-11-23 22:35 But when I changed to
time_rules.market_close(hours = 0, minutes = 5))
Why the log result shows a time from 2016-11-22 04:55 to 2016-11-24 04:55 ? why the time had a one day ahead?
Question2: it appears to me when I use
time_rules.market_open(hours = 0, minutes = 5))
, I had to shift the dataframe to avoid a look ahead bias. But in real world trading, when I do a
time_rules.market_close(hours = 0, minutes = 5))
, I thought I don't need to the shift any more,(the line
f.shift(1)
is not needed ) , I think I still have a 5 minutes look ahead bias in this example ? Am i right?