-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Updated pandas.io.data.Options #2758
Conversation
…from my local test file and I just caught it
Hey @spencerlyon2 , nice work! I am looking forward to this pull request being accepted. In the meantime, I am also working on a few incremental advances to functionality with the Yahoo! Finance API (I haven't yet submitted a PR). I wanted to see if anyone else was working in this area, came across your PR, and had a few questions, if you don't mind. :)
price = float(get_quote_yahoo([self.symbol])['last']) Any plans to change the returned parameter from this function soon? I ask because, along with expanding type checking capabilities to input parameter,
Thanks! Edit: Reworded question for clarity. |
I actually have been thinking about creating a Yahoo class that would be able to get any information easily downloadable from yahoo using one of the
I was thinking of having the docstrings inform the user of what items they could request and then we could use a dictionary to pull the codes out and return the data they asked for. In response to your comments: 1.) I am not sure I understand your question about line 531, but I just call 2.) I would be happy to include some test coverage in test_yahoo. I haven't written nosetest modules before so if you have or would like to learn how feel free to do it. If not, let me know and I will dig around until I figure it out. What are you working on as far as the yahoo finance API is concerned? |
Hey @spencerlyon2, thanks for the reply. I am working on a few features and throwing in some convenience functions, namely to easily retrieve stock index components and allow for easier retrieval and creation of df with multiple stocks. Also, I'll back it all up with a few tests. I'll hope to getting around to pushing to my fork later today and later a PR, so you can see what I am doing. While implementing these features, I also found that there was a whole lot more that can be improved on. Namely, the namespace of the Conclusion: we should team up and make this happen! If you like, let's just do one more iteration of hashing out our ideas, and after I'll submit a feature request, which we can work on. I think this feedback—from repo maintainers and the pandas community at large in giving a little insight as to how they envision development around this area advancing—would be beneficial before we get too crazy in development. For instance, I know that there isn't too much love for Let me know what you think! |
@nehalecky It would be great to see what you have done. I'm happy to work with you on enhancing this. I think the first step would be for me to see what you are doing. Then I think we can have a better idea for the design of the Yahoo class. I will try to consolidate my ideas in a concise list here:
Anyway, those are some of my ideas. What would you add/take away from this? |
Hey @spencerlyon2! Sorry for the delay in the reply, busy weekend. I finally was able to get my code pushed and already submitted a PR here: #2795. Pretty basic, most of the changes, but I think it's a start and we can use it later in the Yahoo class. I do really like your ideas regarding this class, and you can see that some of that functionality of multiple tickers I was already working towards. Right now it returns a panel, but we can change that to whatever we feel best. Also, looking over a lot of the nice work being done with database connectivity in I don't work with either data service directly, but suspect the types of queries for financial applications are similar across the board, just as is the case with databases. This might allow someone then to simply instantiate the finance data class with whatever data flavor and behind the scenes, all is configured for interaction with the data flavor service. This could be quite a bit of work, and perhaps not even useful. I'll hope that others will comment on this. Let me know what you think of this and when you get a moment, take at look at the code! Any suggestions are appreciated! Thanks! |
Merged. If you could make a PR to the release notes and/or documentation (including the "what's new" page) that would be great. thanks |
I have written a quick summary in the "what's new" document. I'll attach to a pull request today. The source is documented well enough that we could create class documentation directly from data.py. I know this is possible, but haven't done it before. I could spend some time looking it up, or if someone else already knows how to do this, and is up for it, I'd appreciate them doing it. |
pretty sure The rest of the docs have a tutorial style, with embedded usage examples, and is Sphinx Is very copy-paste friendly, you can copy and adapt an existing Feel free to yell if you hit a snag. |
Mostly housekeeping, but there were a few functionality additions:
Options.get_xxx_data()
, where xxx is eitheroptions
,call
, orput
, a new instance variable is created. For current month options the variable is simplyself.calls
orself.puts
. When future month data is retrieved the ivar becomesself.callsMMYY
orself.putsMMYY
.Options.get_near_stock_price
now allows the user to specify optionalmonth
andyear
kwargs to get data near the stock price for a given expiry date.Options.get_forward_data
now has optional kwargsnear
andabove_below
. This allows the user to specify if they would like to only return forward looking data for options near the current stock price. This just obtains the data fromOptions.get_near_stock_price
instead ofOptions.get_xxx_data()
.