Skip to main content
Glama

Minimum backtest length

validate_backtest_length

Calculate the minimum backtest length required to avoid overfitting, or the maximum independent trials your backtest years allow. Prevent relying on lucky results by checking trial count against track record length.

Instructions

Minimum backtest length, in years, before the best of N independent trials is not expected to reach a target Sharpe by luck, and with backtest_years, the most independent trials those years allow. Send effective_independent_trials, backtest_years, or both. 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
backtest_yearsNoLength of the backtest in years, to get the most independent trials it allows.
target_sharpe_annualizedNoIn-sample annualized Sharpe you would take as a discovery; default 1.
effective_independent_trialsNoIndependent trials (backtests, parameter sets, ideas) tried; gives the minimum backtest length.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations include readOnlyHint=false and destructiveHint=false, but the description adds meaningful behavioral context: the tool computes a statistical threshold and explicitly disclaims that the output is not admission or a forecast. This goes beyond the annotations and helps an agent understand the epistemic limits of the result. It doesn't describe the exact return format, but the disclaimer is valuable.

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?

The description is compact and front-loaded with the core concept, then gives input guidance and a caveat. Every sentence earns its place. It could be slightly clearer about the output, but it is not bloated.

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?

For a statistical validation tool with no output schema, the description covers the purpose, input options, and interpretation limits. It doesn't describe the return value shape, but the core semantics are clear. Given the tool's moderate complexity and the rich schema, this is reasonably complete.

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 the schema already documents all three parameters. The description adds the relationship between the parameters (send one or both) and the default target Sharpe, but it doesn't add much beyond the schema. Baseline 3 is appropriate.

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 purpose: computing minimum backtest length and maximum independent trials given backtest years, with a target Sharpe. It clearly identifies the resource (backtest length) and the verb (validate). It doesn't explicitly name a sibling alternative, but the title and description distinguish it from related validation tools like validate_deflated_sharpe and validate_overfitting.

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 says 'Send effective_independent_trials, backtest_years, or both,' which gives clear input guidance. It also warns that the result is not admission to anything and not a forecast, which helps an agent know when not to over-interpret. It doesn't explicitly contrast with sibling tools, but the context is clear enough for selection.

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