mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-28 18:27:14 +08:00
3ea8ac8da2
In the batch_transform we were incrementing the trading_days counter if there is a new day event. Thus with a window_length of 1 and daily bars you will update the batch_transform on the first day which is correct. But with minutes you update with the first minute bar of the day which is not correct. This is fixed by calculating the market_close explicity and seeing whether the event.dt is on or past it. I also added a unittest to test the correct behavior of this.