Skip to main content
Glama

Backtest a simple strategy on real history

qmax_backtest
Read-onlyIdempotent

Replays a strategy over real hourly trade data with the venues' real fees and reports what it would have done: final value, return, buy-and-hold comparison, max drawdown, fees paid, trades. Decisions are made on an hour's close and filled at the next hour's open; hours with no trades cannot be traded.

Strategies: 'hold' (buy once, hold), 'dca' (spend amountQu every everyHours), 'bands' (buy fractionPct of the QU when the price is bandPct below its lookbackHours average, sell fractionPct of the holding when above, with a cooldown). READ 'warnings' in the result: there is no order book depth in the history, so large amounts are optimistic, and QSwap's flat 100,100 QU fee can swallow small trades. Past results do not predict future ones.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetYesAsset symbol, for example CFB or QDOGE (case does not matter). Use qmax_list_assets to find one.
rangeNo90d
venueNoWhich market's prices: QX (order book), QSwap (pool), 'all' (treat both as one market), or 'auto' (the market the live price comes from).auto
strategyYes
starting_quYesQU to start with, e.g. 10000000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (which already declare readOnly/idempotent/non-destructive), the description discloses the fill model ('decisions on an hour's close, filled at the next hour's open'), that no-trade hours are untradeable, that the history lacks order-book depth so large sizes are optimistic, and the flat QSwap fee risk. That is exactly the kind of behavioral context annotations cannot carry.

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?

Dense but front-loaded — capability and reported outputs come first, mechanics and strategy semantics follow, caveats last. Every sentence carries information, though the strategy paragraph is a long run-on that could be split.

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 no output schema, the description still tells the agent what the result contains and explicitly points to the 'warnings' field. For a read-only, non-persistent simulation tool this covers everything needed to call and interpret it.

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?

Schema coverage is 60%, and the description compensates well: it defines the three strategy types and ties bandPct, fractionPct, lookbackHours and cooldownHours to the 'bands' logic and amountQu/everyHours to 'dca'. Only 'range' is left to self-explanatory enum values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource ('Replays a strategy over real hourly trade data with the venues' real fees') and enumerates the exact outputs (final value, return, buy-and-hold comparison, max drawdown, fees, trades). It is unmistakably a simulation tool, distinct in kind from the get_* siblings, though it never names an alternative to disambiguate.

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?

Usage is strongly implied: the strategy enum is expanded so an agent knows which strategy to pick and which parameters each one consumes, and the 'READ warnings' instruction steers interpretation. There is no explicit when-not-to-use or named alternative, which keeps it 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.