Skip to main content
Glama
JerBouma

Finance Toolkit

by JerBouma

performance

Read-onlyIdempotent

Calculate risk-adjusted performance metrics such as Sharpe ratio, Sortino ratio, Alpha, and Beta for any set of tickers. Supports rolling windows and cumulative returns.

Instructions

Pre-computed risk-adjusted performance metrics (Sharpe ratio, 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_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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lagNoNumber of periods to lag when computing growth rates.
orderNoValue for order.
growthNoReturn period-over-period growth rates instead of absolute values.
methodNoValue for method.multi
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.
tickersNoComma-separated ticker symbols, e.g. 'AAPL,MSFT,GOOGL'.
end_dateNoEnd of the date range in YYYY-MM-DD format.2026-07-14
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-07-15
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.
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.
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
Behavior4/5

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

Annotations already indicate readOnly, openWorld, and idempotent. The description adds that metrics are pre-computed and details specific behaviors like cumulative compounding and rolling windows, which enriches transparency without contradiction.

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 description is long and dense, listing many indicators in a paragraph. It would benefit from better structure (e.g., bullet points) and could be more concise while retaining necessary detail.

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?

Given the tool's complexity (22 parameters, many indicators) and the existence of an output schema, the description covers main aspects: available indicators, parameter dependencies, constraints, and examples. It is fairly complete but could briefly mention typical use cases.

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

Parameters5/5

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

With 100% schema description coverage, each parameter already has a baseline description. The tool's description adds significant value by explaining nuanced behaviors for key parameters like cumulative, rolling, tickers, and period, going beyond the schema.

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

Purpose5/5

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

The description clearly states the tool computes pre-computed risk-adjusted performance metrics like Sharpe ratio, Beta, etc. It lists many specific indicators and differentiates from sibling tools which cover other financial categories (e.g., breadth, discovery).

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

Usage Guidelines4/5

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

The description provides explicit usage constraints: requires tickers with commas, does not support period='daily', and explains that omitting indicator lists available options. It could be stronger on when to use vs. alternatives, but the context of sibling tools makes it clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JerBouma/FinanceToolkit'

If you have feedback or need assistance with the MCP directory API, please join our Discord server