The Ratios Module contains 80+ ratios divided into 5 categories: efficiency, liquidity, profitability, solvency and valuation. Each ratio is calculated using the data from the Toolkit module.

Every function of the Ratios module has its own page with an example and its parameters. Pick one from the sidebar on the left.Every function of the Ratios module has its own page with an example and its parameters. Pick one from the .

To install the FinanceToolkit it simply requires the following:

pip install financetoolkit -U
Search Results

Getting Started

Some examples of ratios are the Current Ratio, Debt to Equity Ratio, Return on Assets (ROA), Return on Equity (ROE), Return on Invested Capital (ROIC), Return on Capital Employed (ROCE), Price to Earnings Ratio (P/E), Price to Book Ratio (P/B), Price to Sales Ratio (P/S), Price to Cash Flow Ratio (P/CF), Price to Free Cash Flow Ratio (P/FCF), Dividend Yield and Dividend Payout Ratio.

Next to that, it is also possible to define custom ratios.

The Ratios module is reached through a Toolkit instance, as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(["AAPL", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")

profitability_ratios = toolkit.ratios.collect_profitability_ratios()

profitability_ratios.loc['AAPL']

Which returns:

  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

The sidebar gives access to every metric in the Ratios module, each on its own page with a description, an example and its parameters. Pick one there to open it.The sidebar gives access to every metric in the Ratios module, each on its own page with a description, an example and its parameters. On a phone, open the to pick one.