Skip to main content
Glama

Luck-equivalent trials

validate_luck_trials

Estimate how many skill-less trials a search needs for its best Sharpe to arise by luck, and the chance it did given a trial count.

Instructions

How many skill-less strategies a search would need for its best to reach this Sharpe by luck (Monte Carlo), and with a trial count, the chance it did. States luck as the best of N random tries; for the probability the Sharpe is real, 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
skewNoSkewness; below -0.5 the reading warns the counts are too generous.
observationsYesReturn observations behind the Sharpe.
autocorrelationNoLag-1 autocorrelation of returns, -1 to 1; default 0. Corrects the annualized Sharpe (Lo 2002).
periods_per_yearYesPeriods per year: 252 daily, 365 crypto, 52 weekly, 12 monthly.
observed_sharpe_annualizedYesAnnualized Sharpe as observed.
effective_independent_trialsNoIndependent trials tried; adds the chance the best reached this Sharpe by luck.

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. Changed7 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 / autocorrelation / description
      Previous value: -"First-order autocorrelation of the returns, -1 to 1; default 0. Corrects the annualized Sharpe as Lo (2002)."New value: +"Lag-1 autocorrelation of returns, -1 to 1; default 0. Corrects the annualized Sharpe (Lo 2002)."
    • changedInput schema / properties / effective_independent_trials / description
      Previous value: -"Independent trials tried; adds the chance that the best of them reached this Sharpe by luck."New value: +"Independent trials tried; adds the chance the best reached this Sharpe by luck."
    • changedInput schema / properties / observations / description
      Previous value: -"Number of return observations behind the Sharpe ratio."New value: +"Return observations behind the Sharpe."
    • 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 / skew / description
      Previous value: -"Skewness of the returns; below -0.5 the reading warns that the counts are too generous."New value: +"Skewness; below -0.5 the reading warns the counts are too generous."
    • 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

A4.3/5.0
Behavior4/5

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

Annotations already provide the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=true). The description adds Monte Carlo method context and clarifies that luck is the best of N random tries, plus an interpretation caveat. It does not explain why readOnlyHint is false, but it goes beyond the annotations in useful ways.

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 front-loaded sentences: first defines the core output, second gives method and alternative, third adds a caution. No wasted words, though the final sentence is somewhat abstract and could be tightened.

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. For a complex statistical tool, the description covers purpose, method, alternative, and interpretation caveat; required parameters are left to the schema, which is acceptable.

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 six parameters are already fully documented. The description mentions 'with a trial count' mapping to effective_independent_trials, but adds no syntax or format details beyond the schema. Baseline 3 applies when the schema does the heavy lifting.

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: how many skill-less strategies a search would need for its best to reach this Sharpe by luck, and the chance it did with a trial count. It distinguishes itself from validate_deflated_sharpe, so an agent can tell the two apart without opening schemas.

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 directs to validate_deflated_sharpe for the probability the Sharpe is real, and warns that a threshold on deflated Sharpe or overfitting probability is not admission or forecast. This gives clear context for when to use this tool versus its sibling.

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