FinanceToolkit v1.1.2
Added in functionality to set a start and end date. For example:
from financetoolkit import Toolkit
companies = Toolkit(['AAPL', 'MSFT'], api_key="FMP_KEY", start_date='2017-12-31')
# an Enterprise example
enterprise = companies.get_enterprise()
# a Historical example
historical_data = companies.get_historical_data()
# a Financial Statement example
balance_sheet_statement = companies.get_balance_sheet_statement()
# a Ratios example
profitability_ratios = companies.ratios.collect_profitability_ratios()
# Show the profitability ratios for Apple
profitability_ratios.loc['AAPL']
This returns the following output for profitability_ratios.loc['AAPL]
. Omitting .loc['AAPL']
will return the result for both AAPL and MSFT.
2018 | 2019 | 2020 | 2021 | 2022 | |
---|---|---|---|---|---|
Gross Margin | 0.383437 | 0.378178 | 0.382332 | 0.417794 | 0.433096 |
Operating Margin | 0.26694 | 0.24572 | 0.241473 | 0.297824 | 0.302887 |
Net Profit Margin | 0.224142 | 0.212381 | 0.209136 | 0.258818 | 0.253096 |
Interest Burden Ratio | 1.02828 | 1.02827 | 1.01211 | 1.00237 | 0.997204 |
Income Before Tax Profit Margin | 0.274489 | 0.252666 | 0.244398 | 0.298529 | 0.30204 |
Effective Tax Rate | 0.183422 | 0.159438 | 0.144282 | 0.133023 | 0.162045 |
Return on Assets (ROA) | 0.162775 | 0.16323 | 0.177256 | 0.269742 | 0.282924 |
Return on Equity (ROE) | 0.555601 | 0.610645 | 0.878664 | 1.50071 | 1.96959 |
Return on Invested Capital (ROIC) | 0.269858 | 0.293721 | 0.344126 | 0.503852 | 0.562645 |
Return on Capital Employed (ROCE) | 0.305968 | 0.297739 | 0.320207 | 0.495972 | 0.613937 |
Return on Tangible Assets | 0.555601 | 0.610645 | 0.878664 | 1.50071 | 1.96959 |
Income Quality Ratio | 1.30073 | 1.25581 | 1.4052 | 1.09884 | 1.22392 |
Net Income per EBT | 0.816578 | 0.840562 | 0.855718 | 0.866977 | 0.837955 |
Free Cash Flow to Operating Cash Flow Ratio | 0.828073 | 0.848756 | 0.909401 | 0.893452 | 0.912338 |
EBT to EBIT Ratio | 0.957448 | 0.948408 | 0.958936 | 0.976353 | 0.975982 |
EBIT to Revenue | 0.286688 | 0.26641 | 0.254864 | 0.305759 | 0.309473 |