48 Commits

Author SHA1 Message Date
Conner Fromknecht 99efa7a9f3 Fixed catalyst tests except example tests 2017-06-19 14:43:10 -07:00
Maya Tydykov 6e4060fc4f BUG: sort data on asof_date to resolve ts conflicts
MAINT: fix arg default and update docstring
2017-03-15 14:10:58 -04:00
Maya Tydykov b1cae1b76a Merge pull request #1661 from quantopian/optionally-apply-deltas-adjustments
Optionally apply deltas adjustments
2017-01-31 15:40:43 -05:00
Maya Tydykov 5a9e91b567 TST: add arg to test assertion 2017-01-31 15:19:05 -05:00
Maya Tydykov 185e7a13f8 ENH: add Int64Overwrite and dispatching for it
BUG: column value should be float

DOC: update docs
2017-01-31 09:43:37 -05:00
Joe Jevnik d52d6eddff BUG: fix blaze pipeline queries for asof_date 2016-12-01 14:35:59 -05:00
Scott Sanderson 7e2230a763 STY: Fix flake8 failures. 2016-09-20 17:12:07 -04:00
Scott Sanderson 53eb1964d9 MAINT: Temporarily ignore pandas warnings in categoricals.
Pandas 0.18 doesn't like having null-ish values in categoricals.  Fixing
this properly requires re-thinking the semantics for missing_value on
pipeline terms, so we're punting on that until after we've upgraded to
0.18.
2016-09-20 17:12:07 -04:00
Scott Sanderson 40ef039e46 TEST/MAINT: Silence no_checkpoints warning. 2016-09-20 17:12:07 -04:00
dmichalowicz d8e9fa91bd Loader return column vector for no sids case 2016-07-01 12:18:32 -04:00
Joe Jevnik cb266b983a TST: more test for checkpoints 2016-06-21 13:20:52 -04:00
Joe Jevnik caebdf7cfc MAINT: shuffle the complex expression checks 2016-06-20 13:35:07 -04:00
Joe Jevnik cb67ee425e TST: coverage 2016-06-17 17:59:56 -04:00
Joe Jevnik c8cf5a6761 ENH: add ffill checkpointing to blaze core loader 2016-06-17 17:59:56 -04:00
Maya Tydykov e5039a43b0 TST: add tests to ensure no forward filling of non-missing values
STY: fix indentation

DOC: add docs to clarify test input/output
2016-05-23 16:48:52 -04:00
Maya Tydykov c0eb798cc6 TST: modify test class to use WithAssetFinder fixture.
BUG: assign result to var

TST: remove obsolete assertion

STY: fix line length
2016-05-23 15:53:55 -04:00
Maya Tydykov c94f3d0c9b BUG: fix replacement of NaN with None
TST: finish test with expected data

STY: alphabetize imports

MAINT: simplify condition - remove unnecessary statement
2016-05-23 15:53:55 -04:00
Maya Tydykov 8e630bff77 TST: remove obsolete test and update test 2016-05-23 15:53:55 -04:00
Joe Jevnik bc0b117dc9 MAINT: make the data loading apis more consistent.
Changes BcolzDailyBarWriter to not be an abc, data is passed as an
iterator of (sid, dataframe) pairs to the write method.

Changes the AssetsDBWriter to be a single class which accepts an engine
at construction time and has a `write` method for writing dataframes for
the various tables. We no longer support writing the various other data
types, callers should coerce their data into a dataframe themselves. See
zipline.assets.synthetic for some helpers to do this.

Adds many new fixtures and updates some existing fixtures to use the new
ones:

WithDefaultDateBounds
  A fixture that provides the suite a START_DATE and END_DATE. This is
  meant to make it easy for other fixtures to synchronize their date
  ranges without depending on eachother in strange ways. For example,
  WithBcolzMinuteBarReader and WithBcolzDailyBarReader by default should
  both have data for the same dates, so they may use depend on
  WithDefaultDates without forcing a dependency between them.

WithTmpDir, WithInstanceTmpDir
  Provides the suite or individual test case a temporary directory.

WithBcolzDailyBarReader
  Provides the suite a BcolzDailyBarReader which reads from bcolz data
  written to a temporary directory. The data will be read from
  dataframes and then converted to bcolz files with
  BcolzDailyBarWriter.write

WithBcolzDailyBarReaderFromCSVs
  Provides the suite a BcolzDailyBarReader which reads from bcolz data
  written to a temporary directory. The data will be read from a
  collection of CSV files and then converted into the bcolz data through
  BcolzDailyBarWriter.write_csvs

WithBcolzMinuteBarReader
  Provides the suite a BcolzMinuteBarReader which reads from bcolz data
  written to a temporary directory. The data will be read from
  dataframes and then converted to bcolz files with
  BcolzMinuteBarWriter.write

WithAdjustmentReader
  Provides the suite a SQLiteAdjustmentReader which reads from an in
  memory sqlite database. The data will be read from dataframes and then
  converted into sqlite with SQLiteAdjustmentWriter.write

WithDataPortal
  Provides each test case a DataPortal object with data from temporary
  resources.
2016-04-15 23:46:10 -04:00
Joe Jevnik 792860b4cb MAINT: rename bz.Data -> bz.data 2016-03-15 14:29:48 -04:00
Joe Jevnik 721dd36116 TST: move test_utils and adds test fixture classes
Renames zipline.utils.test_utils to zipline.testing

Adds zipline.testing.fixtures.ZiplineTestCase to manage setup and
teardown and adds mixins to define fixtures like an asset finder or
trading calendar.
2016-03-10 15:39:52 -05:00
Maya Tydykov c87293942f TST: remove logging test and move missing sid test.
DOC: add docstring.

TST: reduce test data redundancy.

MAINT: use string constant.
2016-03-08 17:24:04 -05:00
Maya Tydykov 6976f7e459 # This is a combination of 8 commits.
# The first commit's message is:
BUG: ignore sids in deltas missing from asset index.

# This is the 2nd commit message:

MAINT: use correct debugger.

# This is the 3rd commit message:

MAINT: fix set add.

# This is the 4th commit message:

WIP: move sid filtering.

# This is the 5th commit message:

WIP: move filtering logic.

# This is the 6th commit message:

WIP: working test.

# This is the 7th commit message:

TST: clean up test.

# This is the 8th commit message:

STY: fix flake8.
2016-03-08 17:24:04 -05:00
Joe Jevnik 2036f3d389 ENH: condense the blaze query 2016-02-17 20:22:31 -05:00
Scott Sanderson c105735574 DEV: Add support for specifying missing_value.
Consequently, enable support for `int`-dtyped Factors and BoundColumns.
2016-02-12 21:23:47 -05:00
Joe Jevnik c11524fda1 MAINT: pandas 0.17 compat for blaze core loader 2016-02-11 18:46:43 -05:00
Joe Jevnik b102742f69 BUG: fix deltas in blaze core loader 2016-01-28 14:08:11 -05:00
Joe Jevnik 9adef37373 BUG: Fix the case where multiple values happen on the same day 2016-01-21 12:43:02 -05:00
llllllllll 5e4b8b8f8f TST: tests for new forward fill 2016-01-21 12:43:02 -05:00
llllllllll 517ad7a5f1 TST: Adds tests for running multiple columns in one query 2016-01-21 12:43:02 -05:00
llllllllll 97298d1ad4 ENH: upgrade ffill logic to look back as far as needed 2016-01-21 12:43:02 -05:00
Joe Jevnik 2caa9277c4 ENH: Make the data_query_time arguments optional 2016-01-13 15:26:37 -05:00
Joe Jevnik 5a235bdaef ENH: allows users to specify the cutoff time for data query in blaze
loaders

This allows people to set their cutoff time to the time they will
actually execute 'before_trading_start'. Currently this is just passed
to the constructor of the loader; however, I would like to make this
managed by the algorithm simulation runner. This would help keep all of
the loaders in sync and lock 'before_trading_start's execution to the
time the data is queried for.
2016-01-13 15:26:13 -05:00
llllllllll 32baac4e4b ENH: Make datasets have subclass relationships 2015-12-22 12:25:30 -05:00
Scott Sanderson 8220d1ee86 ENH: Adds support for different typed adjusted arrays and adds an
EarningsCalendar loader.

- Moves most of AdjustedArray back into Python. The window iterator is
  the only part that's performance-intensive.

- Adds a bootleg templating system for creating specialized versions of
  AdjustedArrayWindow for each concrete type we care about.

- Adds support for differently dtyped terms in pipeline. This allows us
  to use datetime64s which are needed in the EarningsCalendar.

- Adds EarningsCalendar dataset for the next and previous earnings
  announcements in pipeline.

- Adds in memory loader for EarningsCalendar.

- Adds blaze loader for EarningsCalendar.
2015-12-08 20:24:06 -05:00
Scott Sanderson 3619a24e4d TEST: Add support for futures to tmp_asset_finder. 2015-11-13 18:26:54 -05:00
Scott Sanderson 4109640acb MAINT: make_simple_asset_info -> make_simple_equity_info. 2015-11-13 18:26:54 -05:00
llllllllll 80cc2bd6f6 BUG: Corrects an index error in blaze loader.
Fixes the case where a delta has an asof_date of the last requested
day and an index error would occur. This guards against this
specifically to make the delta be effective through the end of the
requested window.

Adds a test case for this behavior.
2015-11-05 16:40:28 -05:00
llllllllll b8452b88c3 TST: test case where there are more sids requested than available 2015-10-19 16:35:03 -04:00
llllllllll c58f0137e4 MAINT: map(retrieve_asset) -> retrieve_all 2015-10-19 16:35:03 -04:00
llllllllll 1db29a9f0f ENH: handle amendments between trading days 2015-10-19 16:35:03 -04:00
llllllllll d3c0463941 ENH: Addresses comments 2015-10-19 16:35:03 -04:00
llllllllll 9c37011a38 BUG: Only simple expressions for array-like dshape 2015-10-19 16:35:02 -04:00
llllllllll 26b47a1234 MAINT: treat Pipeline API as a proper noun 2015-10-19 16:35:02 -04:00
llllllllll 0ec1cbc604 MAINT: rename pipeline_api_from_blaze to from_blaze 2015-10-19 16:35:02 -04:00
llllllllll f7ad82f38e TST: updates tests after rebasing 2015-10-19 16:35:02 -04:00
llllllllll d621f1e87c ENH: Updates the blaze loader and adds more tests 2015-10-19 16:35:02 -04:00
llllllllll 4d7d5ce8ff TST: Adds some test cases for the blaze loader 2015-10-19 16:35:02 -04:00