When I was trying to design the algorithm, I got one question: how could I get the dynamic current date(time) of the backtest? Suppose the backtest comes to the date 2017,1,1, how could I get the fundamental data of one stock around that date? And keep getting the date when the date goes by? Is there a global variable tracking the date and time of the backtest?

Thanks a lot!