yahooquery icon indicating copy to clipboard operation
yahooquery copied to clipboard

Inconsistent population of data loaded when specifying large number of tickers at once

Open MatassL opened this issue 3 years ago • 0 comments

I am interested in loading financials for large number of tickers at once, for example specifying all tickers for whole indexes (like DJIA, S&P500 and etc.). However, after specifying list of tickers for DJIA population (30 tickers):

import pandas as pd import yahooquery as yq

symbols = ['AAPL','AMGN','AXP','BA','CAT','CRM','CSCO','CVX','DIS','DOW','GS','HD','HON','IBM','INTC','JNJ','JPM','KO', 'MCD','MMM','MRK','MSFT','NKE','PG','TRV','UNH','V','VZ','WBA','WMT']

tickers = Ticker(symbols) bs = tickers.balance_sheet(frequency="a", trailing=False) pl = tickers.income_statement(frequency="a", trailing=False) cf = tickers.cash_flow(frequency="a", trailing=False)

I receive inconsistent quantity of rows returned each time (for 4 periods and 30 tickers there should be 120 rows) and for some cases large chunk is missing, for example: bs: 72 rows × 128 columns pl: 116 rows × 71 columns cf: 44 rows × 93 columns

Question: does the logic of API in principle is not suited for these kind of bulk tickers loads or there is a matter of code improvement?

MatassL avatar Apr 14 '22 11:04 MatassL