You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cash = xbrls.statements.cashflow_statement(max_periods=16)
income = xbrls.statements.income_statement(max_periods=16)
balance = xbrls.statements.balance_sheet(max_periods=16)
`
Method two:
`company = Company("ADP")
Get all 10-K filings
filings = list(company.get_filings(form="10-K"))
Storage
all_income, all_balance, all_cash = [], [], []
Process filings
for filing in filings:
try:
obj = filing.obj()
year = getattr(obj, "metadata", {}).get("fiscal_year", filing.filing_date.year)
if hasattr(obj, "income_statement") and obj.income_statement:
df = obj.income_statement.to_dataframe()
df["fiscal_year"] = year
all_income.append(df)
if hasattr(obj, "balance_sheet") and obj.balance_sheet:
df = obj.balance_sheet.to_dataframe()
df["fiscal_year"] = year
all_balance.append(df)
if hasattr(obj, "cashflow_statement") and obj.cashflow_statement:
df = obj.cashflow_statement.to_dataframe()
df["fiscal_year"] = year
all_cash.append(df)
print(f"✅ Parsed {year}")
except Exception as e:
print(f"⚠️ Skipped {filing.filing_date}: {e}")`
When I use the first method (e.g., for ADP), I receive all the necessary data—balance sheet, income statement, and cash flow statement—but only for the period from 2018 to 2024.
However, when I use the second method, I’m able to access balance sheet and income statement data from 2011 to 2024, but the cash flow statement data is missing.
Could you please clarify what might be causing this issue?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Greetings,
I have a question regarding a discrepancy in historical financial data. I’m using two different methods to retrieve data:
Method one (we discussed in "Can't retrieve financials prior to 2017"):
`c = Company("ADP")
filings = c.latest("10-K", 16)
xbrls = XBRLS.from_filings(filings)
xbrls.statements
cash = xbrls.statements.cashflow_statement(max_periods=16)
income = xbrls.statements.income_statement(max_periods=16)
balance = xbrls.statements.balance_sheet(max_periods=16)
`
Method two:
`company = Company("ADP")
Get all 10-K filings
filings = list(company.get_filings(form="10-K"))
Storage
all_income, all_balance, all_cash = [], [], []
Process filings
for filing in filings:
try:
obj = filing.obj()
year = getattr(obj, "metadata", {}).get("fiscal_year", filing.filing_date.year)
When I use the first method (e.g., for ADP), I receive all the necessary data—balance sheet, income statement, and cash flow statement—but only for the period from 2018 to 2024.
However, when I use the second method, I’m able to access balance sheet and income statement data from 2011 to 2024, but the cash flow statement data is missing.
Could you please clarify what might be causing this issue?
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions