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
Quantopian Pairs Trading Algo - Deprecation Fix #1550
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When in python2.7, and unicode_literals is imported type check will raise error because 'type' is not str but unicode
and corresponding tests
Remove module scope invocations of `get_calendar('NYSE')`, which cuts zipline import time in half on my machine. This make the zipline CLI noticeably more responsive, and it reduces memory consumed at import time from 130MB to 90MB. Before: $ time python -c 'import zipline' real 0m1.262s user 0m1.128s sys 0m0.120s After: $ time python -c 'import zipline' real 0m0.676s user 0m0.536s sys 0m0.132s
Symbol lookup raises
MAINT: remove __getitem__ as alias of __getattr__
…me-from-pushing-this-commit-directly-;_; ENH: improve warning for protocol getitem
Update release notes. Generate api stubs.
REL: Prepare for 1.0.2 release.
MAINT: Update leveraged ETF list
PERF: Remove import-time calendar creations.
Post 1.0.2 cleanup.
* REF: More options before raise MultiFound. * TST: Checks corner case for fuzzy matching.
Check param string types
to 'quantopian-quandl' bundle
BUG: run_algorithm with no data source should default
This reverts commit a5ecaf4. This causes downstream problems; unsure why, Jamie advised reverting.
These were previously available like the others.
Refcount pipeline terms during execution and release terms once they're no longer needed. This dramatically reduces memory usage on large pipelines.
There have been cases where the requested start or end date is not in the history calendar. Add the beginning and of the calendar to the KeyError to give more detail to figure out root cause.
…ar-mismatch MAINT: Add more info to history calendar KeyError.
This provides a 15% speedup for an algo that calls `data.current` with 1000 every minute.
Make `__next__` and `seek` share code instead of seek() calling `__next__`. This avoids having to make a large number of integer comparisons and `asanyarray` calls when seeking more than one tick forward.
This is a dramatic speedup (~25% in local benchmarks) for history calls with a large number of assets and a short window length.
This shaves off 20 out of 160 seconds for an algorithm that makes a large number of large universe, short window_length `history()` calls.
`_get_minute_window_data` was just forwarding its input to a method with the same signature.
Avoids a couple function calls in a hot path.
Instead of using the difference between the session close of the front contract before the roll and and the open of back contract on the beginning of the roll, use the close of both at the end of the session before the roll. The closes of the session prior to roll is in lieu of settlement data.
…t-closes BUG: Use proxy for settlement on future adjustments.
Hi @ash487! It looks like this PR proposes we merge our master branch into @ssanderson 's "revamp-tutorial" branch. Is the fix you're suggesting on a branch somewhere that you want us to pull in? |
Apply offset value when writing out the rolls in a continuous future which is offset from the primary.
This boundary case was exposed with internal fixture data which used a continuous future with a contract chain of size one.
BUG: Fix continuous future history with offsets.
Micro optimizations 2
This will keep `opens`, `closes`, `early_closes`, etc to the same pattern.
MAINT: Restore @Property decorator
Rename _get_daily_window_for_sids to _get_daily_window_data. Rename _get_minute_window_for_assets to _get_minute_window_data. Rename _get_daily_data to get_daily_spot_value.
Fix microoptimizations
@ash487 I'm going to close this, but feel free to open a new PR using the branch with your fix! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Greetings Quantopian Community,
I was at the NYC Event on Pairs Trading, and the current example algorithm is deprecated, such that one cannot deploy it in live trading. With this fix, users can now deploy the algorithm in live trading.