Commit Graph

778 Commits

Author SHA1 Message Date
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
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
Scott Sanderson aef38c4a74 MAINT: Remove unused import. 2015-11-17 11:22:08 -05:00
jfkirk 11b7cd2dd0 TST: Fixes test_order_methods_for_future 2015-11-16 11:47:00 -05:00
Scott Sanderson 0f349fc3ed MAINT: Fix type coercion warnings with numpy 1.10.
Numpy warns about adding Python integers to uint32s and converting date
objects to datetime64.
2015-11-15 22:42:36 -05:00
Scott Sanderson 4832004c33 TEST: Test fallback to start_date/end_date sorting.
Adds tests asserting that we resolve conflicts in accordance with the
following rules when we have multiple assets holding the same symbol at
the same time:

If multiple SIDs exist for symbol S at time T, return the candidate
SID whose start_date is highest. (200 cases)

If multiple SIDs exist for symbol S at time T, the best candidate
SIDs share the highest start_date, return the SID with the highest
end_date. (34 cases)

It is the opinion of the author (ssanderson) that we should consider
this malformed input and fail here.  But this is the current indended
behavior of the code, and I accidentally broke it while refactoring.
These will serve as regression tests until the time comes that we
decide to enforce this as an error.

See https://github.com/quantopian/zipline/issues/837 for more
details.
2015-11-13 18:26:54 -05:00
Scott Sanderson 657a132f1e ENH: Make retrieve specific type functions public.
We rely on these upstream, for better or worse, so add tests and docs.

Also adds distinct `EquitiesNotFound` and `FutureContractsNotFound`
exceptions.
2015-11-13 18:26:54 -05:00
Scott Sanderson 3619a24e4d TEST: Add support for futures to tmp_asset_finder. 2015-11-13 18:26:54 -05:00
Scott Sanderson 9e463fd5d8 MAINT: make_rotating_asset -> make_rotating_equity. 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
jfkirk 85dd4b70dd MAINT: Renames 'version' table to 'version_info' for clarity 2015-11-12 14:43:11 -05:00
jfkirk 6aac54544e MAINT: Only write asset db version on db creation 2015-11-12 14:43:11 -05:00
jfkirk 48e488d423 ENH: Adds versions to asset databases 2015-11-12 14:43:11 -05:00
Maya Tydykov 1fe4dfe229 Merge pull request #830 from quantopian/equity_caching
Equity caching
2015-11-12 14:01:29 -05:00
Maya Tydykov df492ecf7f DOC: add whatsnew entry for AssetFinderCachedEquities. 2015-11-12 11:02:30 -05:00
Maya Tydykov d0cb5bd513 ENH: add extension to AssetFinder that caches all equities in memory and uses that cache in lookup_symbol. 2015-11-12 11:02:26 -05:00
llllllllll 9c61c77344 TST: cleanup test_history param output 2015-11-11 19:23:20 -05:00
llllllllll 0f5cf78492 MAINT: use subtest to quiet the output from test_events 2015-11-11 19:23:20 -05:00
llllllllll 0cb4c38717 ENH: Allow users to pass a context manager to wrap all scheduled
functions.

This includes handle_data.
2015-11-11 14:19:13 -05:00
jfkirk af021f0db5 BUG: FutureChain's as_of() now properly coerces arguments 2015-11-10 14:03:19 -05:00
Joe Jevnik 5ef9056a9b Merge pull request #808 from quantopian/delta-on-last-requested-date
BUG: Corrects an index error in blaze loader.
2015-11-05 16:59:04 -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
Scott Sanderson 90e717f6a7 Merge pull request #821 from quantopian/cme-codes-reference
ENH: Add CME code lookup table.
2015-11-05 14:19:36 -05:00
Scott Sanderson 744a998b9a ENH: Add CME code lookup table. 2015-11-05 13:57:44 -05:00
Scott Sanderson a14c61e7ff MAINT: Remove unused 'asset_type' metadata entry. 2015-11-05 13:35:05 -05:00
Richard Frank ec5318ec88 TST: Fixed up test result comparison 2015-11-05 10:18:57 -05:00