Commit Graph

2912 Commits

Author SHA1 Message Date
Richard Frank 2dabda6b76 MAINT: Reworked Term atomicity 2015-10-12 16:11:19 -04:00
Richard Frank 940831e1cf TST: Added test that columns are batched
when they share the same loader and extra_rows
2015-10-12 11:17:06 -04:00
Richard Frank 7bd6b69a89 MAINT: Group by loader and extra_rows
so that the mask and dates are the same for all the columns
the loader is loading at a time.
2015-10-12 10:48:29 -04:00
Richard Frank ba0542a641 MAINT: Removed MultiColumnLoader
since we can use pipeline_loader_dispatch instead
2015-10-12 10:48:29 -04:00
Richard Frank 143f780036 MAINT: Fixed base class signature 2015-10-12 10:48:29 -04:00
Richard Frank 83bd1310d9 PERF: Using pipeline_loader_dispatch to group by loader
instead of dataset
2015-10-12 10:48:29 -04:00
Richard Frank e880fa3e34 PERF: Batch load atomic terms by dataset
Added CompositeTerm and now we dispatch more generally on atomic
2015-10-12 10:48:28 -04:00
Scott Sanderson 87d5efb699 Merge pull request #763 from quantopian/make-rsi-actually-work
BUG: RSI wasn't even close to working.
2015-10-12 10:46:55 -04:00
Scott Sanderson 165ec68518 Merge pull request #762 from quantopian/adjustment-perf
PERF: Speed up reading of adjustments.
2015-10-10 13:45:14 -04:00
Scott Sanderson 2eaab2eedc Merge pull request #764 from FreddieV4/master
Update README.md
2015-10-09 23:54:40 -04:00
Freddie Vargus a42fe6c555 Update README.md
Add inline link for quantopian.com
2015-10-09 21:59:05 -04:00
Scott Sanderson 1336dfc181 BUG: RSI wasn't even close to working.
Fixed and added tests.
2015-10-09 20:10:30 -04:00
Scott Sanderson 23ca58813a PERF: Speed up reading of adjustments.
For a pipeline doing simple computations on USEquityPricing data, we
were spending ~60% of `run_pipeline` loading adjustments.  Almost all of
that time was spent in calls to `DatetimeIndex.get_loc` to find the
indices of adjustment `eff_date`s.

This optimizes the eff_date lookups by pre-populating a cache of
seconds-since-epoch timestamps that we expect to see, and falling back
to `np.searchsorted` on cache misses.

In testing, this reduces the time to compute a 1-year pipeline with 30
and 90 day moving averages from 3.1 seconds to 0.9 seconds.
2015-10-09 17:48:07 -04:00
Scott Sanderson 4a9cd76dab MAINT: Remove unused constant. 2015-10-09 17:47:47 -04:00
Scott Sanderson f06f4bdd25 MAINT: Remove unused import. 2015-10-09 17:47:18 -04:00
Eddie Hebert e6ba59b580 Merge pull request #761 from quantopian/move-us-equity-to-data
MAINT: Move equity data formats out of loader.
2015-10-09 17:28:37 -04:00
Eddie Hebert e33f6dcdcd MAINT: Move equity data formats out of loader.
Put the logic for reading and writing the equity price and adjustment
data into a module located in data, making it distinct from the pipeline
loader usage of the formats.

This prepares for both incoming changes of how adjustments are written,
(which includes using the bcolz daily reader as an input), as well as
eventually providing the readers to a DataPortal object.
2015-10-09 17:20:19 -04:00
Stewart Douglas 4e2039c9b0 ENH: Coerce user input with API method decorator
Previously we have capitalized input strings at different levels in
our code: in the user-facing API methods and in the asset finder.
This commit moves input string capitalization exclusively to the API
method to which the string was supplied. Specifically, the string is
capitalized by a preprocess API method decorator. The preprocess
decorator passes the input string to the newly defined
ensure_upper_case() method, which returns a TypeError if the argument
supplied is not a string.

ensure_upper_case() is defined in a new file, zipline/utils/input_validation.py.
The existing expect_types() method is also moved there.

Various tests in tests/test_assets.py are modified to account for the
fact that the asset finder method lookup_symol() no longer capitalizes
its supplied argument.
2015-10-08 15:41:33 -04:00
Andrew Daniels 69b734129f ENH: Add index to root_symbol column of futures_contracts 2015-10-08 14:51:42 -04:00
Andrew Daniels 2e85e08768 TST: Adds basic test coverage for FutureChain.__iter__ 2015-10-08 14:35:00 -04:00
Andrew Daniels 9ecd7e18d0 MAINT: Improves handling for contract date info in lookup_future_chain
Improves the query for futures contract to use the date that comes first
in time (between notice_date and expiration_date) to determine cotnract
validity. If one of these is missing, we'll use the other.

Also modifies the query to order the resulting contracts by their
expiration_date if available, and to use their notice_date if not.
2015-10-08 14:16:57 -04:00
Stewart Douglas 3feb78807e MAINT: Add license to various files 2015-10-07 15:47:45 -04:00
Scott Sanderson e728e0c1f3 BUG: Fail when passing two Filters to set_screen. 2015-10-07 10:48:42 -04:00
Scott Sanderson bf6dc7fac1 DOC: Correctly write optional arg to CustomFactor. 2015-10-06 12:07:50 -04:00
Scott Sanderson d5f8c7c99b DOC: The double-colon is intentional. 2015-10-06 12:03:05 -04:00
Jean Bredeche 2bb87cbd23 DOC: typo fixes 2015-10-06 09:06:05 -04:00
Scott Sanderson 773e4cc4db BUG/DOC: Use correct close brace. 2015-10-06 06:56:07 -04:00
Scott Sanderson 1c27aa9fb1 DOC: More doc updates. 2015-10-06 06:56:07 -04:00
Scott Sanderson 3233850cf6 DOC: Update docstrings for built-in factors. 2015-10-06 06:56:06 -04:00
Scott Sanderson 7d760f64d7 DOC: More docs updates. 2015-10-06 06:56:06 -04:00
Scott Sanderson f109dbbd1d DOC: Use double backticks for API methods in pipeline docs. 2015-10-06 06:56:06 -04:00
Scott Sanderson 4230049fde DOC: More docs tweaks.
- Remove methods and attributes on Pipeline.  They look bad on the Q docs.x
- Reword columns docstring.
2015-10-06 06:56:06 -04:00
Scott Sanderson e2d29e9260 BUG: Use correct section name. 2015-10-06 06:56:06 -04:00
Scott Sanderson 762787a4fe DOC: Tweaks to pipeline language. 2015-10-06 06:56:06 -04:00
Scott Sanderson 5f495f91fc DOC: Restructure example slightly. 2015-10-06 06:56:06 -04:00
Scott Sanderson b949748467 BUG/DOC: Subtraction is what I meant there... 2015-10-06 06:56:06 -04:00
Scott Sanderson 7ea24c20c8 MAINT: Updates to docstrings. 2015-10-06 06:56:06 -04:00
Scott Sanderson 99dfb6573e DOC: Docstrings for Pipeline and CustomFactor. 2015-10-06 06:56:06 -04:00
Stewart Douglas 3ef0ddf0c6 ENH: Add future_symbol API method 2015-10-05 11:19:04 -04:00
Stewart Douglas 3cfdd6cf8c ENH: Add lookup_future_symbol method 2015-10-05 10:25:08 -04:00
Scott Sanderson 557bdcd69d MAINT: Don't name pipelines.
`Pipeline()` no longer takes a name.
`attacH_pipeline` now takes a name.

This is mainly for uniformity with how `Factors` and `Filters` are
handled.
2015-10-02 16:31:29 -04:00
Richard Frank 720d9382bd Merge pull request #746 from quantopian/write_faster
Write faster
2015-10-02 12:21:27 -04:00
Richard Frank 027d4009d8 MAINT: Share constant across modules 2015-10-02 11:53:04 -04:00
Richard Frank c8c83a9f2b MAINT: Don't bother looping through all the keys 2015-10-02 11:53:04 -04:00
Richard Frank a30c4fc689 PERF: Don't build an AssetFinder if no engine is provided
This is an optimization where we're building an environment but not
using its finder.  Ideally, the consumer would use just the calendar,
but it's not fully featured quite yet.
2015-10-02 11:53:04 -04:00
Richard Frank e8c5203e31 MAINT: constraints is always True 2015-10-02 11:53:04 -04:00
Richard Frank 8b98ca7d71 PERF: Reflect the db schema once instead of per table 2015-10-02 09:58:59 -04:00
Richard Frank beac4d6f16 MAINT: Delegate to sqlalchemy metadata
instead of maintaining our own
2015-10-02 09:58:59 -04:00
Richard Frank ea02dcfb14 MAINT: Format the list when making error message 2015-10-02 09:58:59 -04:00
Richard Frank 9a745450cc MAINT: De-dupe retrieving assets 2015-10-02 09:58:59 -04:00