Skip to main content
Glama

crashtestyourstrategy

Backtest integrity check (deflated Sharpe + regime coverage)

backtest_integrity
Read-onlyIdempotent

Confront a backtest claim with its over-optimism failure modes before trusting it. Given an annualized Sharpe + the number of configurations tried + the backtest window (YYYY-MM-DD), returns: the DEFLATED Sharpe — the expected MAXIMUM Sharpe achievable by chance grows with the trial count, so a high in-sample Sharpe is a selection artifact (Bailey & López de Prado); which CRISIS REGIMES were ABSENT from the backtest window (untested, from the historical-anchor catalogue); and a base-rate caveat. If the trial count is unknown — the usual case for an agent reasoning from a backtest — the Sharpe is flagged as not-deflatable / UNPROVEN. All inputs optional; supply as many as known. Descriptive, not advisory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kurtNoKurtosis of the strategy's returns (3 = normal).
skewNoSkewness of the strategy's returns (0 = symmetric).
assetNoAsset context for the regime-coverage check (default: SPY as the equity-crisis reference).
n_trialsNoNumber of configurations tried before selecting this backtest — drives the deflated-Sharpe correction. Unknown → the claim is flagged UNPROVEN.
frequencyNoReturn observations per year (252 = daily bars).
backtest_endNoBacktest window end (YYYY-MM-DD).
backtest_startNoBacktest window start (YYYY-MM-DD) — used to detect crisis regimes the window never contained.
annualized_sharpeNoThe claimed annualized Sharpe ratio of the backtest.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds important behavioral context: 'Descriptive, not advisory' clarifies it won't recommend actions, and the UNPROVEN flag for missing n_trials explains an edge-case behavior. No contradiction 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.

Conciseness4/5

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

The description is four sentences, with the second long sentence using semicolons to list outputs efficiently. Every sentence contributes meaning, and the structure front-loads the purpose. It is dense but not overly verbose.

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?

The description covers the core functionality, the edge case of unknown trial counts, and the advisory nature. Given the output schema exists and the tool has 8 parameters, the description is sufficient without detailing the crisis-regime catalogue internals.

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 the baseline is 3. The description adds the relationship between n_trials and deflation, and backtest window to regime coverage, but most parameter-level semantic meaning is already in the schema. 'All inputs optional' is a usage note rather than semantic enrichment.

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 uses a specific verb ('confront') and identifies the resource ('a backtest claim'). It explicitly lists the three outputs (deflated Sharpe, absent crisis regimes, base-rate caveat), making the tool's function distinct from siblings like challenge_strategy or run_stress_test.

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 phrase 'before trusting it' establishes a clear context for use. The conditional about unknown trial counts gives additional guidance. However, it does not explicitly name alternatives or state when not to use this tool, so it falls 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.1/5.0
Disambiguation4/5

Most tools target distinct resources/actions (regime introspection vs. portfolio stress vs. thesis management), but a few names like run_stress_test vs. portfolio_stress_test could cause confusion. Descriptions help clarify boundaries, but there is enough overlap to mark one point off.

Naming Consistency3/5

Names are mostly snake_case but mix verb_noun (get_dossier, run_stress_test) with noun phrases (factor_decomposition, market_regime_map). The verb style is inconsistent (get/list/run/describe/submit/challenge), though the pattern is readable. This falls between predictable and chaotic.

Tool Count4/5

16 tools is slightly above the typical 3-15 range, but the domain is broad (regime analysis, portfolio stress testing, strategy evaluation, feedback). Most tools are distinct and necessary; only a couple could be merged without loss of functionality.

Completeness4/5

The surface covers core workflows: discovering theses, stress-testing portfolios, analyzing regimes, evaluating strategy robustness, and collecting feedback. Minor gaps exist (e.g., no custom strategy builder, challenge_strategy only supports buy-and-hold), but these are explicitly noted as future work.