Schedule Function in Zipline

Hi,



I used the following code and used latest price and sma data in strategy



schedule_function(strategy,

date_rules.month_end(days_offset=0),

time_rules.market_close(hours=0, minutes=5))



When I print it showed the date correctly but the price and sma data are for the previous day. How to solve this problem.



example:

2019-01-31 15.
Equity(91 [DIVISLAB])     1503.15 
Equity(131 [RELIANCE])    1195.70 

but price of divislab and reliance is for 2019-01-30.
 

Note, this is an event driven backtest platform. This means if you are querying data on 31st with a daily dataset, the data on 31st is not yet available at that point in time, and you get last available data (which is at the latest 30th). This helps you to avoid look-ahead bias in your strategy.



If that does not answer your question, pleas share a complete code that can reproduce your observation.