I'm trying to train a model before the market open every day, but it seems in backtest model, the self.History returns a dataframe that includes the bar of the same day. 

As we can see from the below log, we get the same history data for 2013-01-01 data before and after the market open on 2013-01-01, and we get the same 2013-01-01 bar data on 2013-01-02 as well, which means self.History creates a look ahead bias if I trivially call self.Hist(sym, lookback, Resolution.Daily).  the same also applies to later dates

2013-01-01 00:00:00 :	Launching analysis for bb27e1cfdebee60555a4a6332c308f42 with LEAN Engine v2.5.0.0.13431
2013-01-01 01:00:00 :	2013-01-01 01:00:00 log: close high low open symbol time SPX 31 2012-12-29 1402.43 1418.1 1401.58 1418.1!
2013-01-01 01:00:00 :	2013-01-01 01:00:00 log: close high low open symbol time SPX 31 2013-01-01 1426.19 1426.74 1398.11 1402.43!
2013-01-02 01:00:00 :	2013-01-01 10:00:00 log: close high low open symbol time SPX 31 2012-12-29 1402.43 1418.1 1401.58 1418.1!
2013-01-02 01:00:00 :	2013-01-01 10:00:00 log: close high low open symbol time SPX 31 2013-01-01 1426.19 1426.74 1398.11 1402.43!
2013-01-02 01:00:00 :	2013-01-02 01:00:00 log: close high low open symbol time SPX 31 2013-01-01 1426.19 1426.74 1398.11 1402.43!
2013-01-02 01:00:00 :	2013-01-02 01:00:00 log: close high low open symbol time SPX 31 2013-01-02 1426.19 1426.74 1398.11 1402.43!
2013-01-02 10:00:00 :	2013-01-02 10:00:00 log: close high low open symbol time SPX 31 2013-01-01 1426.19 1426.74 1398.11 1402.43!
2013-01-02 10:00:00 :	2013-01-02 10:00:00 log: close high low open symbol time SPX 31 2013-01-02 1426.19 1426.74 1398.11 1402.43!
2013-01-03 01:00:00 :	2013-01-03 01:00:00 log: close high low open symbol time SPX 31 2013-01-02 1426.19 1426.74 1398.11 1402.43!
2013-01-03 01:00:00 :	2013-01-03 01:00:00 log: close high low open symbol time SPX 31 2013-01-03 1462.42 1462.43 1426.19 1426.19!
2013-01-03 10:00:00 :	2013-01-03 10:00:00 log: close high low open symbol time SPX 31 2013-01-02 1426.19 1426.74 1398.11 1402.43!
2013-01-03 10:00:00 :	2013-01-03 10:00:00 log: close high low open symbol time SPX 31 2013-01-03 1462.42 1462.43 1426.19 1426.19!
2013-01-04 01:00:00 :	2013-01-04 01:00:00 log: close high low open symbol time SPX 31 2013-01-03 1462.42 1462.43 1426.19 1426.19!
2013-01-04 01:00:00 :	2013-01-04 01:00:00 log: close high low open symbol time SPX 31 2013-01-04 1459.37 1465.47 1455.53 1462.42!
2013-01-04 10:00:00 :	2013-01-04 10:00:00 log: close high low open symbol time SPX 31 2013-01-03 1462.42 1462.43 1426.19 1426.19!
2013-01-04 10:00:00 :	2013-01-04 10:00:00 log: close high low open symbol time SPX 31 2013-01-04 1459.37 1465.47 1455.53 1462.42!