Skip to main content
Glama
mnemox-ai

TradeMemory Protocol

by mnemox-ai

Validate Strategy

validate_strategy
Read-onlyIdempotent

Validate trading strategies by uploading a QuantConnect trade log or daily returns CSV, then run DSR, walk-forward, regime, and CPCV tests to detect overfitting.

Instructions

Validate a trading strategy using statistical tests (DSR + Walk-Forward + Regime + CPCV).

For educational and research purposes only. Not financial advice.

Upload a trade log CSV (QuantConnect format) or daily returns CSV. The tool runs four statistical tests:

  1. Deflated Sharpe Ratio (DSR) — detects overfitting from multiple testing

  2. Walk-Forward Validation — checks out-of-sample consistency

  3. Regime Analysis — performance across bull/bear/crisis markets

  4. CPCV — cross-validated Sharpe stability across time periods

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoCSV format — "quantconnect" for trade logs (columns: Entry Time, Exit Time, Direction, Entry Price, Exit Price, Quantity, P&L, Fees, IsWin) or "returns" for daily returns (columns: date,return or single column of returns).quantconnect
file_pathYesAbsolute path to the CSV file on your local machine.
strategy_nameNoName of the strategy (for the report).
num_strategiesNoHow many strategies you tested before picking this one. Higher M = stricter DSR threshold (corrects for selection bias).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.4

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description adds meaningful behavioral context: it explains what each statistical test detects (overfitting, out-of-sample consistency, regime behavior, cross-validated stability), which is beyond the annotations.

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

Conciseness3/5

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

The purpose is front-loaded, which is good, but the four tests are named in the opening sentence and then re-listed in an overlapping numbered block, creating redundancy. The educational disclaimer is fine but the test list doubles up space without adding information.

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. The description adequately covers inputs and the analytical steps for a validation tool. It is slightly thin on prerequisites (e.g., minimum data requirements) but otherwise complete.

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 schema already documents format, file_path, strategy_name, and num_strategies with their meanings and defaults. The description only echoes the CSV format options already in the schema, adding no new parameter detail; baseline 3 applies.

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 verb (validate) and resource (trading strategy) and enumerates the exact methods used (DSR, Walk-Forward, Regime, CPCV). This clearly distinguishes it from siblings like evolution_run_backtest and compute_dqs, which do different things.

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?

It describes the input needed (trade log CSV or daily returns CSV) but gives no explicit guidance on when to use this versus evolution_run_backtest or the other analysis siblings, and no when-not conditions. Usage is implied by the description rather than spelled out.

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