A TypeError exception was raised with message "Cannot join tz-naive with
tz-aware DatetimeIndex". Removing old unnecessary workaround in
`holidays_at_time` function (Pandas already fixed that before 0.18)
fixes this issue.
BLD: Move setuptools_scm recipe earlier
in build process. We order alphabetically.
BLD: Update to newest Cython version
BLD: Update version of matplotlib
BLD: Pin matplotlib dependency
The only downstream contex that was using batch_order_target_percent
already had all necessary prices, so calling batch_order_target_percent
was wasteful.
This allows us to remove the check for whether the provided dt had a
time of midnight, which was a flimsy way to infer if the data frequency
was 'daily'. Besides the explicit check being preferable, this method
was broken on the futures calendar, since midnight is a valid market
minute.
Added as a subclass of MinuteEquityHistoryTestCase, where the primary
calendar is 'us_futures'.
Notes on modifications to MinuteEquityHistoryTestCase:
- To work on generic calendars, many tests now use set minutes for
window start and end, and check the values on active equity minutes.
- test_minute_regular should test against active equity minutes
- Adapts test_minute_midnight to work with futures calendar
- Use a method of getting the last open minute that works with
calendars that are open at midnight
- Test against Sunday at midnight, since the real intention of this
test is to check that given a non-open minute, we fall back to the
last open minute.
Added as a minimal subclass of DailyEquityHistoryTestCase, swapping out
just the primary calendar. This requires significant modifications to
DailyEquityHistoryTestCase, to allow for a generic primary calendar.
Previously, a dataframe passed into BcolzDailyBarWriter.write that was
missing an expected session between its first and last sessions would be
written incorrectly. Upon converting the dataframe to a ctable, the
values for all days following the gap would be shifted backwards, and
nans would be shifted in at the end.
This commit handles the issue by asserting that the number of rows in
the input table matches the number of sessions in the calendar between
the table's first and last sessions.
Also fixes a test that was mistakenly using minutes_in_range where it
should have been using sessions_in_range (uncovered by this change).