Skip to main content
Glama

TradingCalc MCP: Options, Forex, Risk Stats, Prediction Markets, On-Chain & Crypto Futures

Sharpe Ratio Statistics

workflow.run_sharpe_stats
Read-only

Sharpe ratio with the Lo (2002) serial-correlation-aware annualization correction, computed in its lag-1 form rather than the full multi-lag sum (the naive sqrt(periods_per_year) scaling overstates or understates the true annualized Sharpe when returns are autocorrelated), plus the Probabilistic Sharpe Ratio (Bailey & Lopez de Prado): the probability the true Sharpe exceeds a benchmark, adjusted for the sample's skewness/kurtosis and length, not just its point estimate. Use when user asks "what's my real annualized Sharpe, not the naive one?" or "how confident can I be this Sharpe ratio is actually good?". Returns: sharpe_period, sharpe_annualized_naive, sharpe_annualized_lo, autocorrelation_lag1, psr, skewness, kurtosis.

Input Schema

NameRequiredDescriptionDefault
returnsYesReturn series, one value per period
benchmark_sharpeNoBenchmark Sharpe ratio for the PSR test, same periodicity as returns (default 0)
periods_per_yearNoPeriods per year for annualization (default 365, crypto convention - trades every day). Any number from 1 to 100 million, e.g. 365.25.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / periods_per_year / description
      Previous value: -"Periods per year for annualization (default 365, crypto convention - trades every day)"New value: +"Periods per year for annualization (default 365, crypto convention - trades every day). Any number from 1 to 100 million, e.g. 365.25."
    • addedInput schema / properties / periods_per_year / maximum
      Added value: +100000000
    • addedInput schema / properties / periods_per_year / minimum
      Added value: +1
  2. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare this a safe read-only, closed-world computation, so the description correctly focuses on methodology. It adds genuinely useful behavioral context: the correction is the lag-1 form rather than the full multi-lag sum, and it explains why naive sqrt(periods_per_year) scaling misleads under autocorrelation, plus it enumerates the returned fields since no output schema exists.

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?

Front-loaded with the core computation and the returns list at the end, but the opening sentence is a dense multi-clause parenthetical pileup that is hard to parse at a glance. Supporting detail earns its place, yet the prose could be split and trimmed without losing meaning.

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 no output schema, listing the return fields (sharpe_annualized_lo, psr, autocorrelation_lag1, skewness, kurtosis) is necessary and correct. Methodology, trigger conditions, and outputs are all covered; only edge-case guidance (min sample size, defaults for periods_per_year) is left entirely to the schema.

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

Parameters3/5

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

Schema description coverage is 100%, so all three parameters (returns, benchmark_sharpe, periods_per_year) are already documented in structured form, including defaults and ranges. The description only alludes to the benchmark ('exceeds a benchmark') and does not add format or interpretation detail beyond the schema.

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?

States a specific computation: Sharpe ratio with Lo (2002) serial-correlation-aware annualization plus Probabilistic Sharpe Ratio, making it immediately distinguishable from a naive Sharpe calculation. It does not name any sibling (e.g., run_dsr, run_unsmoothing) that might overlap, so differentiation is by topic rather than by explicit routing.

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?

Provides concrete trigger phrasings ('what's my real annualized Sharpe, not the naive one?', 'how confident can I be this Sharpe is actually good?') that map directly to the two computations offered. However, it gives no when-not-to-use guidance and does not point to related tools like run_dsr for multiple-testing-adjusted Sharpe.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.