Commit Graph

4339 Commits

Author SHA1 Message Date
LotannaEzenwa c19d2855ad Added kwargs to ewma constructors
fixed typos
2016-08-22 13:14:23 -04:00
Jean Bredeche 2b5ae892f8 Merge pull request #1407 from quantopian/minute_panel_daily_history
ENH: Add fast "vectorized" `minute_to_session_label` for DatetimeIndex
2016-08-22 10:27:40 -04:00
Richard Frank 2eff193759 Merge pull request #1418 from quantopian/all-calendars
All calendars
2016-08-22 08:48:33 -04:00
Richard Frank cb097a2b80 DOC: Added licenses to calendar modules 2016-08-21 17:19:59 -04:00
Richard Frank 19c9bc2f41 MAINT: Removed unused holiday definitions 2016-08-21 17:19:59 -04:00
Richard Frank 09bd2abe2f BUG: Fix and test getting all default calendars 2016-08-21 17:19:59 -04:00
John Ricklefs aaa678d338 Merge pull request #1416 from quantopian/exch_full_synthetic
ENH: Expose exchange_full on all Asset types
2016-08-20 13:51:29 -04:00
John Ricklefs 8e3cc484db ENH: If no exchange_full provided, use exchange 2016-08-19 16:45:52 -04:00
John Ricklefs ccde5cbf56 ENH: Add exchange_full to all Assets, incl. Futures. 2016-08-19 16:45:52 -04:00
John Ricklefs fce87015d2 ENH: Expose exchange_full on Equity objects 2016-08-19 15:59:52 -04:00
Andrew Daniels 5fb415eb12 ENH: Adds QuantopianUSFuturesCalendar (#1414)
For trading US futures across the exchanges supported by Zipline.
2016-08-19 13:40:09 -04:00
Eddie Hebert 653865b34c Merge pull request #1413 from quantopian/normalize-equity-future-in-data-portal
MAINT: Remove future/equity distinction.
2016-08-18 23:50:36 -04:00
Richard Frank 2030dd02a1 Merge pull request #1409 from quantopian/doc-zipline-run
DOC: Replace run_algo.py in docs with zipline run
2016-08-18 17:37:00 -04:00
Nathan Wolfe 4865ade9b2 ENH: Add fast "vectorized" minute_to_session_label for DatetimeIndex
The new TradingCalendar method is called `minute_index_to_session_labels`.
It takes a DatetimeIndex of in-order market minutes and returns a
DatetimeIndex of the corresponding sessions.

The new method is approximately 100x faster than mapping
`minute_to_session_label` over a large DatetimeIndex.
2016-08-18 17:27:47 -04:00
Eddie Hebert e3bd7e43be MAINT: Remove future/equity distinction.
In the data portal, remove methods that make a distinction between
future and equity asset type. Instead rely on the pricing reader
dispatching.

In support of incoming work which will upsample equity history arrays to
the larger future calendar.

Also, remove perf tracker tests which were using an equity
reader/writer, to be added back in later.
2016-08-18 16:18:32 -04:00
Eddie Hebert 8834d0c35d Merge pull request #1412 from quantopian/remove-unused-data-portal-members
MAINT: Remove unused data portal members.
2016-08-18 16:14:24 -04:00
Andrew Daniels 53ca68e8fb ENH: Pass calendar instance to BcolzMinuteBarWriter (#1406)
* First pass.

* Improvements and fixes

- Update usages of BcolzMinuteBarWriter
- Updates with rebuilt example data
- Expose calendar from BcolzMinuteBarMetadata instead of calendar_name
- Keep market_opens and market_closes in metadata for compatibility

* Store start_session and end_session in minute bcolz metadata

- start_session replaces first_trading_day
- Add end_session to limit to correct days

* For last_available_dt, get last close from calendar to maintain tz

* Bumps version and handles earlier versionson read

* Rebuilt example data on python 3

* Indicate metadata fields that are deprecated
2016-08-18 15:41:26 -04:00
Eddie Hebert a36766f1af Merge pull request #1411 from quantopian/add-htmlcov-to-gitignore
TST: Add coverage output to gitignore.
2016-08-18 15:07:15 -04:00
Eddie Hebert 04bf2f0b5e Merge pull request #1410 from quantopian/rename-history-loader
MAINT: Remove equity from history loader classname
2016-08-18 14:48:28 -04:00
Eddie Hebert 6c90a7c08b MAINT: Remove unused data portal members.
Remove members which are not referred to.
2016-08-18 14:38:35 -04:00
Eddie Hebert 2a45bd1829 TST: Add coverage output to gitignore.
Ignore `htmlcov` directory created by `coverage html`.
2016-08-18 14:11:26 -04:00
Eddie Hebert 1d22fab127 MAINT: Remove equity from history loader classname
Prepare for using history loaders with both equity and future data,
2016-08-18 14:10:00 -04:00
Eddie Hebert c482a7cd59 Merge pull request #1405 from quantopian/resample-session-from-minute
ENH: Session bar reader resampled from minute data
2016-08-18 13:26:24 -04:00
Scott Sanderson 1c0d407357 Merge pull request #1394 from quantopian/downsample
Add Generic Downsampling to Pipeline
2016-08-18 12:15:54 -04:00
Eddie Hebert f14fcd9b07 ENH: Session bar reader resampled from minute data
Implement a `SessionBarReader` which uses a minute bar reader as a
backing source, resampling the minute bars into the box around the
corresponding session data.

Also, add future/CME test cases to resample suite.
2016-08-18 11:37:42 -04:00
Scott Sanderson bdc72ec4c0 BUG: Fix broken graph visualizations. 2016-08-18 11:07:17 -04:00
Eddie Hebert 9e0e2c26a5 Merge pull request #1404 from quantopian/session-bar-fixup
MAINT: Use session bar reader interface.
2016-08-18 10:04:46 -04:00
Richard Frank 1226286cab DOC: Replace run_algo.py in docs with zipline run 2016-08-17 21:54:56 -04:00
Scott Sanderson c5a3dae267 BUG: Supply a module for Downsampled terms. 2016-08-17 19:48:33 -04:00
Scott Sanderson 0f5784ab53 BUG: Fix nondeterministic failure from sorting. 2016-08-17 19:48:33 -04:00
Scott Sanderson ecfe33b65b BLD: Ignore numpy_utils.py doctests on windows.
They fail because of 32/64-bit issues.
2016-08-17 19:48:33 -04:00
Richard Frank 11f654a688 Merge pull request #1403 from quantopian/keep-last-zero
BUG: Fixes should_clean for keep_last=0
2016-08-17 19:05:31 -04:00
Richard Frank cbcb71bbad BUG: Fixes should_clean for keep_last=0 2016-08-17 18:18:01 -04:00
Scott Sanderson c53ef150ad BUG: Force iterator for py3. 2016-08-17 16:52:09 -04:00
Scott Sanderson a66731b9f3 BUG/TEST: Fix test assertion in py3. 2016-08-17 16:52:09 -04:00
Scott Sanderson 5fe60c76a7 BUG: Fix broken fixture resolution.
Make sure that WithDefaultDateBounds is last in everyone's mro().
2016-08-17 16:52:09 -04:00
Scott Sanderson 115f055c83 MAINT: Clean up downsampling boilerplate.
Consolidate docs and mixin applications into one place.
2016-08-17 16:52:09 -04:00
Scott Sanderson 8fa51bdaab MAINT: Use numpy_utils.as_column in more places. 2016-08-17 16:52:09 -04:00
Scott Sanderson d917a64d45 ENH: Add non-windowed downsampling. 2016-08-17 16:52:09 -04:00
Scott Sanderson a9b5b2ac2f DOC: Docstring cleanups. 2016-08-17 16:52:09 -04:00
Scott Sanderson 5f686173f1 STY: Flake8 cleanup. 2016-08-17 16:52:09 -04:00
Scott Sanderson 91276c7274 ENH: Add support for downsampling.
Adds a new ``downsample`` method to all computable terms.  Computable
terms (Filters, Factors, and Classifiers) can be downsampled to yearly,
quarterly, monthly, or weekly frequency.

The result of ``term.downsample`` is a new term of the same
family (Filter/Factor/Classifier) as ``term``.  The downsampled term
computes by delegating to the original term; repeatedly calling its
``compute`` method with length-1 date ranges.

Downsampled terms take advantage of a new ``compute_extra_rows`` Term
method, which allows terms to dynamically request that additional extra
rows of themselves be computed based on the dates for which they're
being computed.  This ensures, for example, that a monthly-downsampled
term always computes at the start of a month, even when a
naively-calculated pipeline window would end in the middle of the month.
2016-08-17 16:52:09 -04:00
Scott Sanderson 2d02431e6d MAINT: Add alt-constructor for NoFurtherDataError. 2016-08-17 16:52:09 -04:00
Scott Sanderson 0f4964fdfa MAINT: Clean up WithTradingSessions.
- Add WithDefaultDateBounds, since we use alias('START_DATE') and
  alias ('END_DATE').

- Fix copypasta in assertion.
2016-08-17 16:52:09 -04:00
Scott Sanderson fecfca9c59 ENH: Add numpy_utils.changed_locations. 2016-08-17 16:52:09 -04:00
Scott Sanderson 10ab8dc875 MAINT: Remove double import. 2016-08-17 16:52:09 -04:00
Scott Sanderson 1e7b566ed7 MAINT: Add nearest_unequal_elements.. 2016-08-17 16:52:09 -04:00
Scott Sanderson 1444a78330 MAINT: Refactor in prep for downsampled terms.
- Split out extra_rows handling into an `ExecutionPlan` subclass.
  `ExecutionPlan` now requires the dates and calendar against which a
  set of terms will be computed, and now defers to a term's
  `compute_extra_rows` method when deciding how many extra rows are
  required to compute for that term. This will allow downsampled terms
  to request enough extra rows to guarantee that we can maintain consistent
  calculation dates.

  As a consequence of the above, `TermGraph` now only deals with logical
  dependencies, not with metadata surrounding extra row calculations.
  This means that TermGraph can be used to generate dependency
  visualizations in interactive contexts where we don't yet have a
  calendar or start/end dates.

- Refactored test_{filter,factor,classifier} to use check_terms instead
  of run_graph.  This makes it easier to make changes to TermGraph,
  since the testing interface is now to simply provide a dict of terms.

- Refactored BasePipelineTestCase to use fixtures to create an asset
  finder.  This fixes a potential leak of the test's asset db, which was
  not being explicitly cleaned up.

- Refactored test_technical to use BasePipelineTestCase.

- Added a new special term, `InputDates()`, which can be used to request
  date labels for inputs.  Like `AssetExists`, `InputDates` is provided
  in the initial workspace by default.

- Added a default (failing) `_compute` method to `AssetExists` which
  provides a more useful error than AttributeError.
2016-08-17 16:52:09 -04:00
Scott Sanderson 62d69db7f6 MAINT: Remove empty inputs from BoundColumn.
They belong on LoadableTerm instead.
2016-08-17 16:52:09 -04:00
Scott Sanderson 5107906413 ENH: Add as_column to numpy_utils. 2016-08-17 16:52:09 -04:00