Skip to main content
Glama
JerBouma

Finance Toolkit

by JerBouma

performance

Read-onlyIdempotent

Calculate risk-adjusted metrics (Sharpe, Sortino, Alpha, Beta) for tickers to compare returns against a benchmark.

Instructions

Pre-computed risk-adjusted performance metrics (Sharpe ratio incl. standard/adjusted/probabilistic/deflated methods, Sortino ratio, Alpha, Jensen's Alpha, Beta, CAPM, Treynor ratio, M2 ratio, Tracking Error, Information Ratio, Fama-French factors, period Returns, Excess Returns — Returns/Excess Returns support cumulative=true for a compounded growth index rebased to 1). Beta, CAPM, Alpha, Jensen's Alpha, Treynor, Sortino, M2, Tracking Error and Information Ratio support rolling=N for a rolling N-period value spanning the full history instead of one value per period (e.g. period='monthly', rolling=6 for a rolling 6-month figure). Requires tickers='AAPL' — use comma-separated values for multiple tickers. Does NOT support period='daily'; use weekly, monthly, quarterly, or yearly instead.

Available indicators: get_alpha, get_appraisal_ratio, get_beta, get_burke_ratio, get_calmar_ratio, get_capital_asset_pricing_model, get_carhart_four_factor_model, get_compound_growth_rate, get_correlation_matrix, get_covariance_matrix, get_downside_capture_ratio, get_excess_return, get_factor_asset_correlations, get_factor_correlations, get_fama_and_french_model, get_fama_decomposition, get_gain_to_pain_ratio, get_henriksson_merton_model, get_information_ratio, get_jensens_alpha, get_kappa_ratio, get_m2_ratio, get_omega_ratio, get_rachev_ratio, get_returns, get_sharpe_ratio, get_sortino_ratio, get_starr_ratio, get_sterling_ratio, get_tracking_error, get_treynor_mazuy_model, get_treynor_ratio, g

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lagNoNumber of periods to lag when computing growth rates.
alphaNoValue for alpha.
orderNoValue for order.
growthNoReturn period-over-period growth rates instead of absolute values.
methodNoValue for method. Leave unset to use the default of the indicator you selected. Defaults are 'multi' for get_fama_and_french_model; 'standard' for get_sharpe_ratio.
periodNoObservation frequency, e.g. 'monthly', 'quarterly', or 'annual'.
rollingNoRolling window size in number of periods. When set, the metric is computed over a smoothly overlapping trailing window across the full history (e.g. period='monthly' and rolling=6 gives a rolling 6-month value) instead of one value per period, or (for economics indicators) a simple moving average used to smooth the raw series. Leave unset to use the default of the indicator you selected. Defaults are None for get_alpha, get_appraisal_ratio, get_beta, get_capital_asset_pricing_model, get_fama_decomposition, get_information_ratio, get_jensens_alpha, get_m2_ratio, get_omega_ratio, get_sharpe_ratio, get_sortino_ratio, get_tracking_error, get_treynor_ratio; 14 for get_ulcer_performance_index.
tickersNoComma-separated ticker symbols, e.g. 'AAPL,MSFT,GOOGL'.
end_dateNoEnd of the date range in YYYY-MM-DD format.2026-10-02
n_trialsNoValue for n_trials.
indicatorYesName of the specific metric to calculate, e.g. 'get_asset_turnover_ratio'. Required — omitting it returns the list of available indicators.
quarterlyNoReturn quarterly data instead of annual when True.
adjustmentNoValue for adjustment.
cumulativeNoReturn the cumulative value compounded over time instead of the discrete value per period. Always rebased to start at 1 at the beginning of the selected date range.
start_dateNoStart of the date range in YYYY-MM-DD format.2021-10-03
standardizeNoReturn the Z-Score (standard score) instead of the raw values, i.e. how many standard deviations each value is from the mean of its own series. When combined with growth=True, the growth values are standardized instead of the raw values.
show_columnsNoComma-separated names to filter the output. For historical data use the key names visible in any response record (e.g. 'Close,Volume,Return'). For financial statements use the 'metric' field values from the response (e.g. 'Revenue,Net Income,EBITDA'). Call the tool once without this parameter to see all available names, then repeat with show_columns to reduce response size and token usage.
trials_windowNoValue for trials_window.
within_periodNoValue for within_period.
benchmark_tickerNoTicker used as the market benchmark, e.g. 'SPY' or '^GSPC'.SPY
exclude_risk_freeNoValue for exclude_risk_free.
show_full_resultsNoValue for show_full_results.
factors_to_calculateNoComma-separated factor names to include in the calculation.
benchmark_sharpe_ratioNoValue for benchmark_sharpe_ratio.
include_daily_residualsNoValue for include_daily_residuals.
minimum_acceptable_returnNoThe minimum acceptable return (MAR) threshold below which returns are considered downside, e.g. 0.0 for downside relative to a zero return.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.2.1
    • changedInput schema / properties / end_date / default
      Previous value: -"2026-08-19"New value: +"2026-10-02"
    • changedInput schema / properties / start_date / default
      Previous value: -"2021-08-20"New value: +"2021-10-03"
  2. Changed12 schema fields changedv2.2.0
    • addedInput schema / properties / alpha
      Added value: +{
      +  "default": 0.05,
      +  "description": "Value for alpha.",
      +  "title": "Alpha",
      +  "type": "number"
      +}
    • addedInput schema / properties / benchmark_sharpe_ratio
      Added value: +{
      +  "default": 0,
      +  "description": "Value for benchmark_sharpe_ratio.",
      +  "title": "Benchmark Sharpe Ratio",
      +  "type": "number"
      +}
    • changedInput schema / properties / end_date / default
      Previous value: -"2026-07-14"New value: +"2026-08-19"
    • changedInput schema / properties / indicator / enum
      Previous value: -[
      -  "get_alpha",
      -  "get_beta",
      -  "get_burke_ratio",
      -  "get_calmar_ratio",
      -  "get_capital_asset_pricing_model",
      -  "get_compound_growth_rate",
      -  "get_correlation_matrix",
      -  "get_covariance_matrix",
      -  "get_downside_capture_ratio",
      -  "get_excess_return",
      -  "get_factor_asset_correlations",
      -  "get_factor_correlations",
      -  "get_fama_and_french_model",
      -  "get_gain_to_pain_ratio",
      -  "get_information_ratio",
      -  "get_jensens_alpha",
      -  "get_kappa_ratio",
      -  "get_m2_ratio",
      -  "get_omega_ratio",
      -  "get_returns",
      -  "get_sharpe_ratio",
      -  "get_sortino_ratio",
      -  "get_sterling_ratio",
      -  "get_tracking_error",
      -  "get_treynor_ratio",
      -  "get_ulcer_performance_index",
      -  "get_upside_capture_ratio",
      -  "get_win_rate"
      -]New value: +[
      +  "get_alpha",
      +  "get_appraisal_ratio",
      +  "get_beta",
      +  "get_burke_ratio",
      +  "get_calmar_ratio",
      +  "get_capital_asset_pricing_model",
      +  "get_carhart_four_factor_model",
      +  "get_compound_growth_rate",
      +  "get_correlation_matrix",
      +  "get_covariance_matrix",
      +  "get_downside_capture_ratio",
      +  "get_excess_return",
      +  "get_factor_asset_correlations",
      +  "get_factor_correlations",
      +  "get_fama_and_french_model",
      +  "get_fama_decomposition",
      +  "get_gain_to_pain_ratio",
      +  "get_henriksson_merton_model",
      +  "get_information_ratio",
      +  "get_jensens_alpha",
      +  "get_kappa_ratio",
      +  "get_m2_ratio",
      +  "get_omega_ratio",
      +  "get_rachev_ratio",
      +  "get_returns",
      +  "get_sharpe_ratio",
      +  "get_sortino_ratio",
      +  "get_starr_ratio",
      +  "get_sterling_ratio",
      +  "get_tracking_error",
      +  "get_treynor_mazuy_model",
      +  "get_treynor_ratio",
      +  "get_ulcer_performance_index",
      +  "get_upside_capture_ratio",
      +  "get_win_rate"
      +]
    • addedInput schema / properties / method / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / method / default
      Previous value: -"multi"New value: +null
    • changedInput schema / properties / method / description
      Previous value: -"Value for method."New value: +"Value for method. Leave unset to use the default of the indicator you selected. Defaults are 'multi' for get_fama_and_french_model; 'standard' for get_sharpe_ratio."
    • removedInput schema / properties / method / type
      Removed value: -"string"
    • addedInput schema / properties / n_trials
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Value for n_trials.",
      +  "title": "N Trials"
      +}
    • changedInput schema / properties / rolling / description
      Previous value: -"Rolling window size in number of periods. When set, the metric is computed over a smoothly overlapping trailing window across the full history (e.g. period='monthly' and rolling=6 gives a rolling 6-month value) instead of one value per period, or (for economics indicators) a simple moving average used to smooth the raw series."New value: +"Rolling window size in number of periods. When set, the metric is computed over a smoothly overlapping trailing window across the full history (e.g. period='monthly' and rolling=6 gives a rolling 6-month value) instead of one value per period, or (for economics indicators) a simple moving average used to smooth the raw series. Leave unset to use the default of the indicator you selected. Defaults are None for get_alpha, get_appraisal_ratio, get_beta, get_capital_asset_pricing_model, get_fama_decomposition, get_information_ratio, get_jensens_alpha, get_m2_ratio, get_omega_ratio, get_sharpe_ratio, get_sortino_ratio, get_tracking_error, get_treynor_ratio; 14 for get_ulcer_performance_index."
    • changedInput schema / properties / start_date / default
      Previous value: -"2021-07-15"New value: +"2021-08-20"
    • addedInput schema / properties / trials_window
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Value for trials_window.",
      +  "title": "Trials Window"
      +}
  3. Changed10 schema fields changed
    • addedInput schema / properties / adjustment
      Added value: +{
      +  "default": 0.1,
      +  "description": "Value for adjustment.",
      +  "title": "Adjustment",
      +  "type": "number"
      +}
    • addedInput schema / properties / cumulative
      Added value: +{
      +  "default": false,
      +  "description": "Return the cumulative value compounded over time instead of the discrete value per period. Always rebased to start at 1 at the beginning of the selected date range.",
      +  "title": "Cumulative",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / end_date / default
      Previous value: -"2026-07-09"New value: +"2026-07-14"
    • changedInput schema / properties / indicator / enum
      Previous value: -[
      -  "get_alpha",
      -  "get_beta",
      -  "get_capital_asset_pricing_model",
      -  "get_compound_growth_rate",
      -  "get_factor_asset_correlations",
      -  "get_factor_correlations",
      -  "get_fama_and_french_model",
      -  "get_information_ratio",
      -  "get_jensens_alpha",
      -  "get_m2_ratio",
      -  "get_sharpe_ratio",
      -  "get_sortino_ratio",
      -  "get_tracking_error",
      -  "get_treynor_ratio",
      -  "get_ulcer_performance_index"
      -]New value: +[
      +  "get_alpha",
      +  "get_beta",
      +  "get_burke_ratio",
      +  "get_calmar_ratio",
      +  "get_capital_asset_pricing_model",
      +  "get_compound_growth_rate",
      +  "get_correlation_matrix",
      +  "get_covariance_matrix",
      +  "get_downside_capture_ratio",
      +  "get_excess_return",
      +  "get_factor_asset_correlations",
      +  "get_factor_correlations",
      +  "get_fama_and_french_model",
      +  "get_gain_to_pain_ratio",
      +  "get_information_ratio",
      +  "get_jensens_alpha",
      +  "get_kappa_ratio",
      +  "get_m2_ratio",
      +  "get_omega_ratio",
      +  "get_returns",
      +  "get_sharpe_ratio",
      +  "get_sortino_ratio",
      +  "get_sterling_ratio",
      +  "get_tracking_error",
      +  "get_treynor_ratio",
      +  "get_ulcer_performance_index",
      +  "get_upside_capture_ratio",
      +  "get_win_rate"
      +]
    • addedInput schema / properties / minimum_acceptable_return
      Added value: +{
      +  "default": 0,
      +  "description": "The minimum acceptable return (MAR) threshold below which returns are considered downside, e.g. 0.0 for downside relative to a zero return.",
      +  "title": "Minimum Acceptable Return",
      +  "type": "number"
      +}
    • addedInput schema / properties / order
      Added value: +{
      +  "default": 3,
      +  "description": "Value for order.",
      +  "title": "Order",
      +  "type": "integer"
      +}
    • changedInput schema / properties / rolling / description
      Previous value: -"Value for rolling."New value: +"Rolling window size in number of periods. When set, the metric is computed over a smoothly overlapping trailing window across the full history (e.g. period='monthly' and rolling=6 gives a rolling 6-month value) instead of one value per period, or (for economics indicators) a simple moving average used to smooth the raw series."
    • addedInput schema / properties / standardize
      Added value: +{
      +  "default": false,
      +  "description": "Return the Z-Score (standard score) instead of the raw values, i.e. how many standard deviations each value is from the mean of its own series. When combined with growth=True, the growth values are standardized instead of the raw values.",
      +  "title": "Standardize",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / start_date / default
      Previous value: -"2021-07-10"New value: +"2021-07-15"
    • addedInput schema / properties / within_period
      Added value: +{
      +  "default": true,
      +  "description": "Value for within_period.",
      +  "title": "Within Period",
      +  "type": "boolean"
      +}
  4. Changed2 schema fields changedv2.1.4
    • changedInput schema / properties / end_date / default
      Previous value: -"2026-06-27"New value: +"2026-07-09"
    • changedInput schema / properties / start_date / default
      Previous value: -"2021-06-28"New value: +"2021-07-10"
  5. Changed2 schema fields changedv2.1.3
    • changedInput schema / properties / end_date / default
      Previous value: -"2026-06-23"New value: +"2026-06-27"
    • changedInput schema / properties / start_date / default
      Previous value: -"2021-06-24"New value: +"2021-06-28"
  6. Changed4 schema fields changedv0.1.2
    • changedInput schema / properties / end_date / default
      Previous value: -"2026-06-22"New value: +"2026-06-23"
    • removedInput schema / properties / rounding
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "integer"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Number of decimal places to round results to.",
      -  "title": "Rounding"
      -}
    • addedInput schema / properties / show_columns
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Comma-separated names to filter the output. For historical data use the key names visible in any response record (e.g. 'Close,Volume,Return'). For financial statements use the 'metric' field values from the response (e.g. 'Revenue,Net Income,EBITDA'). Call the tool once without this parameter to see all available names, then repeat with show_columns to reduce response size and token usage.",
      +  "title": "Show Columns"
      +}
    • changedInput schema / properties / start_date / default
      Previous value: -"2021-06-23"New value: +"2021-06-24"
  7. Addedv0.1.1

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, open-world, so the safety profile is covered. The description adds meaningful behavior beyond that: the unsupported 'daily' period, cumulative compounding rebased to 1, rolling=N spanning full history, and multi-ticker support. It does not describe rate limits or failure modes, but for a read-only metric tool this is solid added context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core prose is dense and front-loaded, but the trailing 'Available indicators:' list duplicates the indicator enum already present in the schema, consuming tokens for no new information. The middle paragraph is efficiently packed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 26 parameters and an output schema present, the description need not explain return shapes, and it correctly focuses on the required indicator plus cross-cutting flags. It leaves some generic params (alpha, order, n_trials, trials_window, adjustment) unexplained, but these are largely niche, so the definition is reasonably complete for a dispatch-style metric tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3, but the description adds real semantics the schema does not: cumulative compounding/rebasing behavior, the rolling-window meaning (e.g. monthly + rolling=6), and the tickers multi-value convention. It is above baseline because it clarifies cross-parameter interaction, not just restating individual fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb class (computes) and resource (pre-computed risk-adjusted performance metrics) and enumerates the covered measures: Sharpe, Sortino, Alpha, Beta, CAPM, Treynor, Tracking Error, Information Ratio, Fama-French, etc. That is enough for an agent to distinguish it from siblings like volatility or momentum, though it never explicitly names a competing tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives parameter-level usage rules (tickers='AAPL' required, comma-separated for multiple, period='daily' not supported, cumulative=true rebases to 1), which is real guidance. However it offers no when-to-use/when-not guidance relative to sibling tools such as volatility or risk, so routing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.