Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Quantopian's zipline/master branch to zipline-live/master #25

Merged
merged 145 commits into from
Jun 1, 2017
Merged

Merge Quantopian's zipline/master branch to zipline-live/master #25

merged 145 commits into from
Jun 1, 2017

Conversation

tibkiss
Copy link

@tibkiss tibkiss commented Jun 1, 2017

This is the first step of moving live branch into master.
Bringing zipline-live's master in sync with Quantopian's master.

Andrew Daniels and others added 30 commits March 22, 2017 14:28
Useful for avoiding the need to create Asset objects when sids are
easier to use.

This is based off the existing implementation of StaticAssets, and
StaticAssets is now implemented as a wrapper around StaticSids.
Allow DataPortal.get_spot_value to accept multiple assets
Add ContinuousFuture to lookup_generic
The CFE was closed along with the NYSE in observation of the days of
mourning in honor of the passing of presidents Gerald Ford and Ronald
Reagan. The CFE also observed the closures due to Hurricane Sandy,
along with NYSE. Adding those adhoc holidays to exchange_calendar_cfe
and removing them from cfe.csv in tests. To fit with
USNationalDaysofMourning, also removing the closure in observation of
the day of mourning in honor of the passing of president Nixon in
1994, despite the fact that the exchange did not exist at that time.

Signed-off-by: Maxwell Rounds <maxwell.j.rounds@gmail.com>
…-test

TST: Adhoc holidays in CFEExchangeCalendar
MAINT: Add try finally block to deal with exceptions
…t-path.py

ENH: Remove path.py as its not a dependency
* ENH: Use regular rounding to calculate order amounts.

We previously tried to prevent accidental over-ordering by truncating
orders down unless they were within 1e-4 of the next higher integer.
Unfortunately, this makes it easy for a sell order to be one share short
of the desired position.

Using regular rounding treats both buys and sells in the same way.

* ENH keep non-rounding behavior consistent, but leave code structured to make easier to override

* DOC make round_order public and describe behavior in docstring
…e-cleanup

STY: Cleanup trailing whitespace in resample module.
- Instead of maintaining a separate `j` value, set the bounds of the range so
that `i` is the values emitted by the range.
- Change `close_loc` to `prev_close_loc` since the market close location is used
to ensure that the data index stops at the market open if the entire day is
nans.
- Change the setting of `loc` to be done before the loop which check for nans,
instead of setting to the previous close loc at the end of the loop.

This prepares for a separate fix to prevent out of bounds access when the first
session has nans for all minutes.
MAINT: Clear up naming and logic in resample close.
Negative indexing in cython without wraparound
Make continuous future adjustment style an argument
Should be no functional change.

By making the raise on `if not isinstance` instead of doing a continue on `if
isinstance` (with a raise at the end of the loop if no 'good' conditions were
met'), the function should be more amenable to adding an additional validity
check, after the type check passes.

This is on the path to adding an additional validity checks parameter to
`check_parameters`, e.g. adding an 'is positive' check.
Add safeguard if current contract of continuous future is None
…ty-checks

MAINT: Prepare parameter check for adding an additional check.
analicia and others added 21 commits May 19, 2017 10:48
A TypeError exception was raised with message "Cannot join tz-naive with
tz-aware DatetimeIndex". Removing old unnecessary workaround in
`holidays_at_time` function (Pandas already fixed that before 0.18)
fixes this issue.
Fix bug in TradingCalendar initialization
Add this version to the Conda build matrix and to the setup.py file.
…ailures and updated base image from python 2.7 to 3.5
…ison

MAINT: Remove __eq__ implementation from slippage
…ints_docker

DOC: Add instructions for common Docker build failures
BLD: Change url to just channel/label path
* BLD: Modify conda label for Travis CI

We've been unnecessarily building packages that are already in the ci channel because conda build isn't respecting the full URL for that channel when using --skip-existing.  We updated it to be just the name of the channel.
…k-source

ENH: Add get_range to BenchmarkSource
…pian#1816)

MAINT: Remove environment as an argument to benchmark source.

To allow the BenchmarkSource class to be more easily used in contexts other than
a TradingAlgorithm, remove the TradingEnvironment as an argument to the
benchmark source.

Instead:
- Pass a benchmark Asset, instead of a bencmark sid; so that the asset_finder
does not need to be passed to the benchmark source.
- Pass the pre-calculated benchmark_returns instead of an env,
which contains the benchmark_returns; a consumer can let the benchmark_returns
stay as the default of `None` when using an asset.

We may want to further refactor and make two different classes, instead of
relying on a combination of existence/non-existence of benchmark_asset and
benchmark_returns. That refactoring should be easier to do with this change.
BLD: Add some missing Python 3.5 references
@tibkiss
Copy link
Author

tibkiss commented Jun 1, 2017

Tests are failing due to PEP8 problems in live_demo.py:
https://travis-ci.org/zipline-live/zipline/jobs/238201764#L1174

@pbharrin : do you mind if I remove that file?

@pbharrin
Copy link

pbharrin commented Jun 1, 2017

@tibkiss you can remove live_demo.py, it is no longer needed.

@coveralls
Copy link

coveralls commented Jun 1, 2017

Coverage Status

Changes Unknown when pulling 5cb266a on tibkiss:merge_upstream_20170601 into ** on zipline-live:master**.

@bartosh bartosh merged commit 1fc9f86 into zipline-live:master Jun 1, 2017
@tibkiss tibkiss deleted the merge_upstream_20170601 branch June 1, 2017 16:14
@tibkiss
Copy link
Author

tibkiss commented Jun 1, 2017

Thanks for merging, Ed!

@bartosh
Copy link

bartosh commented Jun 1, 2017

btw, are you going to rebase live branch the same way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.