-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
ENH: Use IEX Trading data instead of pandas-datareader #2031
Conversation
👍 on moving to the IEX api. Do we need to add an attribution somewhere? From https://iextrading.com/api-terms/:
|
MIght be worth opening an issue/asking a question on https://github.com/iexg/IEX-API. |
@ssanderson Thanks for catching that. I read that attribution comment at some point and just kinda forgot. Will open an issue there. |
Opened up an issue: https://github.com/iexg/IEX-API/issues/124 |
1e58cd2
to
8b87424
Compare
8b87424
to
c2a735b
Compare
This looks like a good change for zipline master, but FYI it still does not fix #2024. I'm getting the same KeyError using this branch and trying to run the do-nothing test algo I described in that issue through latest available close (12/1):
The loader seems to pick the wrong benchmark ending date of 11/29:
When data through 12/1 is available:
|
The issue is this line: zipline/zipline/data/loader.py Line 156 in 5421ec0
It appears to be in place because the treasury data from the Fed H15 report is a day lagged from the Quandl and IEX stock market data. In my opinion, treasury curve data should be filled through the latest available market data close rather than hold up the trading algorithm a full day behind the market. Alternatively, it appears users can implement their own |
i am calling it via zipline.data.loader.load_market_data but it throws an error at line 222 of the loader.py where first_date=first_date - trading_day. Error trying to subtract timestamp to string |
Currently version 1.1.1 is broken pending this fix getting released. Any chance we can get a conda install for 1.1.0 to keep things going in the meantime? |
Just getting started on zipline. Anxious for this branch to get implemented so the benchmarking is fixed with the IEX historical data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* ENH: Use IEX Trading data instead of pandas-datareader * MAINT: Add attribution for IEX
* ENH: Use IEX Trading data instead of pandas-datareader * MAINT: Add attribution for IEX
Got fed up with the breaking/removal of Google & Yahoo Finance APIs, and so since we've been using pandas-datareader to get data from those APIs I removed that dependency for when we want to get data for a specific benchmark (in this case
SPY
).I changed our data source to IEX which will give us up to 5 years worth of data. It has really great documentation and seems like its a lot more reliable.
Should fix:
And should be better than PR #1972