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

Missing recent quarterly data #6

Open
joshfester opened this issue Jul 2, 2023 · 9 comments
Open

Missing recent quarterly data #6

joshfester opened this issue Jul 2, 2023 · 9 comments

Comments

@joshfester
Copy link

First of all, thank you so much for making this gem. I thought python was going to be my only option before I found this.

When getting the cashflowStatementHistoryQuarterly and incomeStatementHistoryQuarterly modules, the most recent quarter is all empty data. The other three quarters look normal. Any idea what could cause this? I tried out the yfinance python library to see if they had the same issue, but that one seems to be working. Any idea what could cause this?

@brigriffin
Copy link
Member

Hi @joshfester, thank you and glad you find this gem useful.
I checked quickly and everything seems to work fine. Both the quarterly income statement and cash flow statement for Q2 are not available yet through their website so I wouldn't expect it to be available through their API. It must be juts a matter of time and I would suggest you to try a few days later.

@joshfester
Copy link
Author

joshfester commented Jul 3, 2023

Here's what I'm seeing with every ticker I've tried. I used AAPL as an example. Here's what I get from this gem:

{ "AAPL":{ "incomeStatementHistory":[ { "maxAge":1, "endDate":{ "raw":1680307200, "fmt":"2023-04-01" }, "totalRevenue":{ "raw":0, "fmt":null, "longFmt":"0" }, "costOfRevenue":{ "raw":0, "fmt":null, "longFmt":"0" }, "grossProfit":{ "raw":0, "fmt":null, "longFmt":"0" }, "researchDevelopment":{ }, "sellingGeneralAdministrative":{ }, "nonRecurring":{ }, "otherOperatingExpenses":{ }, "totalOperatingExpenses":{ "raw":0, "fmt":null, "longFmt":"0" }, "operatingIncome":{ }, "totalOtherIncomeExpenseNet":{ "raw":0, "fmt":null, "longFmt":"0" }, "ebit":{ "raw":0, "fmt":null, "longFmt":"0" }, "interestExpense":{ }, "incomeBeforeTax":{ }, "incomeTaxExpense":{ "raw":0, "fmt":null, "longFmt":"0" }, "minorityInterest":{ }, "netIncomeFromContinuingOps":{ }, "discontinuedOperations":{ }, "extraordinaryItems":{ }, "effectOfAccountingCharges":{ }, "otherItems":{ }, "netIncome":{ "raw":0, "fmt":null, "longFmt":"0" }, "netIncomeApplicableToCommonShares":{ } }, { "maxAge":1, "endDate":{ "raw":1672444800, "fmt":"2022-12-31" }, "totalRevenue":{ "raw":117154000000, "fmt":"117.15B", "longFmt":"117,154,000,000" }, "costOfRevenue":{ "raw":66822000000, "fmt":"66.82B", "longFmt":"66,822,000,000" }, "grossProfit":{ "raw":50332000000, "fmt":"50.33B", "longFmt":"50,332,000,000" }, "researchDevelopment":{ "raw":7709000000, "fmt":"7.71B", "longFmt":"7,709,000,000" }, "sellingGeneralAdministrative":{ "raw":6607000000, "fmt":"6.61B", "longFmt":"6,607,000,000" }, "nonRecurring":{ }, "otherOperatingExpenses":{ }, "totalOperatingExpenses":{ "raw":81138000000, "fmt":"81.14B", "longFmt":"81,138,000,000" }, "operatingIncome":{ "raw":36016000000, "fmt":"36.02B", "longFmt":"36,016,000,000" }, "totalOtherIncomeExpenseNet":{ "raw":-393000000, "fmt":"-393M", "longFmt":"-393,000,000" }, "ebit":{ "raw":36016000000, "fmt":"36.02B", "longFmt":"36,016,000,000" }, "interestExpense":{ "raw":-1003000000, "fmt":"-1B", "longFmt":"-1,003,000,000" }, "incomeBeforeTax":{ "raw":35623000000, "fmt":"35.62B", "longFmt":"35,623,000,000" }, "incomeTaxExpense":{ "raw":5625000000, "fmt":"5.62B", "longFmt":"5,625,000,000" }, "minorityInterest":{ }, "netIncomeFromContinuingOps":{ "raw":29998000000, "fmt":"30B", "longFmt":"29,998,000,000" }, "discontinuedOperations":{ }, "extraordinaryItems":{ }, "effectOfAccountingCharges":{ }, "otherItems":{ }, "netIncome":{ "raw":29998000000, "fmt":"30B", "longFmt":"29,998,000,000" }, "netIncomeApplicableToCommonShares":{ "raw":29998000000, "fmt":"30B", "longFmt":"29,998,000,000" } }, { "maxAge":1, "endDate":{ "raw":1663977600, "fmt":"2022-09-24" }, "totalRevenue":{ "raw":90146000000, "fmt":"90.15B", "longFmt":"90,146,000,000" }, "costOfRevenue":{ "raw":52051000000, "fmt":"52.05B", "longFmt":"52,051,000,000" }, "grossProfit":{ "raw":38095000000, "fmt":"38.09B", "longFmt":"38,095,000,000" }, "researchDevelopment":{ "raw":6761000000, "fmt":"6.76B", "longFmt":"6,761,000,000" }, "sellingGeneralAdministrative":{ "raw":6440000000, "fmt":"6.44B", "longFmt":"6,440,000,000" }, "nonRecurring":{ }, "otherOperatingExpenses":{ }, "totalOperatingExpenses":{ "raw":65252000000, "fmt":"65.25B", "longFmt":"65,252,000,000" }, "operatingIncome":{ "raw":24894000000, "fmt":"24.89B", "longFmt":"24,894,000,000" }, "totalOtherIncomeExpenseNet":{ "raw":-237000000, "fmt":"-237M", "longFmt":"-237,000,000" }, "ebit":{ "raw":24894000000, "fmt":"24.89B", "longFmt":"24,894,000,000" }, "interestExpense":{ "raw":-827000000, "fmt":"-827M", "longFmt":"-827,000,000" }, "incomeBeforeTax":{ "raw":24657000000, "fmt":"24.66B", "longFmt":"24,657,000,000" }, "incomeTaxExpense":{ "raw":3936000000, "fmt":"3.94B", "longFmt":"3,936,000,000" }, "minorityInterest":{ }, "netIncomeFromContinuingOps":{ "raw":20721000000, "fmt":"20.72B", "longFmt":"20,721,000,000" }, "discontinuedOperations":{ }, "extraordinaryItems":{ }, "effectOfAccountingCharges":{ }, "otherItems":{ }, "netIncome":{ "raw":20721000000, "fmt":"20.72B", "longFmt":"20,721,000,000" }, "netIncomeApplicableToCommonShares":{ "raw":20721000000, "fmt":"20.72B", "longFmt":"20,721,000,000" } }, { "maxAge":1, "endDate":{ "raw":1656115200, "fmt":"2022-06-25" }, "totalRevenue":{ "raw":82959000000, "fmt":"82.96B", "longFmt":"82,959,000,000" }, "costOfRevenue":{ "raw":47074000000, "fmt":"47.07B", "longFmt":"47,074,000,000" }, "grossProfit":{ "raw":35885000000, "fmt":"35.88B", "longFmt":"35,885,000,000" }, "researchDevelopment":{ "raw":6797000000, "fmt":"6.8B", "longFmt":"6,797,000,000" }, "sellingGeneralAdministrative":{ "raw":6012000000, "fmt":"6.01B", "longFmt":"6,012,000,000" }, "nonRecurring":{ }, "otherOperatingExpenses":{ }, "totalOperatingExpenses":{ "raw":59883000000, "fmt":"59.88B", "longFmt":"59,883,000,000" }, "operatingIncome":{ "raw":23076000000, "fmt":"23.08B", "longFmt":"23,076,000,000" }, "totalOtherIncomeExpenseNet":{ "raw":-10000000, "fmt":"-10M", "longFmt":"-10,000,000" }, "ebit":{ "raw":23076000000, "fmt":"23.08B", "longFmt":"23,076,000,000" }, "interestExpense":{ "raw":-719000000, "fmt":"-719M", "longFmt":"-719,000,000" }, "incomeBeforeTax":{ "raw":23066000000, "fmt":"23.07B", "longFmt":"23,066,000,000" }, "incomeTaxExpense":{ "raw":3624000000, "fmt":"3.62B", "longFmt":"3,624,000,000" }, "minorityInterest":{ }, "netIncomeFromContinuingOps":{ "raw":19442000000, "fmt":"19.44B", "longFmt":"19,442,000,000" }, "discontinuedOperations":{ }, "extraordinaryItems":{ }, "effectOfAccountingCharges":{ }, "otherItems":{ }, "netIncome":{ "raw":19442000000, "fmt":"19.44B", "longFmt":"19,442,000,000" }, "netIncomeApplicableToCommonShares":{ "raw":19442000000, "fmt":"19.44B", "longFmt":"19,442,000,000" } } ], "maxAge":86400 } }

Here's what I get from the yfinance python package:

{ "1680220800000":{ "Tax Effect Of Unusual Items":0.0, "Tax Rate For Calcs":0.148756, "Normalized EBITDA":31216000000.0, "Net Income From Continuing Operation Net Minority Interest":24160000000.0, "Reconciled Depreciation":2898000000.0, "Reconciled Cost Of Revenue":52860000000.0, "EBIT":28318000000.0, "Net Interest Income":-12000000.0, "Interest Expense":930000000.0, "Interest Income":918000000.0, "Normalized Income":24160000000.0, "Net Income From Continuing And Discontinued Operation":24160000000.0, "Total Expenses":66518000000.0, "Total Operating Income As Reported":28318000000.0, "Diluted Average Shares":15847050000.0, "Basic Average Shares":15787154000.0, "Diluted EPS":1.52, "Basic EPS":1.53, "Diluted NI Availto Com Stockholders":24160000000.0, "Net Income Common Stockholders":24160000000.0, "Net Income":24160000000.0, "Net Income Including Noncontrolling Interests":24160000000.0, "Net Income Continuous Operations":24160000000.0, "Tax Provision":4222000000.0, "Pretax Income":28382000000.0, "Other Income Expense":64000000.0, "Other Non Operating Income Expenses":64000000.0, "Net Non Operating Interest Income Expense":-12000000.0, "Interest Expense Non Operating":930000000.0, "Interest Income Non Operating":918000000.0, "Operating Income":28318000000.0, "Operating Expense":13658000000.0, "Research And Development":7457000000.0, "Selling General And Administration":6201000000.0, "Gross Profit":41976000000.0, "Cost Of Revenue":52860000000.0, "Total Revenue":94836000000.0, "Operating Revenue":94836000000.0 }, "1672444800000":{ "Tax Effect Of Unusual Items":0.0, "Tax Rate For Calcs":0.157904, "Normalized EBITDA":38932000000.0, "Net Income From Continuing Operation Net Minority Interest":29998000000.0, "Reconciled Depreciation":2916000000.0, "Reconciled Cost Of Revenue":66822000000.0, "EBIT":36016000000.0, "Net Interest Income":-135000000.0, "Interest Expense":1003000000.0, "Interest Income":868000000.0, "Normalized Income":29998000000.0, "Net Income From Continuing And Discontinued Operation":29998000000.0, "Total Expenses":81138000000.0, "Total Operating Income As Reported":36016000000.0, "Diluted Average Shares":15955718000.0, "Basic Average Shares":15892723000.0, "Diluted EPS":1.88, "Basic EPS":1.89, "Diluted NI Availto Com Stockholders":29998000000.0, "Net Income Common Stockholders":29998000000.0, "Net Income":29998000000.0, "Net Income Including Noncontrolling Interests":29998000000.0, "Net Income Continuous Operations":29998000000.0, "Tax Provision":5625000000.0, "Pretax Income":35623000000.0, "Other Income Expense":-393000000.0, "Other Non Operating Income Expenses":-393000000.0, "Net Non Operating Interest Income Expense":-135000000.0, "Interest Expense Non Operating":1003000000.0, "Interest Income Non Operating":868000000.0, "Operating Income":36016000000.0, "Operating Expense":14316000000.0, "Research And Development":7709000000.0, "Selling General And Administration":6607000000.0, "Gross Profit":50332000000.0, "Cost Of Revenue":66822000000.0, "Total Revenue":117154000000.0, "Operating Revenue":117154000000.0 }, "1664496000000":{ "Tax Effect Of Unusual Items":0.0, "Tax Rate For Calcs":0.15963, "Normalized EBITDA":27759000000.0, "Net Income From Continuing Operation Net Minority Interest":20721000000.0, "Reconciled Depreciation":2865000000.0, "Reconciled Cost Of Revenue":52051000000.0, "EBIT":24894000000.0, "Net Interest Income":-74000000.0, "Interest Expense":827000000.0, "Interest Income":753000000.0, "Normalized Income":20721000000.0, "Net Income From Continuing And Discontinued Operation":20721000000.0, "Total Expenses":65252000000.0, "Total Operating Income As Reported":24894000000.0, "Diluted Average Shares":16118465000.0, "Basic Average Shares":16030382000.0, "Diluted EPS":1.29, "Basic EPS":1.29, "Diluted NI Availto Com Stockholders":20721000000.0, "Net Income Common Stockholders":20721000000.0, "Net Income":20721000000.0, "Net Income Including Noncontrolling Interests":20721000000.0, "Net Income Continuous Operations":20721000000.0, "Tax Provision":3936000000.0, "Pretax Income":24657000000.0, "Other Income Expense":-237000000.0, "Other Non Operating Income Expenses":-237000000.0, "Net Non Operating Interest Income Expense":-74000000.0, "Interest Expense Non Operating":827000000.0, "Interest Income Non Operating":753000000.0, "Operating Income":24894000000.0, "Operating Expense":13201000000.0, "Research And Development":6761000000.0, "Selling General And Administration":6440000000.0, "Gross Profit":38095000000.0, "Cost Of Revenue":52051000000.0, "Total Revenue":90146000000.0, "Operating Revenue":90146000000.0 }, "1656547200000":{ "Tax Effect Of Unusual Items":0.0, "Tax Rate For Calcs":0.157114, "Normalized EBITDA":25881000000.0, "Net Income From Continuing Operation Net Minority Interest":19442000000.0, "Reconciled Depreciation":2805000000.0, "Reconciled Cost Of Revenue":47074000000.0, "EBIT":23076000000.0, "Net Interest Income":3000000.0, "Interest Expense":719000000.0, "Interest Income":722000000.0, "Normalized Income":19442000000.0, "Net Income From Continuing And Discontinued Operation":19442000000.0, "Total Expenses":59883000000.0, "Total Operating Income As Reported":23076000000.0, "Diluted Average Shares":16262203000.0, "Basic Average Shares":16162945000.0, "Diluted EPS":1.2, "Basic EPS":1.2, "Diluted NI Availto Com Stockholders":19442000000.0, "Net Income Common Stockholders":19442000000.0, "Net Income":19442000000.0, "Net Income Including Noncontrolling Interests":19442000000.0, "Net Income Continuous Operations":19442000000.0, "Tax Provision":3624000000.0, "Pretax Income":23066000000.0, "Other Income Expense":-10000000.0, "Other Non Operating Income Expenses":-10000000.0, "Net Non Operating Interest Income Expense":3000000.0, "Interest Expense Non Operating":719000000.0, "Interest Income Non Operating":722000000.0, "Operating Income":23076000000.0, "Operating Expense":12809000000.0, "Research And Development":6797000000.0, "Selling General And Administration":6012000000.0, "Gross Profit":35885000000.0, "Cost Of Revenue":47074000000.0, "Total Revenue":82959000000.0, "Operating Revenue":82959000000.0 } }

The most recent quarter from this gem shows zero for everything, while the yfinance package shows data that matches what I see on the Yahoo Finance website (e.g. 94,836,000 total revenue for quarter ending 3/31/2023). This gem also shows a different date for the most recent quarter (2023-04-01)

@brigriffin
Copy link
Member

Thank you for the example. Could you paste here relevant line(s) of code you use for this query?

@joshfester
Copy link
Author

joshfester commented Jul 9, 2023

Sure, it was just a very basic demo to see if the data was working:

require "basic_yahoo_finance"
query = BasicYahooFinance::Query.new
data = query.quotes('AAPL', 'incomeStatementHistoryQuarterly')
pp data

And this for cashflows

require "basic_yahoo_finance"
query = BasicYahooFinance::Query.new
data = query.quotes('AAPL', 'cashflowStatementHistoryQuarterly')
pp data

@brigriffin
Copy link
Member

@joshfester we just released version 0.5.1 of the gem in order to revert back to a previous version of the API. Could you check if this changes anything from your side?

Could you also try p instead of pp when outputing the data?

@joshfester
Copy link
Author

Switched to p instead of pp. Looks like it's still the same issue with 0.5.1. Here's incomeStatementHistoryQuarterly:

{"AAPL"=>{"incomeStatementHistory"=>[{"maxAge"=>1, "endDate"=>{"raw"=>1680307200, "fmt"=>"2023-04-01"}, "totalRevenue"=>{"raw"=>0, "fmt"=>nil, "longFmt"=>"0"}, "costOfRevenue"=>{"raw"=>0, "fmt"=>nil, "longFmt"=>"0"}, "grossProfit"=>{"raw"=>0, "fmt"=>nil, "longFmt"=>"0"}, "researchDevelopment"=>{}, "sellingGeneralAdministrative"=>{}, "nonRecurring"=>{}, "otherOperatingExpenses"=>{}, "totalOperatingExpenses"=>{"raw"=>0, "fmt"=>nil, "longFmt"=>"0"}, "operatingIncome"=>{}, "totalOtherIncomeExpenseNet"=>{"raw"=>0, "fmt"=>nil, "longFmt"=>"0"}, "ebit"=>{"raw"=>0, "fmt"=>nil, "longFmt"=>"0"}, "interestExpense"=>{}, "incomeBeforeTax"=>{}, "incomeTaxExpense"=>{"raw"=>0, "fmt"=>nil, "longFmt"=>"0"}, "minorityInterest"=>{}, "netIncomeFromContinuingOps"=>{}, "discontinuedOperations"=>{}, "extraordinaryItems"=>{}, "effectOfAccountingCharges"=>{}, "otherItems"=>{}, "netIncome"=>{"raw"=>0, "fmt"=>nil, "longFmt"=>"0"}, "netIncomeApplicableToCommonShares"=>{}}, {"maxAge"=>1, "endDate"=>{"raw"=>1672444800, "fmt"=>"2022-12-31"}, "totalRevenue"=>{"raw"=>117154000000, "fmt"=>"117.15B", "longFmt"=>"117,154,000,000"}, "costOfRevenue"=>{"raw"=>66822000000, "fmt"=>"66.82B", "longFmt"=>"66,822,000,000"}, "grossProfit"=>{"raw"=>50332000000, "fmt"=>"50.33B", "longFmt"=>"50,332,000,000"}, "researchDevelopment"=>{"raw"=>7709000000, "fmt"=>"7.71B", "longFmt"=>"7,709,000,000"}, "sellingGeneralAdministrative"=>{"raw"=>6607000000, "fmt"=>"6.61B", "longFmt"=>"6,607,000,000"}, "nonRecurring"=>{}, "otherOperatingExpenses"=>{}, "totalOperatingExpenses"=>{"raw"=>81138000000, "fmt"=>"81.14B", "longFmt"=>"81,138,000,000"}, "operatingIncome"=>{"raw"=>36016000000, "fmt"=>"36.02B", "longFmt"=>"36,016,000,000"}, "totalOtherIncomeExpenseNet"=>{"raw"=>-393000000, "fmt"=>"-393M", "longFmt"=>"-393,000,000"}, "ebit"=>{"raw"=>36016000000, "fmt"=>"36.02B", "longFmt"=>"36,016,000,000"}, "interestExpense"=>{"raw"=>-1003000000, "fmt"=>"-1B", "longFmt"=>"-1,003,000,000"}, "incomeBeforeTax"=>{"raw"=>35623000000, "fmt"=>"35.62B", "longFmt"=>"35,623,000,000"}, "incomeTaxExpense"=>{"raw"=>5625000000, "fmt"=>"5.62B", "longFmt"=>"5,625,000,000"}, "minorityInterest"=>{}, "netIncomeFromContinuingOps"=>{"raw"=>29998000000, "fmt"=>"30B", "longFmt"=>"29,998,000,000"}, "discontinuedOperations"=>{}, "extraordinaryItems"=>{}, "effectOfAccountingCharges"=>{}, "otherItems"=>{}, "netIncome"=>{"raw"=>29998000000, "fmt"=>"30B", "longFmt"=>"29,998,000,000"}, "netIncomeApplicableToCommonShares"=>{"raw"=>29998000000, "fmt"=>"30B", "longFmt"=>"29,998,000,000"}}, {"maxAge"=>1, "endDate"=>{"raw"=>1663977600, "fmt"=>"2022-09-24"}, "totalRevenue"=>{"raw"=>90146000000, "fmt"=>"90.15B", "longFmt"=>"90,146,000,000"}, "costOfRevenue"=>{"raw"=>52051000000, "fmt"=>"52.05B", "longFmt"=>"52,051,000,000"}, "grossProfit"=>{"raw"=>38095000000, "fmt"=>"38.09B", "longFmt"=>"38,095,000,000"}, "researchDevelopment"=>{"raw"=>6761000000, "fmt"=>"6.76B", "longFmt"=>"6,761,000,000"}, "sellingGeneralAdministrative"=>{"raw"=>6440000000, "fmt"=>"6.44B", "longFmt"=>"6,440,000,000"}, "nonRecurring"=>{}, "otherOperatingExpenses"=>{}, "totalOperatingExpenses"=>{"raw"=>65252000000, "fmt"=>"65.25B", "longFmt"=>"65,252,000,000"}, "operatingIncome"=>{"raw"=>24894000000, "fmt"=>"24.89B", "longFmt"=>"24,894,000,000"}, "totalOtherIncomeExpenseNet"=>{"raw"=>-237000000, "fmt"=>"-237M", "longFmt"=>"-237,000,000"}, "ebit"=>{"raw"=>24894000000, "fmt"=>"24.89B", "longFmt"=>"24,894,000,000"}, "interestExpense"=>{"raw"=>-827000000, "fmt"=>"-827M", "longFmt"=>"-827,000,000"}, "incomeBeforeTax"=>{"raw"=>24657000000, "fmt"=>"24.66B", "longFmt"=>"24,657,000,000"}, "incomeTaxExpense"=>{"raw"=>3936000000, "fmt"=>"3.94B", "longFmt"=>"3,936,000,000"}, "minorityInterest"=>{}, "netIncomeFromContinuingOps"=>{"raw"=>20721000000, "fmt"=>"20.72B", "longFmt"=>"20,721,000,000"}, "discontinuedOperations"=>{}, "extraordinaryItems"=>{}, "effectOfAccountingCharges"=>{}, "otherItems"=>{}, "netIncome"=>{"raw"=>20721000000, "fmt"=>"20.72B", "longFmt"=>"20,721,000,000"}, "netIncomeApplicableToCommonShares"=>{"raw"=>20721000000, "fmt"=>"20.72B", "longFmt"=>"20,721,000,000"}}, {"maxAge"=>1, "endDate"=>{"raw"=>1656115200, "fmt"=>"2022-06-25"}, "totalRevenue"=>{"raw"=>82959000000, "fmt"=>"82.96B", "longFmt"=>"82,959,000,000"}, "costOfRevenue"=>{"raw"=>47074000000, "fmt"=>"47.07B", "longFmt"=>"47,074,000,000"}, "grossProfit"=>{"raw"=>35885000000, "fmt"=>"35.88B", "longFmt"=>"35,885,000,000"}, "researchDevelopment"=>{"raw"=>6797000000, "fmt"=>"6.8B", "longFmt"=>"6,797,000,000"}, "sellingGeneralAdministrative"=>{"raw"=>6012000000, "fmt"=>"6.01B", "longFmt"=>"6,012,000,000"}, "nonRecurring"=>{}, "otherOperatingExpenses"=>{}, "totalOperatingExpenses"=>{"raw"=>59883000000, "fmt"=>"59.88B", "longFmt"=>"59,883,000,000"}, "operatingIncome"=>{"raw"=>23076000000, "fmt"=>"23.08B", "longFmt"=>"23,076,000,000"}, "totalOtherIncomeExpenseNet"=>{"raw"=>-10000000, "fmt"=>"-10M", "longFmt"=>"-10,000,000"}, "ebit"=>{"raw"=>23076000000, "fmt"=>"23.08B", "longFmt"=>"23,076,000,000"}, "interestExpense"=>{"raw"=>-719000000, "fmt"=>"-719M", "longFmt"=>"-719,000,000"}, "incomeBeforeTax"=>{"raw"=>23066000000, "fmt"=>"23.07B", "longFmt"=>"23,066,000,000"}, "incomeTaxExpense"=>{"raw"=>3624000000, "fmt"=>"3.62B", "longFmt"=>"3,624,000,000"}, "minorityInterest"=>{}, "netIncomeFromContinuingOps"=>{"raw"=>19442000000, "fmt"=>"19.44B", "longFmt"=>"19,442,000,000"}, "discontinuedOperations"=>{}, "extraordinaryItems"=>{}, "effectOfAccountingCharges"=>{}, "otherItems"=>{}, "netIncome"=>{"raw"=>19442000000, "fmt"=>"19.44B", "longFmt"=>"19,442,000,000"}, "netIncomeApplicableToCommonShares"=>{"raw"=>19442000000, "fmt"=>"19.44B", "longFmt"=>"19,442,000,000"}}], "maxAge"=>86400}}

And here's cashflowStatementHistoryQuarterly:

{"AAPL"=>{"cashflowStatements"=>[{"maxAge"=>1, "endDate"=>{"raw"=>1680307200, "fmt"=>"2023-04-01"}, "netIncome"=>{"raw"=>0, "fmt"=>nil, "longFmt"=>"0"}, "changeToLiabilities"=>{"raw"=>0, "fmt"=>nil, "longFmt"=>"0"}}, {"maxAge"=>1, "endDate"=>{"raw"=>1672444800, "fmt"=>"2022-12-31"}, "netIncome"=>{"raw"=>29998000000, "fmt"=>"30B", "longFmt"=>"29,998,000,000"}, "depreciation"=>{"raw"=>2916000000, "fmt"=>"2.92B", "longFmt"=>"2,916,000,000"}, "changeToNetincome"=>{"raw"=>2588000000, "fmt"=>"2.59B", "longFmt"=>"2,588,000,000"}, "changeToAccountReceivables"=>{"raw"=>4275000000, "fmt"=>"4.28B", "longFmt"=>"4,275,000,000"}, "changeToLiabilities"=>{"raw"=>-5944000000, "fmt"=>"-5.94B", "longFmt"=>"-5,944,000,000"}, "changeToInventory"=>{"raw"=>-1807000000, "fmt"=>"-1.81B", "longFmt"=>"-1,807,000,000"}, "changeToOperatingActivities"=>{"raw"=>1979000000, "fmt"=>"1.98B", "longFmt"=>"1,979,000,000"}, "totalCashFromOperatingActivities"=>{"raw"=>34005000000, "fmt"=>"34.01B", "longFmt"=>"34,005,000,000"}, "capitalExpenditures"=>{"raw"=>-3787000000, "fmt"=>"-3.79B", "longFmt"=>"-3,787,000,000"}, "investments"=>{"raw"=>2483000000, "fmt"=>"2.48B", "longFmt"=>"2,483,000,000"}, "otherCashflowsFromInvestingActivities"=>{"raw"=>-141000000, "fmt"=>"-141M", "longFmt"=>"-141,000,000"}, "totalCashflowsFromInvestingActivities"=>{"raw"=>-1445000000, "fmt"=>"-1.45B", "longFmt"=>"-1,445,000,000"}, "dividendsPaid"=>{"raw"=>-3768000000, "fmt"=>"-3.77B", "longFmt"=>"-3,768,000,000"}, "netBorrowings"=>{"raw"=>-9615000000, "fmt"=>"-9.62B", "longFmt"=>"-9,615,000,000"}, "otherCashflowsFromFinancingActivities"=>{"raw"=>-389000000, "fmt"=>"-389M", "longFmt"=>"-389,000,000"}, "totalCashFromFinancingActivities"=>{"raw"=>-35563000000, "fmt"=>"-35.56B", "longFmt"=>"-35,563,000,000"}, "changeInCash"=>{"raw"=>-3003000000, "fmt"=>"-3B", "longFmt"=>"-3,003,000,000"}, "repurchaseOfStock"=>{"raw"=>-21791000000, "fmt"=>"-21.79B", "longFmt"=>"-21,791,000,000"}}, {"maxAge"=>1, "endDate"=>{"raw"=>1663977600, "fmt"=>"2022-09-24"}, "netIncome"=>{"raw"=>20721000000, "fmt"=>"20.72B", "longFmt"=>"20,721,000,000"}, "depreciation"=>{"raw"=>2865000000, "fmt"=>"2.87B", "longFmt"=>"2,865,000,000"}, "changeToNetincome"=>{"raw"=>589000000, "fmt"=>"589M", "longFmt"=>"589,000,000"}, "changeToAccountReceivables"=>{"raw"=>-6384000000, "fmt"=>"-6.38B", "longFmt"=>"-6,384,000,000"}, "changeToLiabilities"=>{"raw"=>15774000000, "fmt"=>"15.77B", "longFmt"=>"15,774,000,000"}, "changeToInventory"=>{"raw"=>435000000, "fmt"=>"435M", "longFmt"=>"435,000,000"}, "changeToOperatingActivities"=>{"raw"=>-9873000000, "fmt"=>"-9.87B", "longFmt"=>"-9,873,000,000"}, "totalCashFromOperatingActivities"=>{"raw"=>24127000000, "fmt"=>"24.13B", "longFmt"=>"24,127,000,000"}, "capitalExpenditures"=>{"raw"=>-3289000000, "fmt"=>"-3.29B", "longFmt"=>"-3,289,000,000"}, "investments"=>{"raw"=>2806000000, "fmt"=>"2.81B", "longFmt"=>"2,806,000,000"}, "otherCashflowsFromInvestingActivities"=>{"raw"=>-597000000, "fmt"=>"-597M", "longFmt"=>"-597,000,000"}, "totalCashflowsFromInvestingActivities"=>{"raw"=>-1217000000, "fmt"=>"-1.22B", "longFmt"=>"-1,217,000,000"}, "dividendsPaid"=>{"raw"=>-3703000000, "fmt"=>"-3.7B", "longFmt"=>"-3,703,000,000"}, "netBorrowings"=>{"raw"=>1657000000, "fmt"=>"1.66B", "longFmt"=>"1,657,000,000"}, "otherCashflowsFromFinancingActivities"=>{"raw"=>-12000000, "fmt"=>"-12M", "longFmt"=>"-12,000,000"}, "totalCashFromFinancingActivities"=>{"raw"=>-26794000000, "fmt"=>"-26.79B", "longFmt"=>"-26,794,000,000"}, "changeInCash"=>{"raw"=>-3884000000, "fmt"=>"-3.88B", "longFmt"=>"-3,884,000,000"}, "repurchaseOfStock"=>{"raw"=>-24736000000, "fmt"=>"-24.74B", "longFmt"=>"-24,736,000,000"}}, {"maxAge"=>1, "endDate"=>{"raw"=>1656115200, "fmt"=>"2022-06-25"}, "netIncome"=>{"raw"=>19442000000, "fmt"=>"19.44B", "longFmt"=>"19,442,000,000"}, "depreciation"=>{"raw"=>2805000000, "fmt"=>"2.81B", "longFmt"=>"2,805,000,000"}, "changeToNetincome"=>{"raw"=>3870000000, "fmt"=>"3.87B", "longFmt"=>"3,870,000,000"}, "changeToAccountReceivables"=>{"raw"=>-981000000, "fmt"=>"-981M", "longFmt"=>"-981,000,000"}, "changeToLiabilities"=>{"raw"=>-4725000000, "fmt"=>"-4.72B", "longFmt"=>"-4,725,000,000"}, "changeToInventory"=>{"raw"=>-16000000, "fmt"=>"-16M", "longFmt"=>"-16,000,000"}, "changeToOperatingActivities"=>{"raw"=>2497000000, "fmt"=>"2.5B", "longFmt"=>"2,497,000,000"}, "totalCashFromOperatingActivities"=>{"raw"=>22892000000, "fmt"=>"22.89B", "longFmt"=>"22,892,000,000"}, "capitalExpenditures"=>{"raw"=>-2102000000, "fmt"=>"-2.1B", "longFmt"=>"-2,102,000,000"}, "investments"=>{"raw"=>6953000000, "fmt"=>"6.95B", "longFmt"=>"6,953,000,000"}, "otherCashflowsFromInvestingActivities"=>{"raw"=>-615000000, "fmt"=>"-615M", "longFmt"=>"-615,000,000"}, "totalCashflowsFromInvestingActivities"=>{"raw"=>4234000000, "fmt"=>"4.23B", "longFmt"=>"4,234,000,000"}, "dividendsPaid"=>{"raw"=>-3811000000, "fmt"=>"-3.81B", "longFmt"=>"-3,811,000,000"}, "netBorrowings"=>{"raw"=>971000000, "fmt"=>"971M", "longFmt"=>"971,000,000"}, "otherCashflowsFromFinancingActivities"=>{"raw"=>-43000000, "fmt"=>"-43M", "longFmt"=>"-43,000,000"}, "totalCashFromFinancingActivities"=>{"raw"=>-27445000000, "fmt"=>"-27.45B", "longFmt"=>"-27,445,000,000"}, "changeInCash"=>{"raw"=>-319000000, "fmt"=>"-319M", "longFmt"=>"-319,000,000"}, "repurchaseOfStock"=>{"raw"=>-24562000000, "fmt"=>"-24.56B", "longFmt"=>"-24,562,000,000"}}], "maxAge"=>86400}}

@brigriffin
Copy link
Member

@daviddigital do you by chance have any idea what could be going wrong here?

@daviddigital
Copy link
Contributor

If I follow this link directly I'm seeing empty data for index 0 (most recent quarter I guess):

https://query2.finance.yahoo.com/v6/finance/quoteSummary/AAPL?modules=cashflowStatementHistoryQuarterly

Like Josh mentioned, Yahoo's own site has the correct data and date (https://finance.yahoo.com/quote/AAPL/cash-flow?p=AAPL)

But if I use another ticker, IBM, it's correctly populating data:

https://query2.finance.yahoo.com/v6/finance/quoteSummary/IBM?modules=cashflowStatementHistoryQuarterly

So not really sure what to do here, at a guess, it may be the endpoint we're using (which is the same as yfinance which is weird), has some kind of delayed data built in, for example for most recent quarter, or live pricing (not 20min delayed), need to have an auth'd request.

@brigriffin
Copy link
Member

Thank you @daviddigital for checking on this issue. So for now, especially with the API endpoint changing recently, there is not much we can do @joshfester.

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

3 participants