Commit Graph

2447 Commits

Author SHA1 Message Date
Delaney Granizo-Mackenzie c6596e2ee2 ENH: Added versioning logic to objects.
In order to be able to load from saved state generated by old
code, we need to have a notion of the version of the saved state.
2015-03-04 14:17:12 -05:00
Delaney Granizo-Mackenzie 64eed84bff MAINT: Added pickle protocol methods into zipline.
Added pickle support to many zipline methods. This will enable
them to be serialized.
2015-03-04 14:17:12 -05:00
theandycamps d192b1846f MAINT: Move knowledge date for existing DNT list 2015-03-03 16:46:56 -05:00
Eddie Hebert 82378f720d Merge performance improvements to simple transforms. 2015-03-03 15:23:05 -05:00
Dale Jung 4d1437cf5c PRF: Normalize the history requested for SIDData rolling transforms. 2015-03-03 15:21:19 -05:00
Dale Jung 4c5cb867db PRF: Sped up the SIDData transforms by using raw values. Also fixed a
vwap zero division error.
2015-03-03 15:21:19 -05:00
Dale Jung 29e5f7ee86 PRF: Added nanmean, nanstd, nansum that will default to bottleneck if available 2015-03-03 15:21:19 -05:00
Eddie Hebert fd21b4697e STY: Remove unused import. 2015-03-02 11:32:46 -05:00
Eddie Hebert a64a1ee619 TST: Use pandas relativedelta for calendar end to account for leap year.
Some unit tests for test_tradingcalendar failed on 2015-03-01, because the
addition of 365 days put the end date at 2016-02-29; when the replaces
the year on that date it fails because there is no 2017-02-29.

Instead use relativedelta with a year argument which accounts for leap
years.

Fixes the following test failure:

```
======================================================================
ERROR: test_day_after_thanksgiving (tests.test_tradingcalendar.TestTradingCalendar)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/test_tradingcalendar.py", line 211, in test_day_after_thanksgiving
    tradingcalendar.end.replace(year=tradingcalendar.end.year + 1)
  File "tslib.pyx", line 297, in pandas.tslib.Timestamp.replace (pandas/tslib.c:7325)
ValueError: day is out of range for month

----------------------------------------------------------------------
Ran 1 test in 0.001s
```
2015-03-02 11:02:13 -05:00
Dale Jung 98ee8efe3d BUG: Added sorting back to orders. This isn't a functional bug so much
as it is a backwards compat. Without sorting the orders are filled by
order date. With sorting the orders are moved to back of queue after
partil fills. If all orders are fully filled, there is no
deviation. Also there is no portfolio difference as this is about
assigning fills to equivalent orders.
2015-02-27 08:19:41 -05:00
Eddie Hebert 94d25a54c6 PERF: Merge blotter performance improvements. 2015-02-27 05:06:51 -05:00
Dale Jung 29aab7755f TST: updated test to the fact that we aren't creating new lists to store
orders
2015-02-27 05:06:02 -05:00
Dale Jung 69815d1695 PRF: limit the subset of orders we check for bookkeeping 2015-02-27 05:06:02 -05:00
Dale Jung 4c5f38d7b1 MAINT: There is no place where orders are put in out of place 2015-02-27 05:06:02 -05:00
Dale Jung 7a5af8a098 ENH/PRF: Allow SlippageModels to alert that no more liquidity exists and
to stop processing orders
2015-02-27 05:06:02 -05:00
Eddie Hebert faf856a736 MAINT: Print benchmark return value to assertion message.
For when the attempted midnight fails, print more information about the
returns for debugging.
2015-02-26 13:43:15 -05:00
Dale Jung e908fa9f5c BUG: Initial digest frame was set with object dtype. Older verison of
numpy can error when expecting numeric dtypes and not np.array([1,2,3],
dtype=object)
2015-02-26 11:57:34 -05:00
Eddie Hebert a0bd57555d MAINT: Provide a function to create the position calc containers.
For use in a function that wraps de-serialization, to call instead of
creating the OrderedDicts from a module outside of the object.

So that the other module does not need to the internals of this object,
also to ensure that the cythonized OrderedDict is used, when available.

This need should be superseded with serialization versioning.
2015-02-25 13:41:50 -05:00
Eddie Hebert 1054134bd9 BUG: Fix div by 0 error due to changed return type.
When calculate_positions_value used np.dot, the return type was a
np.float64. Which allows the use of 0.0 in division to not raise an
exception.

Fix by expliciting creating an np.float64 with 0 value.
2015-02-23 11:57:07 -05:00
Eddie Hebert 83b0e51b59 BUG: Fix missed cache invalidations on assignment.
_position_values needs to be invalidated on every assignment.
2015-02-23 11:57:07 -05:00
Eddie Hebert eda323dcd4 ENH: Performance period compatibility with internal serialization.
Add a set_positions method so that the serialization process can rebuild
from just the positions, since the last_sale and amounts are derivable
from those values.

Also, use the private naming convention for last sale price and amount
members, so that those members are ignored by the serialization process.
2015-02-23 11:57:07 -05:00
Dale Jung 25c762138e PERF: Use cached list of price and volume value.
Reduce the number of times the multiplication is done for the
position values to once per bar.
2015-02-23 11:57:07 -05:00
Dale Jung 913fbb0568 PERF: Replaced use of a pandas.Series for dict-like duties to a cython
based OrderedDict. Series/ndarray can only be sped up so much because
they weren't designed for fast iterative mutations.

This also cut down on the # of intermediate Series being generated
during perf stat generation. Things like s[s > 0] will create a new
Series for s > 0.

Moved cython to requirements.txt and added cyordereddict
2015-02-23 11:57:07 -05:00
Sebastian Nilsson c4168c2ba6 DOC Fix broken link to Getting started tutorials. 2015-02-22 16:47:04 +01:00
Delaney Granizo-Mackenzie 68c41eab1c Merge pull request #470 from quantopian/remove-overnight-minutes
BUG: Changed benchmark returns to only contain market minutes.
2015-02-19 12:29:28 -05:00
Dale Jung b3bc7e166d BUG: Remove sid entry from open_orders when there are none.
TST: updated tests for new open_orders behavior
2015-02-19 11:22:54 -05:00
Delaney Granizo-Mackenzie 2853830264 BUG: Changed benchmark returns to only contain market minutes.
The series was being generated as all minutes between two times.
It should be only the trading minutes.
2015-02-18 16:42:26 -05:00
Thomas Wiecki 760bbced73 Revert "ENH Allow order_percent to work with various market values"
This reverts commit dd37a49f2f as it lead to different algo behavior we have to investigate first.
2015-02-17 20:27:59 +01:00
Joe Jevnik fdf4e9b737 PERF: Makes get_datetime not make a copy.
datetime.datetime objects are immutable.
2015-02-17 11:50:20 -05:00
Thomas Wiecki 556c5a8207 BLD Fix setup.py and add link to homepage. 2015-02-17 13:50:33 +01:00
Thomas Wiecki b0d570e9d8 Merge pull request #486 from dalejung/test_matrix
Update test matrix to test both pandas 0.12.0 and 0.15.2
2015-02-13 22:23:25 +01:00
Thomas Wiecki 3b70e67fdd BLD Update 0.8.0rc1 zipline md5sum. 2015-02-13 17:57:04 +01:00
Thomas Wiecki 21c23c324d Bump version: 0.8.0 → 0.8.0rc1 2015-02-13 17:53:02 +01:00
Dale Jung 6020220adb TST: added pandas 13.1, 14.1 to travis 2015-02-13 11:27:17 -05:00
Dale Jung 009f45ee67 Moved to use Quantopian binstar, failing on ta-lib built on wrong numpy 2015-02-13 11:27:17 -05:00
Dale Jung 3391331d6d Upped min numpy from 1.7.0 -> 1.7.1 2015-02-13 11:27:17 -05:00
Dale Jung e2dd8ee23a Wrote an explicit matrix for 2 tests 2015-02-13 11:27:17 -05:00
Dale Jung f49210bb49 Update test matrix to test both pandas 0.12.0 and 0.15.2 2015-02-13 11:27:17 -05:00
Thomas Wiecki edadd63bd3 DOC Merge Joe and llllllllll. 2015-02-13 17:18:34 +01:00
Thomas Wiecki 38ae31a24e DOC Fix comitters in release announcement. 2015-02-13 14:25:50 +01:00
Thomas Wiecki fa9e61909b DOC Add highlights section to release announcements. 2015-02-13 14:18:48 +01:00
Thomas Wiecki 44083b9906 DOC Add authors file as well as script to create it. 2015-02-13 14:13:22 +01:00
Thomas Wiecki b60621bb02 DOC Add contributors to release announcement. 2015-02-13 14:09:04 +01:00
Thomas Wiecki abfd8940fa DOC Fix release-notes filename in mkdocs.yml. 2015-02-13 13:54:48 +01:00
Thomas Wiecki edf0c5ef54 DOC Bumped version of release announcement to 0.8.0. 2015-02-13 13:52:35 +01:00
Thomas Wiecki bab3d9e731 DOC Markdown fixes to release announcement. 2015-02-13 13:51:59 +01:00
Thomas Wiecki 1a51ff1ee9 BLD Remove setup.py rst conversion. Add README.md as pypi description. 2015-02-13 13:36:42 +01:00
Thomas Wiecki 7812cbb55f DOC Update README to add call to action to join mailing list. 2015-02-13 13:36:42 +01:00
Thomas Wiecki 37032eee62 DOC Initial setup of mkdocs. 2015-02-13 13:36:38 +01:00
Scott Sanderson 357f1a88a4 BUG: Remove Pokemon exception handling.
This was masking real errors that were occurring during registration of
cell magic.
2015-02-13 10:11:27 +01:00