Open jimmylai-hk opened 4 years ago
You can actually use the following formula and some of the fields that are provided to calculate Free Cash Flow: πΉπΆπΉ=ππππππ‘ππππΆππ βπΉπππ€βπΆππππ‘πππΈπ₯ππππππ‘π’πππ
Here is an example of how I'm doing this:
from yahoofinancials import YahooFinancials
ticker = 'AAPL'
yahoo_financials = YahooFinancials(ticker)
cashflow_statement_data_yr = yahoo_financials.get_financial_stmts('annual', 'cash')
operating_cashflow = cashflow_statement_data_yr['cashflowStatementHistory']['AAPL'][0]['2020-09-26']['totalCashFromOperatingActivities']
capital_expenditures = cashflow_statement_data_yr['cashflowStatementHistory']['AAPL'][0]['2020-09-26']['capitalExpenditures']
free_cash_flow = operating_cashflow + capital_expenditures # Addition since capEx is negative...
print('Free Cash Flow: {}'.format(free_cash_flow))
Hope this helps.
Hi,
It seems that the function get_financial_stmts get not get some of the data such as Free cash flow from the cash flow statement.
Any clue?