I have a follow up question.
Applying this logic to daily candles means that a candle labeled "2017-01-04 00:00" will hold the information of this period: 2017-01-03 00:00 => 2017-01-04 00:00.
When running a simple daily algorithm and looking at the information returned for the current and history API functions, I get the following:
data.current_dt : 2017-01-04 16:00:00+00:00
data.current(symbol('AAPL'), ['close']) : 116.02
data.history(symbol('AAPL'), ['close'], 2, '1d') :
2017-01-03 00:00:00+00:00 116.15
2017-01-04 00:00:00+00:00 116.02
So my question is why the current price is equal to the price from the 2017-01-03 00:00:00 => 2017-01-04 00:00:00 period if the current simulation time is the end of the trading day of 2017-01-04.
Thanks