Skip to main content
Glama

Validate overfitting (CSCV)

validate_overfitting

Compute probability that best backtested variant is overfitting via CSCV. Input a returns matrix to get the overfitting probability.

Instructions

Probability (0 to 1) that picking the best of several backtested variants was overfitting, by CSCV over every variant's returns. 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
seedNoSampling seed; default 42.
matrixYesReturns as fractions: one row per period, one column per variant.
n_splitsNoEven number of blocks, at least 2; default 16.
max_combinationsNoMost splits evaluated, up to 2000 (default).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.6.0
    • addedInput schema / properties / matrix / description
      Added value: +"Returns as fractions: one row per period, one column per variant."
    • addedInput schema / properties / max_combinations / description
      Added value: +"Most splits evaluated, up to 2000 (default)."
    • addedInput schema / properties / n_splits / description
      Added value: +"Even number of blocks, at least 2; default 16."
    • addedInput schema / properties / seed / description
      Added value: +"Sampling seed; default 42."
  2. First observedv0.5.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover non-destructive and open-world traits. The description adds meaningful interpretation beyond them: the result is not 'admission to anything' and is not a forecast, which prevents misuse. It also makes the output scale explicit. It does not discuss seed-driven stochasticity, but the schema already exposes the seed parameter.

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

Conciseness5/5

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

Two tight sentences with the core output and method front-loaded. The caveat sentence earns its place by guarding against over-interpreting the probability, and no words are wasted.

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 single-output numeric validation tool, the description plus the fully covered schema is largely sufficient: matrix orientation, output scale, and interpretation are covered. It is slightly under-specified regarding explicit selection among related validators, but that is a minor gap here.

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 coverage is 100%, so parameters are already well documented. The description only reinforces the matrix as returns across variants; it adds no new semantics for seed, n_splits, or max_combinations beyond what the schema already provides.

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 computation: probability (0 to 1) that picking the best of several backtested variants was overfitting, using CSCV over all variant returns. The verb, resource, and method are clear and distinct from siblings like validate_deflated_sharpe or validate_breadth.

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

Usage Guidelines3/5

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

The intended context is implied: use when there are multiple backtested variants with a returns matrix. However, the description does not explicitly say when to prefer this over sibling validators, nor does it name alternatives or exclusions, so the agent must infer applicability.

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