Retrieves the cash flow statement data for the specified tickers. The cash flow statement is a financial statement that shows how changes in balance sheet accounts and income affect cash and cash equivalents. It breaks the analysis down to operating, investing and financing activities.

The cash flow statement is a financial statement that shows how changes in balance sheet accounts and income affect cash and cash equivalents. Therefore, trailing results are available for this statement.

Also known as: operating cash flow, investing activities, financing activities.

Cash Flow Statements in Python

get_cash_flow_statement is part of the Toolkit module of the open-source Finance Toolkit. Install it with:

pip install financetoolkit -U

Then call get_cash_flow_statement as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(["MU", "AMZN"], api_key="FINANCIAL_MODELING_PREP_KEY", quarterly=True, start_date='2022-09-01')

cash_flow_statements = toolkit.get_cash_flow_statement()

cash_flow_statements.loc['AMZN']

Which returns:

  2022Q3 2022Q4 2023Q1 2023Q2
Net Income 2.872e+09 2.78e+08 3.172e+09 6.75e+09
Depreciation and Amortization 1.0204e+10 1.2685e+10 1.1123e+10 1.1589e+10
Deferred Income Tax -8.25e+08 -3.367e+09 -4.72e+08 -2.744e+09
Stock Based Compensation 5.556e+09 5.606e+09 4.748e+09 7.127e+09
Change in Working Capital -5.254e+09 1.0526e+10 -1.4317e+10 -6.293e+09
Accounts Receivables -4.794e+09 -8.788e+09 1.521e+09 -5.167e+09
Inventory 7.32e+08 3.18e+09 3.71e+08 -2.373e+09
Accounts Payables -1.226e+09 9.852e+09 -1.1264e+10 3.029e+09
Other Working Capital 3.4e+07 6.282e+09 -4.945e+09 -1.782e+09
Other Non Cash Items -1.149e+09 3.445e+09 5.34e+08 4.7e+07
Cash Flow from Operations 1.1404e+10 2.9173e+10 4.788e+09 1.6476e+10
Property, Plant and Equipment -1.6378e+10 -1.6592e+10 -1.4207e+10 -1.1455e+10
Acquisitions -8.85e+08 -8.31e+08 -3.513e+09 -3.16e+08
Purchases of Investments -2.39e+08 -2.33e+08 -3.38e+08 -4.96e+08
Sales of Investments 5.57e+08 5.683e+09 1.115e+09 1.551e+09
Other Investing Activities 1.337e+09 1.152e+09 1.137e+09 1.043e+09
Cash Flow from Investing -1.5608e+10 -1.0821e+10 -1.5806e+10 -9.673e+09
Debt Repayment -9.429e+09 -1.8756e+10 -6.369e+09 -1.0861e+10
Common Stock Issued 0 0 0 0
Common Stock Purchased 0 6e+09 0 0
Dividends Paid 0 0 0 0
Other Financing Activities 1.2445e+10 1.2842e+10 1.2723e+10 4.322e+09
Cash Flow from Financing 3.016e+09 8.6e+07 6.354e+09 -6.539e+09
Forex Changes on Cash -1.334e+09 6.37e+08 1.45e+08 6.9e+07
Net Change in Cash -2.522e+09 1.9075e+10 -4.519e+09 3.33e+08
Cash End of Period 3.5178e+10 5.4253e+10 4.9734e+10 5.0067e+10
Cash Beginning of Period 3.77e+10 3.5178e+10 5.4253e+10 4.9734e+10
Operating Cash Flow 1.1404e+10 2.9173e+10 4.788e+09 1.6476e+10
Capital Expenditure -1.6378e+10 -1.6592e+10 -1.4207e+10 -1.1455e+10
Free Cash Flow -4.974e+09 1.2581e+10 -9.419e+09 5.021e+09

Parameters

get_cash_flow_statement accepts the following parameters:

  • enforce_source (str | None, optional): Forces this specific call to use a given source, either “FinancialModelingPrep” or “YahooFinance”. This takes precedence over the source set on the Toolkit itself, so one instance can pull historical data from the free Yahoo Finance source while still using a FinancialModelingPrep key for the financial statements (or the other way around). Defaults to None, which falls back to the Toolkit’s own enforce_source.
  • overwrite (bool): Defines whether to overwrite the existing data.
  • rounding (int): Defines the number of decimal places to round the data to.
  • growth (bool): Defines whether to return the growth of the data.
  • lag (int | str): Defines the number of periods to lag the growth data by.
  • trailing (int): Defines whether to select a trailing period. E.g. when selecting 4 with quarterly data, the TTM is calculated.
  • show_columns (list[str] | None): A list of column names to keep in the result. Invalid names are reported and ignored. Defaults to None, which keeps every column.
Share