Skip to main content
Glama

Minimum backtest length

validate_backtest_length

Calculate minimum backtest years so the best of N independent trials is not expected to hit a target Sharpe by luck, and find trials allowed. Plan a search before using deflated Sharpe.

Instructions

Minimum backtest length (years) before the best of N independent trials is not expected to reach a target Sharpe by luck; with backtest_years, the most trials those years allow. For planning a search; once it has a result, use validate_deflated_sharpe. 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_yearsNoBacktest length in years, for the most trials it allows.
target_sharpe_annualizedNoIn-sample annualized Sharpe you would call a discovery; default 1.
effective_independent_trialsNoIndependent trials tried (backtests, parameter sets, ideas).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
noteNo
errorNo
limitsNo
receiptNo
computedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.13.0
    • removedOutput schema / additionalProperties
      Removed value: -{}
    • removedOutput schema / properties / data / additionalProperties
      Removed value: -{}
    • changedOutput schema / properties / error / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {},
      -    "properties": {},
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {},
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedOutput schema / properties / receipt / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {},
      -    "properties": {},
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "properties": {},
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Changed5 schema fields changedv0.10.1
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / backtest_years / description
      Previous value: -"Length of the backtest in years, to get the most independent trials it allows."New value: +"Backtest length in years, for the most trials it allows."
    • changedInput schema / properties / effective_independent_trials / description
      Previous value: -"Independent trials (backtests, parameter sets, ideas) tried; gives the minimum backtest length."New value: +"Independent trials tried (backtests, parameter sets, ideas)."
    • changedInput schema / properties / target_sharpe_annualized / description
      Previous value: -"In-sample annualized Sharpe you would take as a discovery; default 1."New value: +"In-sample annualized Sharpe you would call a discovery; default 1."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "description": "data.result holds the statistics (data.plain_reading states them); limits say what the result does not establish; receipt ({id, url}) is the signed record, null when none was stored; error ({code, message}) is set only on refusal.",
      +  "properties": {
      +    "computed": {
      +      "type": "string"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {},
      +      "type": "object"
      +    },
      +    "error": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "properties": {},
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "limits": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "note": {
      +      "type": "string"
      +    },
      +    "receipt": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "properties": {},
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  3. Addedv0.6.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, destructiveHint=false, openWorldHint=true, so safety is partly covered. The description adds an interpretive caution ('not admission to anything and is not a forecast'), but that sentence concerns deflated Sharpe / overfitting thresholds, which read as properties of sibling tools rather than this one, making the added behavioral signal ambiguous.

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 definition is compact and front-loads the core computation, but the final sentence about deflated Sharpe and overfitting thresholds is off-topic for this tool and dilutes focus, and the middle clause is syntactically tangled.

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 described, and the description supplies purpose, planning context, and the sibling handoff. What is missing is any statement of prerequisites or assumptions (e.g., independence of trials) that would let an agent know when the answer is valid.

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% and all three parameters carry their own descriptions, so the schema already does the heavy lifting. The description's mention of backtest_years ('the most trials those years allow') and target Sharpe adds only marginal framing beyond that baseline.

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 names the resource (minimum backtest length in years) and the quantity it is derived from (N independent trials vs. a target Sharpe), and it hints at the inverse query via backtest_years. However, the phrasing is circular and dense ('the most trials those years allow'), so an agent must already understand the underlying statistics to be sure what the call returns.

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?

It gives explicit routing: 'For planning a search; once it has a result, use validate_deflated_sharpe.' That names the alternative and the condition that selects it. It stops short of a full when/when-not matrix (e.g., how it relates to validate_luck_trials or check_feasibility among the many sibling validators).

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