Skip to main content
Glama

verify_backtest_series

Read-onlyIdempotent

Checks returns series for hidden backtest flaws: look-ahead bias, autocorrelation, regime dependence, tail risk, overfitting. Returns verdict and flagged checks.

Instructions

Run the checks a Deflated-Sharpe pass STILL misses — on the actual returns series. Catches same-bar look-ahead, autocorrelation-inflated Sharpe (HAC), regime dependence / cherry-picked windows, drawdown & tail fantasy, one-lucky-epoch fragility (block bootstrap), overfitting beyond n_trials (PBO), and volatility-clustering. Returns a combined verdict + the checks that flagged. Pass positions+asset_returns for the leakage check, turnover for cost, candidates (a matrix) for PBO.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyYesYour metering key — any stable string identifying you; it tracks your free-tier calls and prepaid credit balance.
returnsYesThe strategy's per-period return series (the actual numbers, not a summary).
turnoverNoOptional per-period turnover — enables the breakeven-cost check.
positionsNoOptional aligned position/signal series — enables the same-bar look-ahead (leakage) check.
candidatesNoOptional matrix (rows = the candidate strategies you picked the winner from) — enables PBO.
asset_returnsNoOptional aligned underlying-asset returns — needed with `positions` for the leakage check.
periods_per_yearNoPeriods per year for annualization (252 daily).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
riskNonone / medium / high / critical — the worst flagged check (look-ahead & overfit = critical).
flagsNoNames of the checks that tripped.
checksNoPer-check results (hac_sharpe, regime_stability, drawdown, bootstrap_stability, permutation, leakage, pbo, …).
verdictNo
n_checksNo
survivesNoTrue only if NO integrity check flags.
Behavior5/5

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

The description discloses that the tool 'Returns a combined verdict + the checks that flagged' and lists the specific analyses it performs. Annotations already indicate read-only, idempotent, and non-destructive behavior, but the description enriches this with detail about the checks and output format. No contradictions with annotations.

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?

The description is three sentences long, each packed with useful information: the first distinguishes the tool, the second lists checks, and the third explains output and param usage. There is no fluff or redundancy, and the main purpose is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 7 parameters and an existing output schema, the description covers the essential behavioral contract: what checks are performed, what parameters enable what, and what the return value looks like. The existence of the output schema means detailed return fields need not be described. It also clearly positions the tool within the verify_* family, making it complete for agent selection and invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description synthesizes the roles of optional parameters: 'Pass positions+asset_returns for the leakage check, turnover for cost, candidates (a matrix) for PBO.' While the schema descriptions already state this, the description adds value by grouping parameters and linking them to checks, aiding the agent in constructing a correct invocation. With 100% schema coverage, the baseline is 3; this extra synthesis earns a 4.

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?

The description opens with 'Run the checks a Deflated-Sharpe pass STILL misses — on the actual returns series,' which names a specific verb, resource, and scope. It then enumerates concrete checks (same-bar look-ahead, HAC, regime dependence, etc.), clearly distinguishing it from sibling tools like verify_backtest.

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 provides explicit conditional guidance: 'Pass positions+asset_returns for the leakage check, turnover for cost, candidates (a matrix) for PBO.' It also implies the tool is for in-depth checks beyond a Deflated-Sharpe pass, giving context for when to use it. However, it does not explicitly name alternatives or state when not to use it, so it falls just short of a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ipezygj/numguard'

If you have feedback or need assistance with the MCP directory API, please join our Discord server