Calculates and collects all ratios based on the provided data.

All Ratios in Python

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

pip install financetoolkit -U

Then call collect_all_ratios as shown below.

from financetoolkit import Toolkit

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

toolkit.ratios.collect_all_ratios().loc['AAPL']

Which returns:

  2021 2022 2023 2024 2025
Price-to-Cash-Flow 28.7847 17.3655 27.5403 32.6289 36.5905
Price-to-Free-Cash-Flow 32.2174 19.0341 30.5711 35.4618 41.301
Market Cap 2.9947e+12 2.12121e+12 3.04439e+12 3.8585e+12 4.07918e+12
Enterprise Value 3.09629e+12 2.23005e+12 3.13835e+12 3.94761e+12 4.15562e+12
EV-to-Sales 8.464 5.6553 8.188 10.0953 9.9856
EV-to-EBIT 27.682 18.274 26.671 31.9683 31.3091
EV-to-EBITDA 25.7524 17.0831 24.9432 29.3152 28.7093
EV-to-Operating-Cash-Flow 29.7611 18.2565 28.3904 33.3825 37.2762
Tangible Asset Value 6.309e+10 5.0672e+10 6.2146e+10 5.695e+10 7.3733e+10
Net Current Asset Value -1.5308e+11 -1.6668e+11 -1.4687e+11 -1.5504e+11 -1.3755e+11

Parameters

collect_all_ratios accepts the following parameters:

  • include_dividends (bool, optional): Whether to include dividends in the calculations. Defaults to False.
  • diluted (bool, optional): Whether to use diluted shares for the calculation. Defaults to True.
  • days (int, optional): The number of days to use for the calculation. Defaults to 365.
  • rounding (int, optional): The number of decimals to round the results to. Defaults to 4.
  • growth (bool, optional): Whether to calculate the growth of the ratios. Defaults to False.
  • lag (int | str, optional): The lag to use for the growth calculation. Defaults to 1.
  • standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.
  • trailing (int): Defines whether to select a trailing period. E.g. when selecting 4 with quarterly data, the TTM is calculated.
Share