Commit Graph

4360 Commits

Author SHA1 Message Date
Richard Frank bc87ea4efb MAINT: Consolidate coercion to sqlite conn/eng 2016-08-24 13:24:07 -04:00
Richard Frank 6d473ce23f MAINT: Clean up usage of engine versus connection 2016-08-24 13:24:07 -04:00
Eddie Hebert 7ac0978f0c Merge pull request #1431 from quantopian/spot-price-get-value
MAINT: Standardize reader get value methods.
2016-08-24 13:22:13 -04:00
Andrew Daniels acb2cf118e MAINT: Modifies minute bars to use a dict of OHLC ratios (#1428)
For scaling up pricing data before writing to bcolz, the writer now
accepts a dict mapping each sid to the ratio to use. It still accepts a
single ratio as default_ohlc_ratio, which is used as a fallback if no
mapping exists for a given sid. The default is OHLC_RATIO (1000).

This allows better handling of futures pricing data, where the required
precision across root symbols is not consistent.
2016-08-24 13:14:16 -04:00
Eddie Hebert a3c1f4ce36 MAINT: Standardize reader get value methods.
The daily/session bar reader's `spot_price` took the same parameters and
returned the same kind of output as the minute bar reader's `get_value`.

Standardize on one method to make a common interface, which may be
formally factored out in a later patch; to help enable writing reader
implementations or mixins which can be agnostic to the bar frequency.
2016-08-24 12:46:36 -04:00
Ana Ruelas 20f9241252 Merge pull request #1322 from quantopian/move_risk_calculations
Move risk calculations
2016-08-23 18:39:22 -04:00
Ana Ruelas 1f829f8c92 MAINT: Update whatsnew for empyrical changes 2016-08-23 17:02:12 -04:00
Ana Ruelas a4638026c7 TST: Rebuilt example data using empyrical 2016-08-23 13:49:48 -04:00
Ana Ruelas f0af856c13 TST: Update to empyrical, increase test coverage
ENH: Resolve rebase conflict by using updated example_data.tar

TST: Increase test coverage for risk portion of zipline
2016-08-23 13:49:43 -04:00
Ana Ruelas 902865cf71 ENH: Use qrisk to calculate risk metrics in cumulative and period
TST: Remove metric correctness testing from period and cumulative tests

ENH: Removed answer key and related files

ENH: Update qrisk version
2016-08-23 13:49:27 -04:00
Eddie Hebert 78015066c8 Merge pull request #1427 from quantopian/use-equities-calendar-in-equity-fixtures
TST: Use equity calendar when writing equity data
2016-08-23 12:15:00 -04:00
Eddie Hebert 6b2d614227 TST: Use equity calendar when writing equity data
Use the equity calendar to write equity data, even when the simulation
calendar has been set to a different calendar.

Discovered when writing a test that used a calendar for future asset
data, but also wrote equity data.
2016-08-23 11:11:32 -04:00
Richard Frank 0c12e4a5a6 Merge pull request #1426 from quantopian/really-ingest
BUG: Fixes zipline ingest with non-default bundle on python 2
2016-08-22 18:56:27 -04:00
Richard Frank f247bc8d05 BUG: Fixes zipline ingest with non-default bundle on python 2 2016-08-22 18:30:39 -04:00
Andrew Daniels 193b657bfe BUG: Fixes BcolzMinuteBarMetadata to read the version correctly (#1425)
We were mistakenly using the minute_per_day field.

We now expose from the metadata object the version from which the
metadata was read. This allows a new test that verifies the version is
read correctly.
2016-08-22 17:45:07 -04:00
Scott Sanderson 5be7e006e4 Merge pull request #1423 from quantopian/fix-sharedoc
Fix sharedoc
2016-08-22 14:51:05 -04:00
Lotanna Ezenwa 6fc5d7360d Merge pull request #1422 from quantopian/fix-ewma-constructors
BUG: Add kwargs to ewma constructors
2016-08-22 14:29:10 -04:00
Richard Frank 8af09141f9 Merge pull request #1424 from quantopian/no-more-symbols
DOC: Updated more docs to remove --symbols, which was removed
2016-08-22 13:43:56 -04:00
Richard Frank 4c2783f7ca DOC: Updated more docs to remove --symbols, which was removed 2016-08-22 13:29:16 -04:00
Scott Sanderson ae121ec1dc MAINT: Simpler impl of pad_lines_after_first. 2016-08-22 13:14:31 -04:00
LotannaEzenwa c19d2855ad Added kwargs to ewma constructors
fixed typos
2016-08-22 13:14:23 -04:00
Scott Sanderson d52ff04626 DOC: Fix docs formatting for sharedoc.
The first line of indentation was incorrect.
2016-08-22 13:01:32 -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