Calculate and compare financial ratios for multiple stocks at once using a few lines of Python
Pull income statements, balance sheets, and cash flow data from a single consistent source
Run risk analysis including Value at Risk and technical indicators on any publicly traded security
Verify why different financial websites show different numbers for the same metric
Install with pip, get a free Financial Modeling Prep API key (250 requests/day, 5 years of US stock data). Falls back to Yahoo Finance automatically if the API is unavailable.
FinanceToolkit is a Python library for calculating financial metrics in a transparent and consistent way. The motivation behind it is straightforward: the same financial ratio for the same company will often show different values depending on which financial website you look at, because each site uses slightly different formulas and rarely explains their methodology. FinanceToolkit addresses that by publishing all 150+ metrics as open-source code so anyone can inspect exactly how each number is calculated. The library works by taking a list of stock ticker symbols, connecting to financial data sources, and making it easy to run a wide range of calculations in just a few lines of Python. You can pull income statements, balance sheets, and cash flow statements, calculate profitability and valuation ratios, run risk measurements like Value at Risk, analyze options with metrics like the Greeks, and apply technical analysis indicators. The toolkit also covers asset classes beyond individual stocks, including currencies, ETFs, commodities, and macroeconomic indicators. Data comes primarily from a third-party service called Financial Modeling Prep, which requires a free API key to use. The free tier allows up to 250 requests per day and covers five years of historical data for US-listed companies. If that source is unavailable, the library falls back to Yahoo Finance automatically. The README includes an affiliate link to Financial Modeling Prep with a discount, though the author is transparent that this is an affiliate arrangement. The project pairs well with a companion library called FinanceDatabase, also by the same author, which contains metadata for over 300,000 financial instruments. Together they allow you to find tickers by category and then run analysis on them in bulk. Installation is a single pip command, and the basic usage shown in the README requires only a few lines to get historical data, financial statements, or computed ratios for multiple companies at once. The full README is longer than what was shown.
← jerbouma on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.