Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
ENH: Improved Yahoo finance api functionality #2795
Added functionality of listing stock index components via query to yahoo finance
EDIT: A few typos.
Thanks for pointing this out! I'd be glad to fix this. Just to be sure, is the concern with the signature mostly positional or keys (or both)? Being that the function now allows for multiple stock symbols, I thought it would be beneficial to have a name that reflected such, but perhaps this isn't good practice.
The function signature was previously:
get_data_yahoo(name=None, start=None, end=None, retry_count=3, pause=0)
This PR contains changes as:
get_data_yahoo(symbols=None, start=None, end=None, adjust_price=False, ret_index=False, chunk=25, pause=0, **kwargs):
Would a change to the following be sufficient?
get_data_yahoo(name=None, start=None, end=None, retry_count=3, pause=0, adjust_price=False, ret_index=False, chunk=25, pause=0, **kwargs):
When you can, let me know!
yep, keeping the old argument order and adding new ones at the end (all with defaults)
Some network related tests are marked as @slow so make sure you run the full
a note on this very issue was just added a couple of days ago:
Thanks for contributing.
Well, for back-compat, obviously both. admitadly it's rare to use named arguments
there's a bunch of that in the tree, look around.
Ah, grand. That all makes sense and that's just the type of feedback I needed. I had spent some time looking around, but hadn't caught that treatment of maintaining compatibility with older args via passing in **kwds with warning of deprecation. That's great. Also, kudos to that well written contributing doc, it helps a lot.
I'll get these changes implemented, full tested, and pushed soon! Thanks again, @y-p!
While I found it convenient, looking around the tree it didn't seem like it was common practice. There is not a default equity to point towards, perhaps, similarly, there shouldn't be a default index? Also, I didn't want to seem particularly biased towards US markets. But, if you think it's a unique case where it's better with it, I'm certainly open to the idea....