Skip to main content
Glama

Backtesting Arena

Run Backtest on a Pair Universe (async)

arena_run_universe_backtest

Does this strategy hold up across a whole universe? Runs it against every pair in the universe. Pair cap depends on your API tier: Pro 50, Power 250. A job has a 300-second budget at roughly 1.5 s per pair (estimated_seconds in the create-response), so about 150 pairs finish reliably — a longer list can end as failed (worker_timeout) and still uses one of the daily universe runs; split it into two jobs. Keep ONE pair set per comparison: merging results across different pair sets measures pair selection, not strategy quality. THIS CALL IS ASYNCHRONOUS AND RETURNS NOTHING BUT A job_id: the result is NOT in this response. You MUST poll arena_get_job_status until status is 'completed'. Provide either universe_id (call arena_list_universes) OR explicit pairs[]. Benchmarks bnh_fixed and dca_reference_v2 are accepted here — run one of them over the SAME universe and interval alongside: an excess over buy-and-hold is only readable next to the buy-and-hold value itself, which can be negative. beats_bh_count compares each pair's cagr against the LIKE-FOR-LIKE buy-and-hold — the benchmark measured over the window the strategy actually traded, not from the requested start. A long warmup or a pair listed after date_from shifts that start, and comparing across two different windows is a handicap, not a benchmark. The old pairing is still reported as beats_bh_count_requested_window, and pairs_with_window_offset says on how many pairs the two can differ at all; per-pair, buyhold_cagr_strategy_window and benchmark_matches_window carry the same distinction. PERSISTENCE: universe results live ONLY in the job response (api_jobs.result). They are deliberately not written to backtest_runs, so they carry no filter_binding and no coin-denominated history, and you will not find them later via arena_list_backtests — copy what you need out of the job result. SURVIVORSHIP: the job result carries survivorship {basis: current_membership, delisted_included: false} — universes and pair lists are today's pairs, earlier delistings are missing. Per-day quota: Pro=5, Power=50. [API Pro tier]

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "strategy": "<strategy>",
      "interval": "<interval>",
      "date_from": "<date_from>"
    },
    "name": "arena_run_universe_backtest"
  }
}

Input Schema

NameRequiredDescriptionDefault
pairsNoExplicit pair list. Hard schema limit 250; the effective cap is your tier (Pro 50, Power 250). Use instead of universe_id.
paramsNoStrategy-specific parameters applied to EVERY pair in the universe. Omit for audited defaults.
capitalNoStarting capital in quote currency. Default 10000. Affects absolute figures only, not CAGR or win-rate.
date_toNoEnd date, YYYY-MM-DD. Default: today.
filtersNoOptional entry filters (Pro+). Each one only ever REMOVES entries — filters never create trades. Omit for the unfiltered baseline.
intervalYesCandle interval: '1d' daily, '2d'/'3d' multi-day, '1w' weekly, '1M' monthly. Multi-day candles (2d/3d) are anchored to the Unix epoch, so one of n possible alignments is used. Measured on our own corpus, the choice of alignment alone moves CAGR by 6.66 pp on average (max 12.30). Treat differences below that as not distinguishable — 1d/2d/3d behaved as one block in our tests, not a ranking.
strategyYesStrategy key — call arena_list_strategies.
date_fromYesStart date, YYYY-MM-DD. Earlier than the pair listing is clamped to the first available candle.
universe_idNoPre-curated universe — call arena_list_universes for valid IDs. Capped by tier (Pro 50, Power 250); a larger universe is rejected rather than silently truncated.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / params / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / filters / properties / stochRsiWeekly
      Added value: +{
      +  "description": "Asset-specific weekly Stoch-RSI gate: entries only while the pair's weekly StochRSI(14) sits above its SMA(3). Default false.",
      +  "type": "boolean"
      +}
  3. 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: -[
      -  "strategy",
      -  "interval",
      -  "date_from",
      -  "context"
      -]New value: +[
      +  "strategy",
      +  "interval",
      +  "date_from"
      +]
  4. Changed3 schema fields changed
    • changedInput schema / properties / pairs / description
      Previous value: -"Explicit pair list (max 50). Use instead of universe_id."New value: +"Explicit pair list. Hard schema limit 250; the effective cap is your tier (Pro 50, Power 250). Use instead of universe_id."
    • changedInput schema / properties / pairs / maxItems
      Previous value: -50New value: +250
    • changedInput schema / properties / universe_id / description
      Previous value: -"Pre-curated universe — call arena_list_universes for valid IDs. Max 50 pairs."New value: +"Pre-curated universe — call arena_list_universes for valid IDs. Capped by tier (Pro 50, Power 250); a larger universe is rejected rather than silently truncated."
  5. Changed2 schema fields changed
    • changedInput schema / properties / interval / description
      Previous value: -"Candle interval: '1d' daily, '1w' weekly, '1M' monthly."New value: +"Candle interval: '1d' daily, '2d'/'3d' multi-day, '1w' weekly, '1M' monthly. Multi-day candles (2d/3d) are anchored to the Unix epoch, so one of n possible alignments is used. Measured on our own corpus, the choice of alignment alone moves CAGR by 6.66 pp on average (max 12.30). Treat differences below that as not distinguishable — 1d/2d/3d behaved as one block in our tests, not a ranking."
    • changedInput schema / properties / interval / enum
      Previous value: -[
      -  "1d",
      -  "1w",
      -  "1M"
      -]New value: +[
      +  "1d",
      +  "2d",
      +  "3d",
      +  "1w",
      +  "1M"
      +]
  6. Changed11 schema fields changed
    • addedInput schema / properties / capital / description
      Added value: +"Starting capital in quote currency. Default 10000. Affects absolute figures only, not CAGR or win-rate."
    • addedInput schema / properties / date_from / description
      Added value: +"Start date, YYYY-MM-DD. Earlier than the pair listing is clamped to the first available candle."
    • addedInput schema / properties / date_to / description
      Added value: +"End date, YYYY-MM-DD. Default: today."
    • addedInput schema / properties / filters / description
      Added value: +"Optional entry filters (Pro+). Each one only ever REMOVES entries — filters never create trades. Omit for the unfiltered baseline."
    • addedInput schema / properties / filters / properties / altcoinSeasonMode / description
      Added value: +"Altcoin-Season gate. 'conservative' needs a confirmed alt season, 'aggressive' an early one. Default 'off'."
    • addedInput schema / properties / filters / properties / atrMode / description
      Added value: +"ATR volatility regime filter. 'low'/'high' restrict entries to that volatility band, 'expansion' to rising volatility. Default 'off'."
    • addedInput schema / properties / filters / properties / bullmarketStageMode / description
      Added value: +"Bull-market stage gate from the BTC cycle model; rising strictness from 'early' to 'strict'. Default 'off'."
    • changedInput schema / properties / filters / properties / minProfitGuardThreshold / description
      Previous value: -"Per-trade min profit guard (negative cap, e.g. -10)."New value: +"Per-trade min profit guard (negative cap, e.g. -10 = exit once a trade is 10% under water)."
    • changedInput schema / properties / filters / properties / wma200 / description
      Previous value: -"200-week MA filter (BTC-derived)."New value: +"200-week MA filter (BTC-derived): only take entries while BTC trades above its 200-week SMA."
    • addedInput schema / properties / interval / description
      Added value: +"Candle interval: '1d' daily, '1w' weekly, '1M' monthly."
    • addedInput schema / properties / params / description
      Added value: +"Strategy-specific parameters applied to EVERY pair in the universe. Omit for audited defaults."
  7. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false / idempotentHint=false / destructiveHint=false; the description carries the real behavior: the call is asynchronous and returns only a job_id, a 300-second / ~1.5 s-per-pair budget that can end in worker_timeout while still consuming a daily universe run, and per-tier quota numbers (Pro=5, Power=50). It also discloses persistence (results live only in api_jobs.result, never in backtest_runs, no filter_binding, not findable via arena_list_backtests) and survivorship bias (current_membership, delisted_included: false) — all material and none of it in 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?

Front-loaded with the purpose question, then quota/budget, then the async contract, then caveats — a sensible order for a dense tool. It is long and slightly repetitive in the benchmark-window section (beats_bh_count, beats_bh_count_requested_window, and the per-pair fields cover the same distinction three ways), but nearly every sentence carries non-obvious operational risk rather than filler.

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?

For a 9-parameter, async, quota-consuming, universe-scoped tool with no output schema, the description covers the return contract (job_id only), the polling requirement, timeout risk, persistence limits, survivorship bias and benchmark interpretation. Nothing an agent needs in order to call it correctly or interpret the result appears to be missing.

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, but the description adds meaning the schema does not: the pairs/universe_id mutual exclusivity ('OR'), that the schema's hard 250 max is not the effective cap (Pro 50, Power 250, larger universes rejected rather than truncated), and that benchmarks bnh_fixed / dca_reference_v2 are valid pair entries here. It does not restate capital, filters or interval semantics, which the schema already covers well.

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?

Opens with a scope question and answers it with a specific verb+resource: 'Runs it against every pair in the universe.' That distinguishes it from the single-pair sibling (arena_run_backtest) and from the grid variant by the words 'whole universe' / 'every pair', so an agent can pick correctly without opening the schema.

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?

Gives concrete routing rules: 'Provide either universe_id (call arena_list_universes) OR explicit pairs[]', and names the mandatory follow-up 'You MUST poll arena_get_job_status until status is completed'. It also states a when-not condition (exceeding ~150 pairs should be split into two jobs) and a comparison hygiene rule (keep ONE pair set per comparison). Little is left to inference.

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.