Skip to content
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

No results #128

Closed
trexthemullaman opened this issue Jan 26, 2023 · 4 comments
Closed

No results #128

trexthemullaman opened this issue Jan 26, 2023 · 4 comments

Comments

@trexthemullaman
Copy link

Running the following, simple:
from yahoofinancials import YahooFinancials

tech_stocks = ['AAPL', 'MSFT', 'INTC']
bank_stocks = ['WFC', 'BAC', 'C']

yahoo_financials_tech = YahooFinancials(tech_stocks)

yahoo_financials_banks = YahooFinancials(bank_stocks)

banks_net_ebit = yahoo_financials_banks.get_ebit()

print(yahoo_financials_tech)
print(yahoo_financials_banks)
print(banks_net_ebit)

Results are:
<yahoofinancials.yf.YahooFinancials object at 0x7fc6a02c5070>
<yahoofinancials.yf.YahooFinancials object at 0x7fc6a02db040>
{'WFC': 0, 'BAC': 0, 'C': 0}

@JECSand
Copy link
Owner

JECSand commented Jan 27, 2023

@trexthemullaman Going to attempt recreating this issue now.

@JECSand
Copy link
Owner

JECSand commented Jan 27, 2023

@trexthemullaman I'm able to replicate. I'll look into this, my initial suspicions are that Yahoo:

  1. Paywalled this info
  2. Divide up their encrypted data store
  3. Changed the labels of some of the records in the data store.

I'll post again when I know more.

@JECSand
Copy link
Owner

JECSand commented Jan 27, 2023

@trexthemullaman Yahoo Finance is now returning an ebit value of 0 unfortunately.

For now you can use this function to get data from any of the fields below:

out = self._financial_statement_data('income', 'incomeStatementHistory', 'ebit', 'annual')

where the field key can be referenced in place of 'ebit'.

Example data response from Citigroup:
{'C': [{'2022-12-31': {'researchDevelopment': None, 'effectOfAccountingCharges': None, 'incomeBeforeTax': 18807000000, 'minorityInterest': 649000000, 'netIncome': 14845000000, 'sellingGeneralAdministrative': 39118000000, 'grossProfit': 70560000000, 'ebit': 0, 'operatingIncome': 18807000000, 'otherOperatingExpenses': 12635000000, 'interestExpense': None, 'extraordinaryItems': None, 'nonRecurring': None, 'otherItems': None, 'incomeTaxExpense': 3642000000, 'totalRevenue': 70560000000, 'totalOperatingExpenses': 51753000000, 'costOfRevenue': 0, 'totalOtherIncomeExpenseNet': 0, 'discontinuedOperations': -231000000, 'netIncomeFromContinuingOps': 15165000000, 'netIncomeApplicableToCommonShares': 13465000000}}, {'2021-12-31': {'researchDevelopment': None, 'effectOfAccountingCharges': None, 'incomeBeforeTax': 27469000000, 'minorityInterest': 700000000, 'netIncome': 21952000000, 'sellingGeneralAdministrative': 36766000000, 'grossProfit': 74990000000, 'ebit': 0, 'operatingIncome': 27469000000, 'otherOperatingExpenses': 10755000000, 'interestExpense': None, 'extraordinaryItems': None, 'nonRecurring': None, 'otherItems': None, 'incomeTaxExpense': 5451000000, 'totalRevenue': 74990000000, 'totalOperatingExpenses': 47521000000, 'costOfRevenue': 0, 'totalOtherIncomeExpenseNet': 0, 'discontinuedOperations': 7000000, 'netIncomeFromContinuingOps': 22018000000, 'netIncomeApplicableToCommonShares': 20758000000}}, {'2020-12-31': {'researchDevelopment': None, 'effectOfAccountingCharges': None, 'incomeBeforeTax': 13632000000, 'minorityInterest': 758000000, 'netIncome': 11047000000, 'sellingGeneralAdministrative': 33147000000, 'grossProfit': 59572000000, 'ebit': 0, 'operatingIncome': 13632000000, 'otherOperatingExpenses': 12793000000, 'interestExpense': None, 'extraordinaryItems': None, 'nonRecurring': None, 'otherItems': None, 'incomeTaxExpense': 2525000000, 'totalRevenue': 59572000000, 'totalOperatingExpenses': 45940000000, 'costOfRevenue': 0, 'totalOtherIncomeExpenseNet': 0, 'discontinuedOperations': -20000000, 'netIncomeFromContinuingOps': 11107000000, 'netIncomeApplicableToCommonShares': 9879000000}}, {'2019-12-31': {'researchDevelopment': None, 'effectOfAccountingCharges': None, 'incomeBeforeTax': 23901000000, 'minorityInterest': 704000000, 'netIncome': 19401000000, 'sellingGeneralAdministrative': 32354000000, 'grossProfit': 66849000000, 'ebit': 0, 'operatingIncome': 23901000000, 'otherOperatingExpenses': 10594000000, 'interestExpense': None, 'extraordinaryItems': None, 'nonRecurring': None, 'otherItems': None, 'incomeTaxExpense': 4430000000, 'totalRevenue': 66849000000, 'totalOperatingExpenses': 42948000000, 'costOfRevenue': 0, 'totalOtherIncomeExpenseNet': 0, 'discontinuedOperations': -4000000, 'netIncomeFromContinuingOps': 19471000000, 'netIncomeApplicableToCommonShares': 18171000000}}]}

@JECSand
Copy link
Owner

JECSand commented Feb 14, 2023

@trexthemullaman This issue has been resolved with v1.13. We are able to get ebit data again. Let me know if you keep having issues.

@JECSand JECSand closed this as completed Feb 14, 2023
JECSand pushed a commit that referenced this issue Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants