Commit Graph

834 Commits

Author SHA1 Message Date
Scott Sanderson 09be7acaa8 TEST: Test forwarding of missing_value. 2016-02-12 21:23:47 -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
Scott Sanderson 94c02c710b DEV: Add parameter_space test decorator. 2016-02-12 21:21:19 -05:00
Scott Sanderson 1bf33f9ee0 TEST: Add isolated tests for .latest. 2016-02-12 21:21:19 -05:00
Scott Sanderson a96dd70634 MAINT: Rename ConstantLoader to PrecomputedLoader. 2016-02-12 21:21:19 -05:00
Scott Sanderson 0c15f50231 TEST: Add dedicated testing dataset. 2016-02-12 21:20:18 -05:00
Scott Sanderson 28fdecc98b ENH: Make .latest return a Filter on bool columns. 2016-02-12 21:20:18 -05:00
Richard Frank 069fe5ccda TST: Updated for new pandas and made clearer types of values 2016-02-11 18:46:43 -05:00
Richard Frank f14002a741 TST: Test fixes for pandas update 2016-02-11 18:46:43 -05:00
Richard Frank ff485950b8 TST: Fix expected value now that assertion is more strict
in newer pandas
2016-02-11 18:46:43 -05:00
Richard Frank 41231c5c59 MAINT: Removing unused functions and related tests 2016-02-11 18:46:43 -05:00
Joe Jevnik c11524fda1 MAINT: pandas 0.17 compat for blaze core loader 2016-02-11 18:46:43 -05:00
Joe Jevnik e33cc25265 TST: fix redundant partial 2016-02-11 18:46:42 -05:00
Joe Jevnik 8be903b074 STY: remove unused import 2016-02-11 18:46:42 -05:00
Scott Sanderson 5f49fa22cb MAINT: Upgrade numpy and fix warnings.
Mostly fixes ambiguous calls to numpy.full, and uses explicitly-united
NaT values.
2016-02-11 18:46:39 -05:00
Scott Sanderson dfb1832231 TEST: More thorough testing of boolean binops. 2016-02-10 18:45:00 -05:00
Scott Sanderson e7269a880c BUG: Add right-binding operators to NumExprFilter.
Fixes a bug where doing a boolean comparison between a non-numexpr
Filter and a NumExprFilter would fail because we don't implement
`__rand__` and `__ror__`.
2016-02-10 18:34:59 -05:00
Richard Frank 4e84b2c5ca TST: Added doctest 2016-02-04 21:58:57 -05:00
Eddie Hebert 27f94f83fa ENH: Allow passing of numpy arrays to writer.
For faster parsing and writing workflows, do not require a DataFrame.
2016-02-02 14:03:42 -05:00
Richard Frank d2365750fd Merge pull request #977 from quantopian/asset_comparison_overflow
BUG: Handle OverflowError by comparing False
2016-02-01 15:48:24 -05:00
Richard Frank 28b34f6409 BUG: Handle OverflowError by comparing False
instead of raising
2016-02-01 15:02:15 -05:00
Eddie Hebert 488721e805 ENH: Add padding method to minute bars writer.
So that consumers can write empty days worth of data, without needing
to construct a DataFrame with zero data force a write.

The internal loader uses `last_date_in_output_for_sid` to signify that
data has been attempted to be retrieved for all dates up until that, so
that when resuming a job those retrieval of data for those dates are not
re-attempted.

Also, used to make the write logic cleaneer, by making it only
necessary to create an array large enough for the given df.
2016-02-01 14:18:22 -05:00
Joe Jevnik b102742f69 BUG: fix deltas in blaze core loader 2016-01-28 14:08:11 -05:00
James Kirk 2803802736 Merge pull request #941 from quantopian/futures-tick-size
ENH: Adds tick_size and renames futures multiplier
2016-01-25 11:18:31 -05:00
Eddie Hebert e576231ae5 Merge pull request #972 from quantopian/fix-minute-bar-siblings
BUG: Fix OSError when creating sids that share dir
2016-01-25 10:41:42 -05:00
Eddie Hebert 984e934e83 BUG: Fix OSError when creating sids that share dir
Fix a bug where creating a sid bcolz file when the containing directory
was already occupied by a sid caused an OSError on attempt of creating
the directory because it already existed.

e.g. if there were two sids, `1` and `2`. The paths would be
`00/00/000001.bcolz` and `00/00/000002.bcolz` which share the same
directory `00/00`.

Fixed by checking for directory existence before calling `makedirs`.

Add test coverage which exercises writing of sids that are siblings in
the sid directory structure.
2016-01-25 10:37:50 -05:00
jfkirk d82bd5c05d TST: Cleans up test_to_and_from_dict 2016-01-22 15:26:14 -05:00
jfkirk c9c2e3e60e TST: Updates TestPositionPerformance 2016-01-22 14:56:30 -05:00
jfkirk ece9e59ef9 ENH: Adds asset db downgrade management and tests 2016-01-22 14:56:30 -05:00
jfkirk db1e62971a ENH: Adds tick_size and renames futures multiplier 2016-01-22 14:56:30 -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
Richard Frank 4ee919aeb2 Merge pull request #959 from quantopian/asset_keyerror
Asset KeyError
2016-01-21 12:38:53 -05:00
Richard Frank 2eeb6e78f6 BUG: Enable comparison of an Asset to an int64 on 32-bit python
We use a number of mappings keyed by int64, which otherwise raised
KeyErrors for Assets.
2016-01-21 11:47:29 -05:00
James Kirk 2cb3a7235e Merge pull request #890 from grundgruen/future_chain_order
BUG: orders future chain by min of notice and expiry
2016-01-21 11:18:57 -05:00
Eddie Hebert 85be1b0a40 Merge pull request #963 from quantopian/minute-writer-for-one-per-sid-2
ENH: Add writer for minute bcolz format.
2016-01-21 10:59:38 -05:00
Eddie Hebert d5c3b5a15c ENH: Add writer for minute bcolz format.
Implement a writer for minute data into a format comprised of multiple
ctables, one for each individual asset, with a common 'index' shared by
all ctables where a given a dt maps to the same array index for all
equities and fields.

This format is pulled from the lazy-mainline/Q2.0 branch, with some
changes to the interface.

Add basic retrieval of values at a given dt to reader. Not yet used by
Zipline simulations, but added to support unit tests.

Also, rename stubbed out us_equity_minutes to minute_bars, since the
writer can be agnostic to asset type.
2016-01-21 10:54:27 -05:00
jfkirk 1365b916c0 TST: Adds tests for the perf tracker with futures 2016-01-19 16:11:22 -05:00
Joe Jevnik 3b76981270 Merge pull request #846 from grundgruen/data_test
TST: tests removing of expired data and removes ffill in DataPanelSource
2016-01-19 13:05:15 -05:00
warren-oneill a963270471 BUG: orders future chain by min of notice an expiry 2016-01-18 12:20:58 +01:00
Joe Jevnik 2caa9277c4 ENH: Make the data_query_time arguments optional 2016-01-13 15:26:37 -05:00
Joe Jevnik 5351b60a4c ENH: adds optionally for preprocessors 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
Joe Jevnik fb6d1ea3d1 MAINT: move some helpers to test_utils 2016-01-08 13:11:31 -05:00
Eddie Hebert 80a553d1c0 Merge pull request #938 from quantopian/futures-payouts-without-every-bar-update
MAINT: Futures cash adjustment on change and calc.
2016-01-06 10:25:29 -05:00
jfkirk 00879245a4 BUG: Adds version checking to AssetFinder init 2016-01-05 13:48:00 -05:00
jfkirk 004c8dc141 MAINT: Factors-out asset db schema 2016-01-05 13:48:00 -05:00
Eddie Hebert 962347318d MAINT: Futures cash adjustment on change and calc.
In preparation for the incoming changes which no longer push every bar
through the tradesimulation, remove the adjustment of the period's cash on
every pricing change of a held futures asset.

Instead hold the last sale price for each held future either:

- At the end of each peformance period update the last sale prices of
  all held futures, so that the pnl for the next period uses values
  derived from the cash difference between the end of the two periods.

- When a transaction is processed for the Future, so that the correct
  amount is applied to each cash adjustment. (i.e. the cash adjustment
  is reset on every change of amount of the Future being held, so that
  multiple size and prices do not need to be tracked for the same asset.)

Also, remove now unused dict of payout calculation modifier, since new
calculation reads the value directly off of the asset.

Remove update_last_sale test, since the method no longer returns a cash
value.
2016-01-04 16:52:37 -05:00