MAINT: Improve minute writer handling of non-trading minutes (#1602)

Previously, if input to the BcolzMinuteBarWriter had the first bar on a
non-trading minute, the next trading session would be considered the
"first day" in the input. Now, we consider the previous trading session
the "first day".

The intention is to correctly associate minutes after official trading
hours on half days with session that closed early, not the following
session (a future improvement here would be to not accept minutes
outside trading hours).
This commit is contained in:
Andrew Daniels
2016-11-26 21:12:12 -05:00
committed by GitHub
parent 96f8eeeb5f
commit adc9900860
+1 -1
View File
@@ -754,7 +754,7 @@ class BcolzMinuteBarWriter(object):
tds = self._session_labels
input_first_day = self._calendar.minute_to_session_label(
pd.Timestamp(dts[0]))
pd.Timestamp(dts[0]), direction='previous')
last_date = self.last_date_in_output_for_sid(sid)