-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Enhanced the detail of the annual financial statements and added ability to check the "Analysis" url. #776
Conversation
…ill enable us to see other store types from the base.py file.
…is section of yahoo finance: current_recommendations, revenue_forecasts and earnings_forecasts.
…place self._financials. Further work required to understand if there is the opportunity to also do this for balance sheet and cf statement.
…ings with regards to "statement seems to have no effect" is because the import on this python file is yfinance (master version 1.63).
Looks like a good improvement, is it most-updated in your fork? I'd like to examine it |
I've figured out how to get accurate quarterly data. The secret is this url e.g. Problem is I don't have time to polish into a full nice feature, so I'm hoping someone can take my prototype code and finish it: https://github.com/yfinance-fork-team/yfinance-x/blob/a41aba54e8a5d0c56b928af39baffb1a221a2210/yfinance/base.py#L518-L568 Can also use url to get years of 'shares outstanding' data. |
@git-shogg I've got good news and bad news. Good news - fixing the quarterlys will be super easy. Bad news - your annual tables are still missing some rows. If you grab branch |
@ValueRaider Kudos for the debug methodology (using |
@ValueRaider, thanks for putting together that _DEV test. I've identified the root cause of the missing data but haven't yet remediated. Would it be possible to directly commit to the fix branch? |
Unless you plan on reviewing/contributing other bugs/features* then it's easiest for everyone to stick to the fork->PR model.
|
Hi team, I have updated my PR to include the fix on the missing annual table line items (commit [6c4da51]). Note that the annual income statement will still be flagged as an issue (by the _DEV test developed by @ValueRaider). This because the script is looking for "EBITDA" but the camel case function is converting to "Ebitda". Keen to get this merged to main! Let me know how you go! |
Can you refactor code in base.py, there's a lot of duplication. And fix the quarterlies? I showed how to get the data, you just need to copy in the MultiIndex. Is having a MultiIndex actually useful? I don't use financials much so honestly don't know. Those branch conflicts need to be resolved before merging. |
Hi team, I had some spare time today so I have:
The above fixes can be found in commit d65391b. In response to your question regarding the multi-index. This multi-index is super useful for parsing data into discounted cash flow analyses which are used heavily in the finance industry for valuing companies. Without the multi-index there would be onus on the yfinance users to completely understand the make-up of each and every possible parent -> child relationship of the income statement, balance sheet and cash flow statement (e.g. Current Assets include Cash and Cash Equivalents). With the multi-indexing this can be simplified for our end users as they can use this index to automatically identify parent -> child relationships in any of the financial statements. |
With the refactor I was hoping you'd move the bulk of logic into a function, or at least a loop, and loop over 'cashflow', 'balance sheet', 'income'. To minimise size of You can remove the _DEV code, that was just for you. |
Hi @ValueRaider I have made the recommended changes in the latest commit (3b18114c). |
@git-shogg I've merged into the dev branch. Will test it for a few days before sending out release. Helps if you can test too, just use it instead of PIP. Once release goes out probably many users will get confused by MultiIndex, can you keep eye on Issues to help them? |
Sure, happy to do some more testing and will keep an eye on issues. Thanks. |
Hi ranaroussi,
First and foremost, thanks for developing such an awesome tool! Given that I use this a fair bit for my own discounted cash flow analyses I figured I may as well contribute some of the enhancements that I believe will add a lot of value to end users.
There are two main changes that I have made which are accompanied by a bunch of smaller changes.
I hope that these changes can flow through to yfinance as I am really keen to see these in there.
Cheers,
Hoggie