Limit the date range to one day, instead of a year.
On my local machine the following goes from taking 12 seconds to 0.6 seconds.
`$ nosetests -x tests/test_algorithm.py:TestMiscellaneousAPI`
In preparation of adding futures, add equity to the names of both the
classes and methods for writing bcolz data. Futures data will use a
different minutes per day with a separate reader. This change will allow
both equity and futures fixtures to be side by side.
Also, break out the method which generates the dataframes and trading
days member into fixtures (`EquityMinuteBarData` and
`EquityDailyBarData`) on which the `*BarReader` fixture depends. This
fixture is separated out to enable reader/writers in different formats
to use the same data setup. (There is internal code which needs to write
minute and daily bar data in a database format.)
The `DataSource` class and other classes derived from it are no longer
used. Instead `DataPortal` and various `MinuteBarReader` and
`DailyBarReaders` should be used.
Use arrays in more places, and use permutations of indexers instead of
permutations of the values.
MAINT: add testing of boundary conditions
MAINT: use check_arrays to work with both pandas versions
- Refactored EventsLoader and BlazeEventsLoader to not require a
subclass per dataset. Instead, you now pass a map from columns to
event fields directly to the EventsLoader constructor.
- Removed a large number of Quantopian-specific datasets and associated
tests.
- Rewrote the core logic of EventsLoader and BlazeEventsLoader to share
index calculations across multiple requested columns.
- Fixed a bug where event fields were incorrectly forward-filled when
null values were present in an event.
Since the first trading day is now passed directly to the DataPortal on
init, there's no need for a method that does this. Moves all the
additional logic/assignments into the init. Also corrects an issue where
we would never create certain attributes if self._first_trading_day was
None.
Adds the ability to specify the first trading day for a data portal in a
test case when using the WithDataPortal fixture.
Fix behavior in minute mode history with frequency `1d`, where on the
day immediately following an adjustment action, the overnight adjustment
would not apply. (However the adjustment would be applied after a 1 day
lag.)
The root cause of the bug was that the history data for minute mode when
using `1d` stitches together a sliding window of the daily data for
previous and the current minute. That daily data sliding window and
corresponding adjustments was being read as if the data was being viewed
from on the last day of the window; however in this case the data is
being viewed from the day after the window has completed. The difference
in view points requires the adjustments to popped and applied by the
adjusted array one index earlier. The fix uses the `extra_slot` value as
signifier on whether the data is being viewed on the following day and
then accordingly adjusts the index of the mulitpy object.
Also, change the split and merger test data ratios to have different values,
to ensure that different adjustment values are applied; as opposed to
doubling up on just one of the values.