Skip to main content
Glama
mnemox-ai

TradeMemory Protocol

by mnemox-ai

validate_strategy

Read-onlyIdempotent

Run statistical validation on a trading strategy using DSR, walk-forward, regime analysis, and CPCV to detect overfitting and assess performance across market conditions.

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

Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds meaningful behavioral context beyond annotations: it explains the four tests performed, mentions the input format requirement (trade log or daily returns CSV), and adds educational/research-only and not-financial-advice disclaimers. It does not contradict 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.

Conciseness4/5

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

The description is moderately sized but well-structured: a one-line purpose statement, a disclaimer, a sentence on required input, and a numbered list of tests. Each sentence earns its place, though the test list could be slightly more compact. No filler or redundant phrasing is present, but it is not as tight as a two-sentence description.

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 a tool with four statistical tests, an output schema, and full schema/annotation support, the description covers the essential aspects: purpose, tests, input format, and disclaimers. It does not describe the output structure, but the output schema exists and reduces the need to do so. It also does not mention error handling or performance constraints, but the complexity is adequately addressed. A 4 reflects solid completeness without being exhaustive.

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 fully describes all four parameters (file_path, format, strategy_name, num_strategies), including column details and defaults. The description's mention of CSV formats and the four tests adds only minimal extra meaning; it does not substantially deepen understanding beyond the schema. Baseline 3 is appropriate given full schema coverage.

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 ('Validate') and names a concrete resource ('a trading strategy') while enumerating the exact statistical tests performed (DSR, Walk-Forward, Regime, CPCV). This clearly distinguishes it from siblings like evolution_run_backtest or get_strategy_performance, which focus on execution or reporting rather than statistical validation.

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 clear usage context: it is for validating strategies via statistical tests, and explicitly restricts use to educational/research purposes ('Not financial advice'). It does not name alternatives or state when not to use it, but the detailed test list implies the appropriate scenario, and the disclaimer sets boundaries. No alternate tool is mentioned, so a small deduction from 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/mnemox-ai/tradememory-protocol'

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