Skip to main content
Glama

Backtesting Arena

Run a Grid-Trading Backtest

arena_run_grid_backtest

Would a grid bot have made money here? Simulate a GRID BOT (buy-low / sell-high ladder inside a fixed price range) on historical candles. Returns final value, return %, CAGR, trade count, fees paid and a Buy & Hold comparison. This is a different machine from the strategy backtester: grid bots earn from oscillation inside a range, not from trend — for signal-based strategies use arena_run_backtest instead. The result depends heavily on the range you choose (low_price / high_price); a range the price left early makes the bot idle, so treat range choice as part of the hypothesis, not a detail — arena_suggest_grid_range proposes a defensible range. Each run is saved to your account (the returned id is the run_id); publish a public snapshot page with arena_share_grid_backtest. Free tier limited to BTCUSDT/ETHUSDT. Per-day quota: Free=5, Pro=50, Power=500. [Free / Pro / Power tier]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pairYesCrypto pair symbol, e.g. BTCUSDT. Free tier: BTCUSDT or ETHUSDT only.
end_dateYesSimulation end, YYYY-MM-DD.
fee_rateYesPer-trade fee fraction, e.g. 0.001 for 0.1% (Binance spot taker).
grid_typeYesLevel spacing: 'arithmetic' = equal price steps, 'geometric' = equal percentage steps (usually the better fit for crypto).
low_priceYesLower bound of the grid range, in quote currency. Below it the bot is fully invested and stops buying.
grid_countYesNumber of grid levels between low_price and high_price (2–200). More levels = more, smaller trades = more fees.
high_priceYesUpper bound of the grid range, in quote currency. Above it the bot is fully in cash and stops selling. Must exceed low_price.
start_dateYesSimulation start, YYYY-MM-DD.
entry_priceNoOptional price at which the bot starts; default is the first close in the range.
stop_loss_priceNoOptional: liquidate the whole grid and stop once price falls to this level.
total_investmentYesCapital in USDT spread across the grid; min 100.
take_profit_priceNoOptional: liquidate the whole grid and stop once price rises to this level.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed3 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / context
      Removed value: -{
      -  "description": "Explain why you are calling this tool and how it fits into the user's overall goal. This parameter is used for analytics and user intent tracking. YOU MUST provide 15-25 words (count carefully). NEVER use first person ('I', 'we', 'you') - maintain third-person perspective. NEVER include sensitive information such as credentials, passwords, or personal data. Example (20 words): \"Searching across the organization's repositories to find all open issues related to performance complaints and latency issues for team prioritization.\"",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "pair",
      -  "start_date",
      -  "end_date",
      -  "total_investment",
      -  "low_price",
      -  "high_price",
      -  "grid_count",
      -  "grid_type",
      -  "fee_rate",
      -  "context"
      -]New value: +[
      +  "pair",
      +  "start_date",
      +  "end_date",
      +  "total_investment",
      +  "low_price",
      +  "high_price",
      +  "grid_count",
      +  "grid_type",
      +  "fee_rate"
      +]
  2. Changed12 schema fields changed
    • addedInput schema / properties / end_date / description
      Added value: +"Simulation end, YYYY-MM-DD."
    • addedInput schema / properties / entry_price / description
      Added value: +"Optional price at which the bot starts; default is the first close in the range."
    • changedInput schema / properties / fee_rate / description
      Previous value: -"Per-trade fee fraction, e.g. 0.001 for 0.1%."New value: +"Per-trade fee fraction, e.g. 0.001 for 0.1% (Binance spot taker)."
    • addedInput schema / properties / grid_count / description
      Added value: +"Number of grid levels between low_price and high_price (2–200). More levels = more, smaller trades = more fees."
    • addedInput schema / properties / grid_type / description
      Added value: +"Level spacing: 'arithmetic' = equal price steps, 'geometric' = equal percentage steps (usually the better fit for crypto)."
    • addedInput schema / properties / high_price / description
      Added value: +"Upper bound of the grid range, in quote currency. Above it the bot is fully in cash and stops selling. Must exceed low_price."
    • addedInput schema / properties / low_price / description
      Added value: +"Lower bound of the grid range, in quote currency. Below it the bot is fully invested and stops buying."
    • addedInput schema / properties / pair / description
      Added value: +"Crypto pair symbol, e.g. BTCUSDT. Free tier: BTCUSDT or ETHUSDT only."
    • addedInput schema / properties / start_date / description
      Added value: +"Simulation start, YYYY-MM-DD."
    • addedInput schema / properties / stop_loss_price / description
      Added value: +"Optional: liquidate the whole grid and stop once price falls to this level."
    • addedInput schema / properties / take_profit_price / description
      Added value: +"Optional: liquidate the whole grid and stop once price rises to this level."
    • changedInput schema / properties / total_investment / description
      Previous value: -"USDT amount; min 100."New value: +"Capital in USDT spread across the grid; min 100."
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that runs are persisted ('Each run is saved to your account'), the returned id is the run_id, free-tier pair restrictions, and per-day quotas. It also hints at the execution characteristic that result depends heavily on range. It does not explicitly state whether the operation is synchronous or asynchronous, but the persistence mention and companion get_backtest tools imply it. Overall, decent coverage.

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 a single dense paragraph, but every sentence earns its place. It front-loads purpose, then differentiates, then gives range guidance, then persistence/sharing, then limits. The opening rhetorical question is a minor stylistic choice but not wasteful. It is well-organized, though slightly long; a 4 reflects the effective use of space rather than excessive brevity.

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 12 parameters and no output schema, the description covers a lot: return metrics, run_id, persistence, tier restrictions, quota, and the range sensitivity caveat. It doesn't explain exact response structure or error handling, but those are likely covered by sibling get_backtest tools. It also doesn't mention stop_loss/take_profit semantics beyond the schema, but the schema already covers them. Overall, adequately complete for the complexity.

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 100%, so the baseline is 3. The description adds value beyond the schema by highlighting the critical interplay of low_price/high_price: 'a range the price left early makes the bot idle' and recommending arena_suggest_grid_range. It also implies entry_price default behavior indirectly via range discussion. This is useful practical guidance not present in the schema.

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 a user-centric question, then clearly states 'Simulate a GRID BOT' and enumerates the exact return values. It immediately distinguishes itself from the strategy backtester by naming the sibling tool (arena_run_backtest) and explaining the conceptual difference between grid and trend. The verb-resource pair is specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly provides when-not guidance: 'for signal-based strategies use arena_run_backtest instead.' It also recommends arena_suggest_grid_range for choosing a defensible range, and arena_share_grid_backtest for publishing. It clarifies that range choice is part of the hypothesis, giving the agent a concrete decision rule. Tier and quota constraints are also relayed.

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

A3.6/5.0
Disambiguation2/5

Many tools cover overlapping market indicators (e.g., cycle state, pulse, bullmarket ampel, volatility phases) and several share similar get_*_history patterns, which could cause an agent to select the wrong one. However, each tool has detailed descriptions with explicit references to related tools to reduce ambiguity.

Naming Consistency3/5

Tool names generally follow a verb_noun pattern (arena_get_*, arena_list_*, arena_run_*, arena_subscribe_*), but there are inconsistencies such as 'validate_strategy' (no arena_ prefix), 'arena_status' (not a clear verb_noun), and variations like 'arena_run_grid_backtest' vs 'arena_run_backtest'.

Tool Count2/5

With 84 tools, the server is heavily over-scoped for a typical MCP server, likely causing navigation and selection overhead. While the domain (crypto backtesting and analytics) is broad, 84 tools exceed reasonable coherence and impose a high cognitive load.

Completeness4/5

The tool surface covers a wide range of analytics (market indicators, backtesting, validation, alerts, subscriptions, reports) with few obvious dead ends. Minor gaps exist like lack of direct portfolio management or strategy editing, but core workflows are well covered.