Commit Graph

803 Commits

Author SHA1 Message Date
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
Joe Jevnik 7a6ba4f249 Merge pull request #924 from quantopian/dataset-subclassing
ENH: Make datasets have subclass relationships
2015-12-29 11:43:55 -05:00
Joe Jevnik 68cf236944 TST: Add test case for adding columns in subclass 2015-12-29 10:12:39 -05:00
Scott Sanderson 72887f0065 ENH: Change DollarVolume to AverageDollarVolume. 2015-12-28 16:12:11 -05:00
llllllllll 32baac4e4b ENH: Make datasets have subclass relationships 2015-12-22 12:25:30 -05:00
Scott Sanderson 8abef95bb5 DOC: Rename exponential stddev.
ExponentialWeightedStandardDeviation -> ExponentialWeightedMovingStdDev.

This is more consistent with the other moving moment factors.
2015-12-18 14:30:28 -05:00
Eddie Hebert d07d42263a MAINT: Make tracker stats a method.
Instead of calling a function, where the only parameter is the tracker
object, make it a method, so that the snapshot of position tracker stats
can be more easily called as `pt.stats()`.
2015-12-18 09:52:53 -05:00
Eddie Hebert 7df0f9e4b0 MAINT: Pass leverage instead of account to risk.
The only value used in the account is leverage, so pass the leverage
value directly.

Also, remove account from risk init, since it is not used.
2015-12-16 15:32:48 -05:00
Eddie Hebert 82affb639f TST: Explicitly skip versioning tests.
The test had a check for a pandas version (0.12.0) which was out of date
with the version in requirements, meaning the tests have not been run
regularly and unstable.

Skip via the decorator to make it more noticeable that tests are not
being run.
2015-12-15 16:23:59 -05:00
Eddie Hebert bbb9cc87a9 REF: Move transaction class to own module. 2015-12-15 16:23:59 -05:00
Eddie Hebert b863733953 REF: Move order class to distinct module. 2015-12-15 16:23:59 -05:00
Eddie Hebert 06d4d7e74b MAINT: Remove perf_periods member.
Refer to cumulative and todays performance explicitly instead of always
looping through.

The third value (minute) for which this was useful, has been removed.

Also, there are some actions where only cumulative may need application,
e.g. application of dividends. (However, this patch does not remove
dividend processing from todays performance, but opens up later patches
to make that distinction.)
2015-12-15 13:47:38 -05:00
Scott Sanderson b91f9697b9 ENH: Add ExponentialWeightedStandardDeviation. 2015-12-11 22:13:27 -05:00
Scott Sanderson 2235a53581 ENH: Add EWMA and DollarVolume factors. 2015-12-11 22:13:27 -05:00
llllllllll 4963b2ca72 TST: Adds tests for infer_timestamp 2015-12-10 15:14:27 -05:00
Scott Sanderson e3d19bab25 MAINT: Fix failing blaze expr test. 2015-12-10 14:19:32 -05:00
Scott Sanderson f719fef55e STY: Many people prefer to read words with vowels. 2015-12-10 12:50:36 -05:00
Scott Sanderson 64ce6d26aa BUG: Fix hardcoded type repr in test.
Types repr differently in py2 vs py3.
2015-12-09 15:29:57 -05:00
llllllllll f8ab8a5159 TST: py3 compat qualname in preprocess tests 2015-12-09 12:49:59 -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
Tim Shawver 631a1879a3 Adding a built in Returns factor to the pipeline API. 2015-12-01 13:24:41 -05:00
warren-oneill ef323a3165 ENH: adds lookup_expired_futures to asset_finder 2015-12-01 15:24:02 +01:00
James Kirk 7563265647 Merge pull request #849 from quantopian/futures-order-test-fix
TST: Fixes test_order_methods_for_future
2015-11-30 12:40:49 -05:00
jfkirk bbe3ab99ac TST: Adds asset type verification to test_order tests 2015-11-30 12:25:04 -05:00
Eddie Hebert 5f81acea05 ENH: Return -1 for missing spot prices.
Return -1 when there is a zero value for a spot price.
Intended for use by the incoming data portal changes. When the data
portal will see a -1 value, the portal will seek back a trading day
until a non-negative value is returned.
2015-11-25 11:32:36 -05:00
Eddie Hebert 53dae6320c BUG: Fix volume value returned by daily spot price
Volumes were incorrectly having the thousands factor applied, however
the volume is written as is (without the factor, since it volume is an
int, not float value.)

Fix by adding a special case for volume which returns the price as is.
2015-11-25 10:19:52 -05:00
llllllllll c62ac9ba74 ENH: cannot create two sentinels with same name and different doc 2015-11-24 16:45:52 -05:00
llllllllll 0cf85dec98 BUG: fix issues with sentinel 2015-11-24 15:07:27 -05:00
Scott Sanderson 5d8a915d15 ENH: Add inspect() function to adjusted_array. 2015-11-20 20:15:43 -05:00
Richard Frank f4cf30dd19 BUG: Return NaN beta when missing benchmarks
instead of raising LinAlgError
2015-11-19 09:36:56 -05:00
Scott Sanderson b43c4f4c0b ENH: Add isnan, notnan, and isfinite Factor methods. 2015-11-18 21:44:53 -05:00
Scott Sanderson 0cdd88a069 Merge pull request #847 from quantopian/fix-numpy1.10-failures
MAINT: Fix type coercion warnings with numpy 1.10.
2015-11-17 11:39:23 -05:00