PluginBench
MCP Server
Active
MIT

Finance Toolkit MCP Server

io.github.JerBouma/financetoolkit

Query 200+ transparent financial ratios and metrics from your AI assistant, calculated from raw statements.

What is the Finance Toolkit MCP server?

Finance Toolkit is an MCP server that exposes the open-source FinanceToolkit Python library's 200+ transparent financial ratios, indicators, and performance metrics to MCP-compatible AI clients like Claude, Copilot, Cursor, and Windsurf. It calculates metrics directly from raw financial statements rather than pulling pre-computed numbers from third-party sources, so users can query fundamentals, valuation, risk, and technical data with a fully documented methodology. It covers equities, options, currencies, cryptocurrencies, ETFs, mutual funds, indices, money markets, commodities, and key economic indicators.

Finance Toolkit MCP Server gives AI agents direct access to the FinanceToolkit library, which computes 200+ financial ratios, models, and risk/performance metrics from raw financial statements instead of relying on inconsistent third-party pre-calculated values. It pulls data primarily from Financial Modeling Prep (with automatic fallback to Yahoo Finance) and covers equities, options, currencies, crypto, ETFs, funds, indices, commodities, fixed income, and economic indicators. Because every formula is open-source and documented, users get full transparency into how each metric (e.g., PE ratio, Sharpe ratio, Value at Risk) is calculated, avoiding the discrepancies seen across data providers.

How to install Finance Toolkit

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • FINANCIAL_MODELING_PREP_API_KEY
    required
    secret

    Financial Modeling Prep API key, get a key over at https://www.jeroenbouma.com/fmp

Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "financetoolkit": {
      "command": "uvx",
      "args": [
        "financetoolkit"
      ],
      "env": {
        "FINANCIAL_MODELING_PREP_API_KEY": "<YOUR_FINANCIAL_MODELING_PREP_API_KEY>"
      }
    }
  }
}
Cursor
~/.cursor/mcp.json
{
  "mcpServers": {
    "financetoolkit": {
      "command": "uvx",
      "args": [
        "financetoolkit"
      ],
      "env": {
        "FINANCIAL_MODELING_PREP_API_KEY": "<YOUR_FINANCIAL_MODELING_PREP_API_KEY>"
      }
    }
  }
}
Windsurf
~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "financetoolkit": {
      "command": "uvx",
      "args": [
        "financetoolkit"
      ],
      "env": {
        "FINANCIAL_MODELING_PREP_API_KEY": "<YOUR_FINANCIAL_MODELING_PREP_API_KEY>"
      }
    }
  }
}
VS Code
.vscode/mcp.json
{
  "servers": {
    "financetoolkit": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "financetoolkit"
      ],
      "env": {
        "FINANCIAL_MODELING_PREP_API_KEY": "<YOUR_FINANCIAL_MODELING_PREP_API_KEY>"
      }
    }
  }
}
Claude Code
claude mcp add financetoolkit --env FINANCIAL_MODELING_PREP_API_KEY=<YOUR_FINANCIAL_MODELING_PREP_API_KEY> -- uvx financetoolkit

Tools & capabilities

Tools this server exposes to the agent.

  • get_historical_dataObtain historical daily/weekly/monthly/yearly OHLC data, volumes, dividends, returns, cumulative returns, and volatility for tickers.
  • get_income_statementRetrieve annual or quarterly income statement financial data for one or more tickers.
  • get_balance_sheet_statementRetrieve annual or quarterly balance sheet statement data for one or more tickers.
  • get_cash_flow_statementRetrieve annual or quarterly cash flow statement data for one or more tickers.
  • ratios.collect_profitability_ratiosCalculate profitability ratios (and other ratio categories) from financial statement data.
  • models.get_extended_dupont_analysisRun an extended DuPont analysis model on company financials.
  • options.collect_all_greeksCalculate option Greeks over a given expiration time range.
  • performance.get_factor_asset_correlationsCompute factor-asset correlations for performance analysis over a given period.
  • risk.get_value_at_riskCalculate Value at Risk over a specified period (e.g., weekly).
  • technicals.get_ichimoku_cloudCompute the Ichimoku Cloud technical indicator.
  • fixedincome.get_ice_bofa_effective_yieldRetrieve ICE BofA effective yield data for corporate bonds.
  • economics.get_unemployment_rateRetrieve unemployment rate economic indicator data.

Use cases

  • Ask an AI assistant to calculate a company's profitability, valuation, or liquidity ratios directly from raw financial statements
  • Compare financial metrics like PE ratio or DuPont analysis across multiple tickers without manual calculation
  • Retrieve historical price data, returns, and volatility for equities, crypto, or ETFs for analysis in chat
  • Compute risk metrics such as Value at Risk or Sharpe Ratio for a portfolio of assets
  • Pull economic indicators (e.g., unemployment rate) or fixed income yields alongside company fundamentals for macro-aware analysis

Finance Toolkit MCP server FAQ

What does the Finance Toolkit MCP server do?

It lets MCP-compatible AI clients (Claude, Copilot, Cursor, Windsurf, etc.) query 200+ financial ratios, models, risk, performance, and technical metrics calculated transparently from raw financial statements, without writing any code.

Is the Finance Toolkit MCP server free?

The toolkit and MCP server are open-source, but they require a Financial Modeling Prep API key for full financial statement data; the free FMP plan is limited to 250 requests/day, 5 years of data, and US-listed companies only. Yahoo Finance is used as an automatic fallback source.

How do I connect to the hosted MCP server?

Connect your MCP client to https://financetoolkit.jeroenbouma.com/mcp — OAuth handles authentication on first use, no local setup required.

How do I install it locally for Claude or Cursor?

Run `uvx --from "financetoolkit[mcp]" financetoolkit-mcp-setup`, which sets up your client config and API key automatically. Manual setup instructions are available in the MCP Server Documentation for local clients.

What authentication is required?

You need a Financial Modeling Prep API key to access financial statement data; the hosted MCP server uses OAuth on first connection, while local installs require configuring the FMP API key during setup.

What kind of assets does it cover beyond stocks?

Besides equities, it supports options, currencies, cryptocurrencies, ETFs, mutual funds, indices, money markets, commodities, and key economic indicators, plus fixed income data like corporate bond yields.

README (reference)

Source of truth, from the repository.

<!-- mcp-name: io.github.JerBouma/financetoolkit -->

FinanceToolkit

GitHub Sponsors Buy Me a Coffee LinkedIn MCP Server Download MCP Bundle Smithery Glama Documentation Supported Python Versions PYPI Version PYPI Downloads

While browsing a variety of websites, I repeatedly observed significant fluctuations in the same financial metric among different sources. Similarly, the reported financial statements often didn't line up, and there was limited information on the methodology used to calculate each metric.

For example, Microsoft's Price-to-Earnings (PE) ratio on the 6th of May, 2023 is reported to be 28.93 (Stockopedia), 32.05 (Morningstar), 32.66 (Macrotrends), 33.09 (Finance Charts), 33.66 (Y Charts), 33.67 (Wall Street Journal), 33.80 (Yahoo Finance) and 34.4 (Companies Market Cap). All of these calculations are correct, however the method of calculation varies leading to different results. Therefore, collecting data from multiple sources can lead to wrong interpretation of the results given that one source could apply a different definition than another. And that is, if that definition is even available as often the underlying methods are hidden behind a paid subscription.

This is why I designed the FinanceToolkit, this is an open-source toolkit in which all relevant financial ratios (200+), indicators and performance measurements are written down in the most simplistic way allowing for complete transparency of the method of calculation (proof). This enables you to avoid dependence on metrics from other providers that do not provide their methods. With a large selection of financial statements in hand, it facilitates streamlined calculations, promoting the adoption of a consistent and universally understood methods and formulas.

Beyond Equities, it supports Options, Currencies, Cryptocurrencies, ETFs, Mutual Funds, Indices, Money Markets, Commodities, Key Economic Indicators and more, allowing you to obtain historical data as well as important performance and risk measurements such as the Sharpe Ratio and Value at Risk.

Complementing this is the Finance Database 🌎, a database featuring 300.000+ symbols containing Equities, ETFs, Funds, Indices, Currencies, Cryptocurrencies and Money Markets. By utilising both, it is possible to do a fully-fledged competitive analysis with the tickers found from the FinanceDatabase inputted into the FinanceToolkit.


🔌 The Finance Toolkit is also available as an MCP Server

Query 200+ metrics from Claude, Copilot, Cursor, Windsurf or any MCP-compatible client without writing code.

  • Hosted: connect to https://financetoolkit.jeroenbouma.com/mcp — OAuth handles the rest on first use.
  • Local: uvx --from "financetoolkit[mcp]" financetoolkit-mcp-setup — sets up your client config and API key automatically. See MCP Server Documentation for manual setup.

Also on Smithery, Glama, MCP Servers and more.


Table of Contents

  1. Installation
  2. Basic Usage
  3. Functionality and Metrics
  4. MCP Server
  5. Questions & Answers
  6. Contributing
  7. Mentions
  8. Contact

Installation

Before installation, consider starring the project on GitHub which helps others find the project as well.

<a href="https://github.com/JerBouma/FinanceToolkit" target="_blank"><img width="1415" alt="image" src="https://github.com/JerBouma/FinanceToolkit/assets/46355364/014109fe-0c68-47d4-99bd-217c69dcea8d"></a>

To install the Finance Toolkit it simply requires the following:

pip install financetoolkit -U

Then within Python use:

from financetoolkit import Toolkit

companies = Toolkit(
    tickers=['GOOGL', 'MSFT', 'AMZN'],
    api_key="FINANCIAL_MODELING_PREP_KEY",  # replace with your actual API key
)

To be able to get started, you need to obtain an API Key from FinancialModelingPrep. This is used to gain access to 30+ years of financial statement both annually and quarterly. Note that the Free plan is limited to 250 requests each day, 5 years of data and only features companies listed on US exchanges.


<b><div align="center">Obtain an API Key from FinancialModelingPrep <a href="https://www.jeroenbouma.com/fmp" target="_blank">here</a>.</div></b>


Through the link you are able to subscribe for the free plan and also premium plans at a 15% discount. This is an affiliate link and thus supports the project at the same time. I have chosen FinancialModelingPrep as a source as I find it to be the most transparent, reliable and at an affordable price. I have yet to find a platform offering such low prices for the amount of data offered. When you notice that the data is inaccurate or have any other issue related to the data, note that I simply provide the means to access this data and I am not responsible for the accuracy of the data itself. For this, use their contact form or provide the data yourself.

By default, the Finance Toolkit prioritizes Financial Modeling Prep for data retrieval. If data acquisition from Financial Modeling Prep is unsuccessful (e.g., due to plan restrictions or API key issues), the toolkit automatically switches to Yahoo Finance as a secondary source. To disable this fallback behavior and exclusively use Financial Modeling Prep, set enforce_source="FinancialModelingPrep" during Toolkit initialization. This configuration ensures that an error is raised if Financial Modeling Prep data cannot be accessed. Alternatively, you can set enforce_source="YahooFinance" to exclusively use Yahoo Finance as the data source.

Basic Usage

This section is an introduction to the Finance Toolkit. Also see this notebook for a detailed Getting Started guide as well as this notebook that includes the Finance Database 🌎 and a proper financial analysis. Next to that, find below a fully-fledged code documentation as well as Jupyter Notebooks in which you can see many examples ranging from basic examples to creating custom ratios to working with your own datasets.


<b><div align="center">Find a variety of How-To Guides including Code Documentation for the FinanceToolkit <a href="https://www.jeroenbouma.com/projects/financetoolkit">here</a>.</div></b>


A basic example of how to use the Finance Toolkit is shown below.

from financetoolkit import Toolkit

companies = Toolkit(["AAPL", "MSFT"], api_key=API_KEY, start_date="2017-12-31")

# a Historical example
historical_data = companies.get_historical_data()

# a Financial Statement example
income_statement = companies.get_income_statement()

# a Ratios example
profitability_ratios = companies.ratios.collect_profitability_ratios()

# a Models example
extended_dupont_analysis = companies.models.get_extended_dupont_analysis()

# an Options example
all_greeks = companies.options.collect_all_greeks(expiration_time_range=180)

# a Performance example
factor_asset_correlations = companies.performance.get_factor_asset_correlations(
    period="quarterly"
)

# a Risk example
value_at_risk = companies.risk.get_value_at_risk(period="weekly")

# a Technical example
ichimoku_cloud = companies.technicals.get_ichimoku_cloud()

# a Fixed Income example
corporate_bond_yields = companies.fixedincome.get_ice_bofa_effective_yield()

# an Economics example
unemployment_rates = companies.economics.get_unemployment_rate()

Generally, the functions return a DataFrame with a multi-index in which all tickers, in this case Apple and Microsoft, are presented. To keep things manageable for this README, I select just Apple but in essence the list of tickers can be endless as I've seen DataFrames with thousands of tickers. The filtering is done through .loc['AAPL'] and .xs('AAPL', level=1, axis=1) based on whether it's fundamental data or historical data respectively.

Obtaining Historical Data

Obtain historical data on a daily, weekly, monthly or yearly basis. This includes OHLC, volumes, dividends, returns, cumulative returns and volatility calculations for each corresponding period. For example, the a portion of the historical data for Apple is shown below.

dateOpenHighLowCloseAdj CloseVolumeDividendsReturnVolatilityExcess ReturnExcess VolatilityCumulative Return
2018-01-0242.5443.07542.31543.06540.781.02224e+08000.0202-0.00670.02331
2018-01-0343.132543.637542.9943.057540.771.17982e+080-0.00020.0202-0.02470.02330.9998
2018-01-0443.13543.367543.0243.257540.968.97384e+0700.00470.0202-0.01980.02331.0044
2018-01-0543.3643.842543.262543.7541.439.46401e+0700.01150.0202-0.01330.02331.0159
2018-01-0843.587543.902543.482543.587541.278.22711e+070-0.00390.0202-0.02870.02331.012

And below the cumulative returns are plotted which include the S&P 500 as benchmark:

HistoricalData

Obtaining Financial Statements

Obtain an Income Statement on an annual or quarterly basis. This can also be a balance statement (companies.get_balance_sheet_statement()) or cash flow statement (companies.get_cash_flow_statement()). For example, the first 5 rows of the Income Statement for Apple are shown below.

2017201820192020202120222023
Revenue2.29234e+112.65595e+112.60174e+112.74515e+113.65817e+113.94328e+113.83285e+11
Cost of Goods Sold1.41048e+111.63756e+111.61782e+111.69559e+112.12981e+112.23546e+112.14137e+11
Gross Profit8.8186e+101.01839e+119.8392e+101.04956e+111.52836e+111.70782e+111.69148e+11
Gross Profit Ratio0.38470.38340.37820.38230.41780.43310.4413
Research and Development Expenses1.1581e+101.4236e+101.6217e+101.8752e+102.1914e+102.6251e+102.9915e+10

And below the Earnings Before Interest, Taxes, Depreciation and Amortization (EBITDA) are plotted for both Apple and Microsoft.

FinancialStatements

Obtaining Financial Ratios

Get Profitability Ratios based on the inputted balance sheet, income and cash flow statements. This can be any of the 50+ ratios within the ratios module. The get_ functions show a single ratio whereas the collect_ functions show an aggregation of multiple ratios. For example, see some of the profitability ratios of Microsoft below.

2017201820192020202120222023
Gross Margin0.61910.65250.6590.67780.68930.6840.6892
Operating Margin0.24820.31770.34140.37030.41590.42060.4177
Net Profit Margin0.23570.15020.31180.30960.36450.36690.3415
Interest Coverage Ratio13.998216.582120.342925.378234.783547.427552.0244
Income Before Tax Profit Margin0.25740.33050.34720.37080.4230.42220.4214

And below a few of the profitability ratios are plotted for Microsoft.

FinancialRatios

Obtaining Financial Models

Get an Extended DuPont Analysis based on the inputted balance sheet, income and cash flow statements. This can also be an Enterprise Value Breakdown, Weighted Average Cost of Capital (WACC), Altman Z-Score and many more models. For example, this shows the Extended DuPont Analysis for Apple:

2017201820192020202120222023
Interest Burden Ratio0.95720.97250.97250.9880.99761.00281.005
Tax Burden Ratio0.78820.83970.86430.86610.8690.83560.8486
Operating Profit Margin0.27960.27450.25270.24440.29850.3020.2967
Asset Turnovernan0.71680.73890.82881.08411.12061.0868
Equity Multipliernan3.07243.56334.25095.2556.18626.252
Return on Equitynan0.49360.55920.73691.47441.75461.7195

And below each component of the Extended Dupont Analysis is plotted including the resulting Return on Equity (ROE).

Models

Obtaining Options and Greeks

Get the Black Scholes Model for both call and put options including the relevant Greeks, in this case Delta, Gamma, Theta and Vega. This can be any of the First, Second or Third Order Greeks as found in the the options module. The get_ functions show a single Greek whereas the collect_ functions show an aggregation of Greeks. For example, see the delta of the Call options for Apple for multiple expiration times and strike prices below (Stock Price: 185.92, Volatility: 31.59%, Dividend Yield: 0.49% and Risk Free Rate: 3.95%):

1 Month2 Months3 Months4 Months5 Months6 Months
1750.76860.71780.69670.68570.67940.6759
1800.66590.640.63180.6290.62850.6291
1850.55220.55830.56480.5710.57670.5816
1900.43710.47620.49770.5130.52490.5342
1950.32980.39710.43240.45620.4740.4875

Which can also be plotted together with Gamma, Theta and Vega as follows:

Greeks

Obtaining Performance Metrics

Get the correlations with the factors as defined by Fama-and-French. These include market, size, value, operating profitability and investment. The beauty of all functionality here is that it can be based on any period as the function accepts the period intraday, weekly, monthly, quarterly and yearly. For example, this shows the quarterly correlations for Apple:

Mkt-RFSMBHMLRMWCMA
2022Q20.9177-0.1248-0.5077-0.3202-0.2624
2022Q30.80920.1528-0.5046-0.1997-0.5231
2022Q40.89980.2309-0.5968-0.1868-0.5946
2023Q10.77370.1606-0.3775-0.228-0.5707
2023Q20.7416-0.1166-0.27220.0093-0.4745

And below the correlations with each factor are plotted over time for both Apple and Microsoft.

Performance

Obtaining Risk Metrics

Get the Value at Risk for each week. Here, the days within each week are considered for the Value at Risk. This makes it so that you can understand within each period what is the expected Value at Risk (VaR) which can again be any period but also based on distributions such as Historical, Gaussian, Student-t, Cornish-Fisher.

AAPLMSFTBenchmark
2023-09-25/2023-10-01-0.0205-0.0133-0.0122
2023-10-02/2023-10-08-0.0048-0.0206-0.0108
2023-10-09/2023-10-15-0.0089-0.0092-0.0059
2023-10-16/2023-10-22-0.0135-0.0124-0.0131
2023-10-23/2023-10-29-0.0224-0.0293-0.0139

And below the Value at Risk (VaR) for Apple, Microsoft and the benchmark (S&P 500) are plotted also demonstrating the impact of COVID-19.

Risk

Obtaining Technical Indicators

Get the Ichimoku Cloud parameters based on the historical market data. This can be any of the 30+ technical indicators within the technicals module. The get_ functions show a single indicator whereas the collect_ functions show an aggregation of multiple indicators. For example, see some of the parameters for Apple below:

DateBase LineConversion LineLeading Span ALeading Span B
2023-10-30174.005171.755176.245178.8
2023-10-31174.005171.755176.37178.8
2023-11-01174.005170.545176.775178.8
2023-11-02174.005171.725176.235178.8
2023-11-03174.005171.725175.558178.8

And below the Ichimoku Cloud parameters are plotted for Apple and Microsoft side-by-side.

Technicals

Obtaining Fixed Income Metrics

Get access to the ICE BofA Corporate Bond benchmark indices and a variety of other bond and derivative related valuations within the fixedincome module. For example, see the Effective Yield for the ICE BofA Corporate Bond Index below for each Credit Rating:

DateAAAAAABBBBBBCCC
2024-04-190.05180.05320.05610.05940.06780.08040.1385
2024-04-220.05170.05320.0560.05930.06710.07930.1377
2024-04-230.05140.05280.05560.05890.0660.07770.1364
2024-04-240.05180.05310.05590.05920.06640.07780.1361
2024-04-250.05240.05370.05640.05980.06730.0790.1368

And below a variety of Fixed Income metrics are shown all acquired from the Fixed Income module.

Fixed Income

Understanding Key Economic Indicators

Get insights for 60+ countries into key economic indicators such as the Consumer Price Index (CPI), Gross Domestic Product (GDP), Unemployment Rates and 3-month and 10-year Government Interest Rates. This is done through the economics module and can be used as a standalone module as well by using from financetoolkit import Economics. For example see a selection of the countries below:

ColombiaUnited StatesSwedenJapanGermany
20170.0930.04350.06860.02810.0357
20180.09530.0390.06480.02440.0321
20190.10370.03670.06910.02350.0298
20200.15860.08090.08480.02780.0362
20210.13810.05370.08890.02820.0358
20220.11220.03650.07480.0260.0307

And below these Unemployment Rates are plotted over time:

Economics

Explore your own Portfolio

Through a custom XLSX, XLS or CSV file you are able to load in your own portfolio directly into the Finance Toolkit. This allows you to view your positions and performance (over time) versus a benchmark and other positions as well as your PnL development over time. Furthermore, the portfolio can be directly loaded in the core functionality of the Finance Toolkit as well making it possible to calculate all metrics and ratios for your portfolio (which is a time-weighted sum of all positions). The portfolio module is a standalone module and can be used as such by using from financetoolkit import Portfolio.


<b><div align="center">It is important to note that it requires a specific Excel template to work, see for further instructions the following notebook <a href="https://www.jeroenbouma.com/projects/financetoolkit/portfolio-notebook" target="_blank">here</a>.</div></b>


The table below shows one of the functionalities of the Portfolio module but is purposely shrunken down given the >30 assets.

IdentifierVolumeCostsPriceInvestedLatest PriceLatest ValueReturnReturn ValueBenchmark ReturnVolatilityBenchmark VolatilityAlphaBetaWeight
AAPL137-2838.96925310.78241.8433132.15.238627821.32.22580.38580.19373.01281.20270.0405
ALGN81-34117.3659472.53187.0315149.40.59935676.92.14130.59850.1937-1.5421.55010.0185
AMD78-3011.9075898.78499.867789.087.66626890.33.79450.61590.19373.87181.65510.0095
AMZN116-2841.54714791.46212.2824624.54.1392198331.82740.49210.19372.31181.15940.0301
ASML129-2533.31844273.07709.0891471.320.406587198.33.80050.45240.193716.6061.44070.1119
VOO77-12238.49918352.5546.3342067.41.2922237151.11790.16990.19370.17430.99730.0515
WMT92-1817.86451625.5398.619072.124.5817446.592.47870.23340.19372.10240.49480.0111
Portfolio2142-53259.8406128710381.6898175775.35216888672.07730.41930.19373.27471.29091

In which the weights and returns can be depicted as follows:

Portfolio

Core Functionality and Metrics

The Finance Toolkit has the ability to collect 30+ years of financial statements and calculate 200+ financial metrics. The following list shows all of the available functionality and metrics.


<b><div align="center">Find a variety of How-To Guides including Code Documentation for the Finance Toolkit <a href="https://www.jeroenbouma.com/projects/financetoolkit">here</a>.</div></b>


Each ratio and indicator has a corresponding function that can be called directly for example ratios.get_return_on_equity or technicals.get_relative_strength_index. However, there are also functions that collect multiple ratios or indicators at once such as ratios.collect_profitability_ratios. These functions are useful when you want to collect a large amount of ratios or indicators at once.

<p align="center"> <img src="examples/Finance Toolkit - Video Demo.gif" alt="Finance Toolkit Illustration" width="100%" onerror="this.style.display = 'none'"/> </p>

Core Functionality

These are the core functionalities of the Finance Toolkit. For any calculation, it often first collects data via these functions. For example, financial ratios require the financial statements and historical data which are obtained through the Toolkit without needing to specify this first.

<details> <summary><b>Financial Statements</b></summary>

Acquire a full history of both annual and quarterly financial statements, including balance sheets, income statements, and cash flow statements.

These financial statements are adjusted for the following reasons:

  • The financial statements are automatically standardized (based on these files to allow for the ability to enter any type of dataset given that the names used are what all of the functionalities rely on.
  • The fiscal year of each company is automatically converted to the calendar year so that all companies can be compared on the same basis. As an example, Apple's Q4 2023 is related to the period July 2023 until September 2023 which corresponds to Q3 2023. This means that in the Finance Toolkit these results are reported in the Q3 2023 column.
  • When convert_currency=True (automatically enabled with a Premium FMP plan) the currency of the historical data is compared to the currency of the financial statements. If they do not match, the financial statement data is converted to the currency of the historical data. This is done to ensure that calculations such as the Price-to-Earnings Ratio (PE) have both the Share Price and Earnings denoted in the same currency.

To get insights related to the reported currency, CIK ID and SEC Links, it is possible to retrieve a statististics statement as well.

As an example:

from financetoolkit import Toolkit

toolkit = Toolkit(["MSFT", "MU"], api_key="FINANCIAL_MODELING_PREP_KEY", quarterly=True, start_date='2022-05-01')

balance_sheet_statements = toolkit.get_balance_sheet_statement()

balance_sheet_statements.loc['MU']

Which returns:

2022Q22022Q32022Q42023Q12023Q2
Cash and Cash Equivalents9.157e+098.262e+099.574e+099.798e+099.298e+09
Short Term Investments1.07e+091.069e+091.007e+091.02e+091.054e+09
Cash and Short Term Investments1.0227e+109.331e+091.0581e+101.0818e+101.0352e+10
Accounts Receivable6.229e+095.13e+093.318e+092.278e+092.429e+09
Inventory5.629e+096.663e+098.359e+098.129e+098.238e+09
Other Current Assets6.08e+086.44e+086.63e+086.73e+087.15e+08
Total Current Assets2.2708e+102.1781e+102.2921e+102.1898e+102.1734e+10
Property, Plant and Equipment3.7355e+103.9227e+104.0028e+103.9758e+103.9382e+10
Goodwill1.228e+091.228e+091.228e+091.228e+091.252e+09
Intangible Assets4.15e+084.21e+084.28e+084.1e+084.1e+08
Long Term Investments1.646e+091.647e+091.426e+091.212e+099.73e+08
Tax Assets6.82e+087.02e+086.72e+086.97e+087.08e+08
Other Fixed Assets1.262e+091.277e+091.171e+091.317e+091.221e+09
Fixed Assets4.2588e+104.4502e+104.4953e+104.4622e+104.3946e+10
Other Assets00000
Total Assets6.5296e+106.6283e+106.7874e+106.652e+106.568e+10
Accounts Payable2.019e+092.142e+091.789e+091.689e+091.64e+09
Short Term Debt1.07e+081.03e+081.71e+082.37e+082.59e+08
Tax Payables3.82e+084.2e+084.19e+082.41e+081.48e+08
Deferred Revenue0000-1.64e+09
Other Current Liabilities4.883e+095.294e+094.565e+093.329e+094.845e+09
Total Current Liabilities7.009e+097.539e+096.525e+095.255e+095.104e+09
Long Term Debt7.485e+097.413e+091.0719e+101.2647e+101.3589e+10
Deferred Revenue Non Current6.63e+085.89e+085.16e+085.29e+086.32e+08
Deferred Tax Liabilities00000
Other Non Current Liabilities8.58e+088.35e+088.08e+088.32e+089.5e+08
Total Non Current Liabilities9.006e+098.837e+091.2043e+101.4008e+101.5171e+10
Other Liabilities00000
Capital Lease Obligations6.29e+086.1e+086.25e+086.1e+086.03e+08
Total Liabilities1.6015e+101.6376e+101.8568e+101.9263e+102.0275e+10
Preferred Stock00000
Common Stock1.22e+081.23e+081.23e+081.23e+081.24e+08
Retained Earnings4.5916e+104.7274e+104.6873e+104.4426e+104.2391e+10
Accumulated Other Comprehensive Income-3.64e+08-5.6e+08-4.73e+08-3.73e+08-3.4e+08
Other Total Shareholder Equity3.607e+093.07e+092.783e+093.081e+093.23e+09
Total Shareholder Equity4.9281e+104.9907e+104.9306e+104.7257e+104.5405e+10
Total Equity4.9281e+104.9907e+104.9306e+104.7257e+104.5405e+10
Total Liabilities and Shareholder Equity6.5296e+106.6283e+106.7874e+106.652e+106.568e+10
Minority Interest00000
Total Liabilities and Equity6.5296e+106.6283e+106.7874e+106.652e+106.568e+10
Total Investments2.716e+092.716e+092.433e+092.232e+092.027e+09
Total Debt7.592e+097.516e+091.089e+101.2884e+101.3848e+10
Net Debt-1.565e+09-7.46e+081.316e+093.086e+094.55e+09
</details> <details> <summary><b>Company Overviews</b></summary>

Obtain the profile of the specified tickers. These include important metrics such as the beta, market capitalization, currency, isin, industry, and ipo date that give an overall understanding about the company.

As an example:

from financetoolkit import Toolkit

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

toolkit.get_profile()

Which returns:

MSFTAAPL
SymbolMSFTAAPL
Price316.48174.49
Beta0.9037061.286802
Average Volume2815312057348456
Market Capitalization23531838093722744500935588
Last Dividend2.71999999999999980.96
Range213.43-366.78124.17-198.23
Changes-0.40.49
Company NameMicrosoft CorporationApple Inc.
CurrencyUSDUSD
CIK789019320193
ISINUS5949181045US0378331005
CUSIP59491810437833100
ExchangeNASDAQ Global SelectNASDAQ Global Select
Exchange Short NameNASDAQNASDAQ
IndustrySoftware - InfrastructureConsumer Electronics
Websitehttps://www.microsoft.comhttps://www.apple.com
CEOMr. Satya NadellaMr. Timothy D. Cook
SectorTechnologyTechnology
CountryUSUS
Full Time Employees221000164000
Phone425 882 8080408 996 1010
AddressOne Microsoft WayOne Apple Park Way
CityRedmondCupertino
StateWACA
ZIP Code98052-639995014
DCF Difference4.565844.15176
DCF243.594150.082
IPO Date1986-03-131980-12-12

Get the quote of the specified tickers. These include important metrics such as the price, changes, day low, day high, year low, year high, market capitalization, volume, average volume, open, previous close, earnings per share (EPS), price to earnings ratio (PE), earnings announcement, shares outstanding and timestamp that give an overall understanding about the company.

As an example:

from financetoolkit import Toolkit

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

toolkit.get_quote()

Which returns:

TSLAAAPL
SymbolTSLAAAPL
NameTesla, Inc.Apple Inc.
Price215.49174.49
Changes Percentage-1.70150.2816
Change-3.730.49
Day Low212.36171.96
Day High217.58175.1
Year High313.8198.23
Year Low101.81124.17
Market Capitalization6829955343132744500935588
Price Average 50 Days258.915187.129
Price Average 200 Days196.52345161.4698
ExchangeNASDAQNASDAQ
Volume13627658461172150
Average Volume13311015857348456
Open214.12172.3
Previous Close219.22174
EPS3.085.89
PE69.9629.62
Earnings Announcement2023-10-17T20:00:00.000+00002023-10-25T10:59:00.000+0000
Shares Outstanding316949990415728700416
Timestamp2023-08-18 20:00:002023-08-18 20:00:01

Get the rating of the specified tickers. These scores and recommendations are categorized as follows:

  • An overall rating
  • Discounted Cash Flow (DCF)
  • Return on Equity (ROE)
  • Return on Assets (ROA)
  • Debt to Equity (DE)
  • Price Earnings (PE)
  • Price to Book (PB)

As an example:

from financetoolkit import Toolkit

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

rating = toolkit.get_rating()

rating.loc['AMZN', 'Rating Recommendation'].tail()

Which returns:

dateRating Recommendation
2023-08-01 00:00:00Strong Buy
2023-08-02 00:00:00Strong Buy
2023-08-03 00:00:00Strong Buy
2023-08-04 00:00:00Strong Buy
2023-08-07 00:00:00Strong Buy
</details> <details> <summary><b>(Intraday) Historical Market Data</b></summary>

Obtain historical market data for the specified tickers. This contains the following columns:

  • Open: The opening price for the period.
  • High: The highest price for the period.
  • Low: The lowest price for the period.
  • Close: The closing price for the period.
  • Adj Close: The adjusted closing price for the period.
  • Volume: The volume for the period.
  • Dividends: The dividends for the period.
  • Return: The return for the period.
  • Volatility: The volatility for the period.
  • Excess Return: The excess return for the period. This is defined as the return minus the a predefined risk free rate. Only calculated when excess_return is True.
  • Excess Volatility: The excess volatility for the period. This is defined as the volatility of the excess return. Only calculated when excess_return is True.
  • Cumulative Return: The cumulative return for the period.

If a benchmark ticker is selected, it also calculates the benchmark ticker together with the results. By default this is set to “SPY” (S&P 500 Index) but can be any ticker. This is relevant for calculations for models such as CAPM, Alpha and Beta.

Important to note is that when an api_key is included in the Toolkit initialization that the data collection defaults to FinancialModelingPrep which is a more stable source and utilises your subscription. However, if this is undesired, it can be disabled by setting historical_source to YahooFinance. If data collection fails from FinancialModelingPrep it automatically reverts back to YahooFinance.

You are able to specify the period which can be daily (default), weekly, monthly, quarterly or yearly.

As an example:

from financetoolkit import Toolkit

toolkit = Toolkit("AAPL", api_key="FINANCIAL_MODELING_PREP_KEY")

toolkit.get_historical_data(period="yearly")

Which returns:

DateOpenHighLowCloseAdj CloseVolumeDividendsReturnVolatilityExcess ReturnExcess VolatilityCumulative Return
201319.791820.045719.785720.036417.58892.23084e+080.10892900.24064100.2442481
201428.20528.282527.552527.59524.7341.65614e+080.4614290.4062250.2165740.3845250.2195361.40623
201526.752526.757526.20526.31523.98861.63649e+080.5075-0.03013730.267373-0.05282730.2698451.36385
201629.162529.328.857528.95526.98241.22345e+080.55750.1248040.2333830.1003440.2402151.53406
201742.6342.647542.30542.307540.05931.04e+080.6150.4846440.1760580.4605940.174682.27753
201839.632539.8439.1239.43537.91.40014e+080.705-0.05390190.287421-0.08076190.2899052.15477
201972.482573.4272.3873.412571.6151.00806e+080.760.8895780.2613840.8703880.2699454.0716
2020134.08134.74131.72132.69130.5599.91166e+070.80750.8230670.4664970.8138970.4707437.4228
2021178.09179.23177.26177.57175.7956.40623e+070.8650.3464820.2510190.3313620.2514299.99467
2022128.41129.95127.43129.93129.3787.70342e+070.91-0.2640420.356964-0.3028320.3772937.35566
2023187.84188.51187.68188.108188.1084.72009e+060.710.4539410.2133590.4129010.2232710.6947

It is also possible to retrieve intraday data. This has the option to get you 1 minute, 5 minute, 15 minute, 30 minute or 1 hour data. It can also be used as part of the Risk, Performance and Technicals modules when defining intraday_period as part of the Toolkit initialization.

As an example:

from financetoolkit import Toolkit

toolkit = Toolkit("MSFT", api_key="FINANCIAL_MODELING_PREP_KEY")

toolkit.get_intraday_data(period="1min")

Which returns:

dateOpenHighLowCloseVolumeReturnVolatilityCumulative Return
2024-01-19 15:45397.64397.88397.63397.88492020.00060.00051.0266
2024-01-19 15:46397.86397.93397.788397.8268913-0.00020.00051.0264
2024-01-19 15:47397.81397.97397.76397.7862605-0.00010.00051.0263
2024-01-19 15:48397.78397.85397.675397.845621460.00020.00051.0265
2024-01-19 15:49397.85397.97397.8397.94727000.00020.00051.0267
2024-01-19 15:50397.92398.27397.9398.041407540.00030.00051.027
2024-01-19 15:51398.04398.15397.96398122208-0.00010.00051.0269
2024-01-19 15:52397.99398.26397.98398.05835460.00010.00051.027
2024-01-19 15:53398.04398.12397.98398.09850980.00010.00051.0271
2024-01-19 15:54398.1398.52398.03398.451873580.00090.00051.028
2024-01-19 15:55398.45398.62398.25398.335237902-0.00030.00051.0278
2024-01-19 15:56398.33398.44398.3398.4151491570.00020.00051.028
2024-01-19 15:57398.42398.5398.29398.4318107400.00051.028
2024-01-19 15:58398.46398.47398.29398.35278802-0.00020.00051.0278
2024-01-19 15:59398.35398.66398.22398.665863440.00080.00051.0286
</details> <details> <summary><b>Treasury Rates</b></summary>

Just like the historical market data, obtain a full history for the treasury rates which also serve as risk-free rate by default allowing for calculations such as the Sharpe Ratio. This also includes normalization of the data as well as auto-adjustments for missing values. It can also be obtained from both FinancialModelingPrep and Yahoo Finance.

It returns the following columns:

  • 13 Week Treasury Bond
  • 5 Year Treasury Bond
  • 10 Year Treasury Bond
  • 30 Year Treasury Bond

By default, the Finance Toolkit uses the 10 Year Treasury Bond as risk-free rate but this can be changed by setting risk_free_rate to any of the other treasury rates.

As an example:

from financetoolkit import Toolkit

companies = Toolkit(["AAPL", "MSFT"], api_key="FINANCIAL_MODELING_PREP_KEY", start_date="2023-08-10")

companies.get_treasury_data()

Which returns:

date13 Week5 Year10 Year30 Year
2023-10-160.05330.04720.04710.0487
2023-10-170.05340.04870.04850.0495
2023-10-180.05330.04920.0490.05
2023-10-190.05310.04960.04990.051
2023-10-200.0530.04910.04960.0512
</details> <details> <summary><b>Earnings & Dividend Calendars</b></summary>

Obtain Earnings Calendars for any range of companies. You have the option to obtain the actual dates or to convert to the corresponding quarters and can obtain a rich history. This returns:

  • Date: The date of the earnings release.
  • EPS: The actual earnings-per-share.
  • EPS Estimate: The estimated earnings-per-share.
  • Revenue: The actual revenue.
  • Revenue Estimate: The estimated revenue.

As an example:

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["AAPL", "MSFT", "GOOGL", "AMZN"], api_key="FINANCIAL_MODELING_PREP_KEY", start_date="2022-08-01", quarterly=False
)

earning_calendar = toolkit.get_earnings_calendar()

earning_calendar.loc['AMZN']

Which returns:

dateEPSEstimated EPSRevenueEstimated RevenueFiscal Date EndingTime
2022-10-270.170.221.27101e+11nan2022-09-30amc
2023-02-020.250.181.49204e+111.5515e+112022-12-31amc
2023-04-270.310.211.27358e+111.24551e+112023-03-31amc
2023-08-030.650.351.34383e+111.19573e+112023-06-30amc
2023-10-25nan0.56nan1.41407e+112023-09-30amc
2024-01-31nannannannan2023-12-30amc
2024-04-25nannannannan2024-03-30amc
2024-08-01nannannannan2024-06-30amc

Furthermore, find Dividend Calendars which includes:

  • Date: The date of the dividend.
  • Adj Dividend: The adjusted dividend amount.
  • Dividend: The dividend amount.
  • Record Date: The record date of the dividend.
  • Payment Date: The payment date of the dividend.
  • Declaration Date: The declaration date of the dividend.

As an example:

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["AAPL", "MSFT", "GOOGL", "AMZN"], api_key="FINANCIAL_MODELING_PREP_KEY", start_date="2022-08-01", quarterly=False
)

dividend_calendar = toolkit.get_dividend_calendar()

dividend_calendar.loc['AAPL']

Which returns:

dateAdj DividendDividendRecord DatePayment DateDeclaration Date
2022-08-050.230.232022-08-082022-08-112022-07-28
2022-11-040.230.232022-11-072022-11-102022-10-27
2023-02-100.230.232022-12-282023-02-162022-12-19
2023-05-120.240.242023-05-152023-05-182023-05-04
2023-08-110.240.242023-08-142023-08-172023-08-03
</details> <details> <summary><b>Analyst Estimates</b></summary>

Obtain the Analyst Estimates which include estimates for Revenue, Earnings-per-Share (EPS), EBITDA, EBIT, Net Income, and SGA Expense from the past and future from a large collection of analysts.

It includes the lower, average and upper bound for each estimate which gives insights whether analysts have reached a consensus on the prices or think wildly different. The larger the difference between the lower and upper bound, the more uncertain the analysts are.

As an example:

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["AAPL", "MSFT", "GOOGL", "AMZN"], api_key="FINANCIAL_MODELING_PREP_KEY", start_date="2021-05-01", quarterly=False
)

analyst_estimates = toolkit.get_analyst_estimates()

analyst_estimates.loc['AAPL']

Which returns:

2021202220232024
Estimated Revenue Low2.98738e+113.07919e+113.3871e+112.93633e+11
Estimated Revenue High4.48107e+114.61878e+115.08066e+114.4045e+11
Estimated Revenue Average3.73422e+113.84898e+114.23388e+113.67042e+11
Estimated EBITDA Low8.50991e+101.00742e+111.10816e+111.07415e+11
Estimated EBITDA High1.27649e+111.51113e+111.66224e+111.61122e+11
Estimated EBITDA Average1.06374e+111.25928e+111.3852e+111.34269e+11
Estimated EBIT Low7.62213e+109.05428e+109.9597e+109.81566e+10
Estimated EBIT High1.14332e+111.35814e+111.49396e+111.47235e+11
Estimated EBIT Average9.52766e+101.13178e+111.24496e+111.22696e+11
Estimated Net Income Low6.54258e+107.62265e+108.38492e+108.23371e+10
Estimated Net Income High9.81387e+101.1434e+111.25774e+111.23506e+11
Estimated Net Income Average8.17822e+109.52832e+101.04811e+111.02921e+11
Estimated SGA Expense Low1.48491e+101.85317e+102.03848e+102.04857e+10
Estimated SGA Expense High2.22737e+102.77975e+103.05772e+103.07286e+10
Estimated SGA Expense Average1.85614e+102.31646e+102.5481e+102.56072e+10
Estimated EPS Average4.265.4656.016.2612
Estimated EPS High5.126.567.217.5135
Estimated EPS Low3.44.374.815.009
Number of Analysts14161210
</details> <details> <summary><b>Revenue Segmentations</b></summary>

Retrieve the product revenue segmentation for each company. This is for example iPhone, iPad, Mac, Wearables, Services, and Other Products for Apple and helps understand the products that grow the fastest and slowest.

As an example:

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["AAPL", "MSFT", "GOOGL", "AMZN"], api_key="FINANCIAL_MODELING_PREP_KEY", start_date="2021-05-01", quarterly=False
)

product_segmentation = toolkit.get_revenue_product_segmentation()

product_segmentation.loc['MSFT']

Which returns:

2022Q22022Q32022Q42023Q12023Q2
Devices1.581e+091.448e+091.43e+091.282e+091.361e+09
Enterprise Services1.902e+091.876e+091.862e+092.007e+091.977e+09
Gaming3.455e+093.61e+094.758e+093.607e+093.491e+09
Linked In Corporation3.712e+093.663e+093.876e+093.697e+093.909e+09
Office Products And Cloud Services1.1639e+101.1548e+101.1837e+101.2438e+101.2905e+10
Other Products And Services1.403e+091.348e+091.359e+091.428e+09-3.924e+09
Search And News Advertising2.926e+092.928e+093.223e+093.045e+093.012e+09
Server Products And Cloud Services1.8839e+101.8388e+101.9594e+102.0025e+102.1963e+10
Windows6.408e+095.313e+094.808e+095.328e+096.058e+09

It is also possible to retrieve the geographic revenue segmentation which includes regions such as Americas, Europe, Greater China, Japan, and Rest of Asia Pacific and helps understand where companies retrieve their revenue from. As an example, a company like Microsoft might be based in the United States, their revenue streams are truly global.

As an example:

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["AAPL", "MSFT", "GOOGL", "AMZN"], api_key="FINANCIAL_MODELING_PREP_KEY", start_date="2021-05-01", quarterly=False
)

geographic_segmentation = toolkit.get_revenue_geographic_segmentation()

geographic_segmentation.loc['AAPL']

Which returns:

2020202120222023
Americas4.631e+105.1496e+104.9278e+103.5383e+10
Asia Pacific8.225e+099.81e+099.535e+095.63e+09
China2.1313e+102.5783e+102.3905e+101.5758e+10
Europe2.7306e+102.9749e+102.7681e+102.0205e+10
Japan8.285e+097.107e+096.755e+094.821e+09
</details> <details> <summary><b>ESG Scores</b></summary>

ESG scores, which stands for Environmental, Social, and Governance scores, are a crucial metric used by investors and organizations to assess a company’s sustainability and ethical practices. These scores provide valuable insights into a company’s performance in three key areas:

  • Environmental (E): The environmental component evaluates a company’s impact on the planet and its efforts to mitigate environmental risks. It includes factors like carbon emissions, energy efficiency, water management, and waste reduction. A high environmental score indicates a company’s commitment to eco-friendly practices and reducing its ecological footprint.
  • Social (S): The social component focuses on how a company interacts with its employees, customers, suppliers, and the communities in which it operates. Key factors in the social

Related MCP servers

Give your AI agent stealth web scraping with Cloudflare bypass and CSS selection, powered by Scrapling.

67k
Python
BSD-3-Clause
View repository →

Give your AI coding agent full control of a live Chrome browser for automation, debugging, and performance analysis.

45k
TypeScript
Apache-2.0
View repository →

Let AI agents manage your Puter files, websites, and serverless workers over MCP.

43k
TypeScript
AGPL-3.0
View repository →

Browser automation for AI agents via MCP, powering ByteDance's Agent TARS hybrid GUI/DOM browser control.

37k
TypeScript
Apache-2.0
View repository →

Run arbitrary shell commands from an MCP-connected AI agent.

37k
TypeScript
Apache-2.0
View repository →

Filesystem access MCP server from ByteDance's UI-TARS/Agent TARS ecosystem.

37k
TypeScript
Apache-2.0
View repository →