Skip to main content
Glama

Validate deflated Sharpe

validate_deflated_sharpe

Compute the deflated Sharpe probability that a selected strategy's Sharpe exceeds the luck benchmark across tried variants from seven statistics or a return series.

Instructions

Deflated Sharpe ratio: the probability (0 to 1) that the selected strategy's Sharpe beats the best that luck gives across the variants tried, with the probabilistic Sharpe and that luck benchmark. Send the seven statistics or a return series. With every variant's returns use validate_overfitting; luck as a trial count, validate_luck_trials; a multiple-testing haircut, validate_haircut_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 of returns; 0 if Normal.
returnsNoPeriodic returns as fractions (0.01 = 1%), oldest first; replaces the Sharpe, observations, skew and kurtosis.
observationsNoNumber of return observations.
periods_per_yearNoPeriods per year: 252 daily, 365 crypto, 52 weekly, 12 monthly.
non_excess_kurtosisNoKurtosis, not excess kurtosis; 3 if Normal.
observed_sharpe_annualizedNoAnnualized Sharpe as observed.
effective_independent_trialsNoIndependent variants tried before choosing this one.
cross_trial_sharpe_sd_annualizedNoStandard deviation of annualized Sharpe across those trials.

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. Changed6 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 / 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 / skew / description
      Previous value: -"Skewness of the returns; below -0.5 the reading warns that the counts are too generous."New value: +"Skewness of returns; 0 if Normal."
    • 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. Changed8 schema fields changedv0.6.0
    • addedInput schema / properties / cross_trial_sharpe_sd_annualized / description
      Added value: +"Standard deviation of the annualized Sharpe across those trials."
    • addedInput schema / properties / effective_independent_trials / description
      Added value: +"Independent variants tried before choosing this one."
    • addedInput schema / properties / non_excess_kurtosis / description
      Added value: +"Kurtosis, not excess kurtosis; 3 if Normal."
    • addedInput schema / properties / observations / description
      Added value: +"Number of return observations."
    • addedInput schema / properties / observed_sharpe_annualized / description
      Added value: +"Annualized Sharpe as observed."
    • addedInput schema / properties / periods_per_year / description
      Added value: +"Observations per year: 252 daily, 365 daily crypto, 52 weekly, 12 monthly."
    • addedInput schema / properties / returns / description
      Added value: +"Periodic returns as fractions (0.01 is 1%), oldest first; replaces the Sharpe, observations, skew and kurtosis fields."
    • addedInput schema / properties / skew / description
      Added value: +"Skewness of the returns; below -0.5 the reading warns that the counts are too generous."
  4. First observedv0.5.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=false, openWorldHint=true and readOnlyHint=false, so the safety profile is largely covered. The description adds an interpretive caveat ('not admission to anything and is not a forecast') that usefully frames the result as non-decisional, but it says nothing about cost, rate limits, or determinism. With annotations doing the safety work, a 3 is appropriate.

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?

Front-loaded with the core definition before the input modes and sibling routing, and every sentence carries content. It is dense for a single paragraph, but no sentence is wasted; the closing caveat is long yet load-bearing.

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 an 8-parameter statistical validator with 100% schema coverage, an output schema, and annotations present, the description covers input modes, sibling routing, and result interpretation adequately. Return values need not be explained given the output schema, so remaining gaps are minor.

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 eight parameters (including the returns-replaces-four-statistics note) are already documented in the schema. The description only hints at the two input modes ('seven statistics or a return series'), adding marginal value beyond the structured fields. Baseline 3.

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 the selected strategy's Sharpe beats the best that luck gives across the variants tried') with its two outputs (probabilistic Sharpe and the luck benchmark). It also routes explicitly to three named siblings, so an agent can distinguish it from validate_overfitting, validate_luck_trials and validate_haircut_sharpe without opening any 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?

Gives the alternative-input condition ('Send the seven statistics or a return series') and names three alternatives with the condition that selects each: variant-level returns -> validate_overfitting, trial counts -> validate_luck_trials, multiple-testing haircut -> validate_haircut_sharpe. Explicit when-to-use routing, nothing left to inference.

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