Skip to main content
Glama

Audit a backtest

audit_backtest

One-call audit of a strategy's returns: deflated Sharpe, minimum track record and, with every variant's returns, the probability of backtest overfitting, each the matching validator's result with its own receipt. Point returns_file at the backtest's CSV or JSON instead of pasting long series. Prefer it to calling the validators one by one; one validation per check. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
returnsNoPeriodic returns as fractions (0.01 = 1%), oldest first; replaces the Sharpe, observations, skew and kurtosis.
n_splitsNoEven number of blocks, at least 2; default 16.
variantsNoOptional returns of every variant tried (this one included), one row per period, one column per variant; adds the overfitting check.
confidenceNoBetween 0 and 1; default 0.95.
returns_fileNoPath to a CSV or JSON of the returns on this machine (not on the hosted endpoint), instead of returns.
variants_fileNoPath to a CSV or JSON with one numeric column per variant, instead of variants.
returns_columnNoColumn name or 1-based position, when returns_file has several numeric columns.
periods_per_yearYesPeriods per year: 252 daily, 365 crypto, 52 weekly, 12 monthly.
benchmark_sharpe_annualizedNoAnnualized Sharpe to beat; default 0.
effective_independent_trialsYesIndependent variants tried before choosing this one.
cross_trial_sharpe_sd_annualizedYesStandard deviation of annualized Sharpe across those trials.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
errorNo
checksNo
limitsNo
not_runNo
readingsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • changedInput schema / properties / cross_trial_sharpe_sd_annualized / description
      Previous value: -"Standard deviation of the annualized Sharpe across those trials."New value: +"Standard deviation of annualized Sharpe across those trials."
    • changedInput schema / properties / periods_per_year / description
      Previous value: -"Observations per year: 252 daily, 365 daily crypto, 52 weekly, 12 monthly."New value: +"Periods per year: 252 daily, 365 crypto, 52 weekly, 12 monthly."
    • changedInput schema / properties / returns / description
      Previous value: -"Periodic returns as fractions (0.01 is 1%), oldest first; replaces the Sharpe, observations, skew and kurtosis fields."New value: +"Periodic returns as fractions (0.01 = 1%), oldest first; replaces the Sharpe, observations, skew and kurtosis."
    • changedInput schema / properties / returns_column / description
      Previous value: -"Header name or 1-based position of the returns column when returns_file has several numeric columns."New value: +"Column name or 1-based position, when returns_file has several numeric columns."
    • changedInput schema / properties / returns_file / description
      Previous value: -"Path to a CSV or JSON file of the returns on the machine running this server, instead of returns. Not available on the hosted endpoint."New value: +"Path to a CSV or JSON of the returns on this machine (not on the hosted endpoint), instead of returns."
    • changedInput schema / properties / variants / description
      Previous value: -"Optional returns of every variant tried, this one included, as fractions: one row per period, one column per variant. Adds the overfitting check."New value: +"Optional returns of every variant tried (this one included), one row per period, one column per variant; adds the overfitting check."
    • changedInput schema / properties / variants_file / description
      Previous value: -"Path to a CSV or JSON file of every variant's returns (one numeric column per variant), instead of variants."New value: +"Path to a CSV or JSON with one numeric column per variant, instead of variants."
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare readOnlyHint=false and openWorldHint=true, and the description adds context consistent with that: each check returns the matching validator's result with its own receipt, and only one validation runs per check. It also discloses an interpretation limit ('not admission to anything and is not a forecast'), which is genuine behavioral guidance. It stops short of saying what is written or persisted, hence 4 rather than 5.

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

Conciseness4/5

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

Three sentences, front-loaded with the aggregate purpose before the input and caveat details. It is dense and one clause ('each the matching validator's result with its own receipt') is grammatically awkward, but no sentence is filler or repetition.

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?

An output schema exists, so return values need not be explained, and with 11 parameters at full schema coverage the description's job is mostly orientation. It covers the aggregation scope, the file-input alternative, the one-check-per-validation constraint, and the interpretation caveat, leaving only minor gaps such as failure behavior when returns_file is unreadable.

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 description coverage is 100%, so the baseline is 3. The description adds real meaning on top of it: returns_file is 'not on the hosted endpoint,' so the agent learns the path is resolved on the local machine, and it clarifies that supplying variants is what adds the overfitting check. That is useful beyond the schema text.

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?

States a specific verb and resource ('One-call audit of a strategy's returns') and enumerates exactly what it computes: deflated Sharpe, minimum track record, and, when variants are supplied, the probability of backtest overfitting. This maps directly onto the sibling validators (validate_deflated_sharpe, validate_track_record, validate_overfitting) so an agent can tell it apart from them without opening a schema.

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

Usage Guidelines5/5

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

Explicitly routes between alternatives: 'Prefer it to calling the validators one by one; one validation per check' and 'Point returns_file at the backtest's CSV or JSON instead of pasting long series.' Both the aggregate-vs-individual choice and the file-vs-inline choice are named with their selecting conditions.

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.