Skip to main content
Glama

Backtesting Arena

Historical analog — conditional forward returns

arena_get_historical_analog

What happened historically after the Bitcoin cycle looked like this? Conditional forward-return distribution for a named preset cycle state — over N DISTINCT historical episodes matching that state (matched_episodes), returns median/IQR/positive-share forward returns (30/90/180/365d) with per-horizon n, small-n warnings, point-in-time integrity and an evidence block that names which field its sample-size gate checked (gate_applies_to), against which threshold, over which data window. A distribution with its sample size. Not obtainable from web search or public market-data APIs — requires point-in-time indicator history and look-ahead-free episode matching. Presets: cycle_bottom_cluster (Cycle bottom cluster), cycle_top_cluster (Cycle top cluster), deep_fear (Deep fear), euphoria (Euphoria), quiet_volatility (Quiet volatility regime). The response opens with "preset_definition" (machine-readable condition set) plus current_state_matches (does the state hold TODAY?) and last_matching_date. Some presets carry a "study_finding" field — a state already investigated, with a NULL result where that is what the study found. EVERY preset returns "vs_unconditional_drift": the raw forward median contains the asset's contemporaneous drift; the drift and excess columns separate the two, and the excess can be negative while the raw median is positive. For quiet_volatility, vol_rank_threshold (fixed steps 5/10/20/50) asks the stricter "UNUSUALLY quiet" question the null study left open, and condition_on_direction conditions episodes on the sign of the first post-anchor move over direction_window_days (default 5) — both mark study_finding_applies=false, and horizons within direction_window_days are suppressed as circular. Also works for asset=ETH/SOL (F2 cycle history), but only price-derived presets (cycle_bottom_cluster, cycle_top_cluster) — fear-greed and volatility presets are BTC-only. Set include_path=true (BTC, predicate presets) to add "path_statistics": what happened ON THE WAY — MAE/MFE, days to trough, days under water (total and longest unbroken streak), days to first recovery (null = never back within the horizon) — over the SAME episodes as forward_returns; below n=8 min/max are withheld because MAE is an extreme-value statistic. Related: arena_get_volatility_history (the series behind the volatility preset), arena_get_cycle (the current state to compare against), arena_dip_scenario (composes this base rate into a tranche structure). [API Pro tier]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetNoWhich asset’s cycle history. Default BTC. ETH/SOL support only price-derived presets (cycle_bottom_cluster, cycle_top_cluster).
presetYesNamed ex-ante cycle-state condition set. One of: cycle_bottom_cluster, cycle_top_cluster, deep_fear, euphoria, quiet_volatility.
include_pathNoDefault false. true adds path_statistics per horizon (MAE/MFE, days under water, longest under-water streak, days to first recovery) over the same episodes as forward_returns. BTC and predicate presets only (not quiet_volatility, not ETH/SOL in v1).
forward_horizonsNoForward-return horizons in days. Default [30, 90, 180, 365] — except for quiet_volatility, which defaults to the horizons its study actually tested ([30, 90, 180]); anything beyond that is flagged as outside the protocol.
vol_rank_thresholdNoquiet_volatility only. Reference threshold as a FIXED step: 50 (default, below trailing median — the studied definition) or 5/10/20 (unusually quiet: RV30 below its trailing Nth percentile). Any value other than 50 sets study_finding_applies=false — the null study covered only the default.
direction_window_daysNoClassification window for condition_on_direction (default 5). Only meaningful together with condition_on_direction.
condition_on_directionNoquiet_volatility only. Condition episodes on the direction of the FIRST post-anchor move (sign of the direction_window_days-day return). Horizons <= direction_window_days are suppressed as circular. Sets study_finding_applies=false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / include_path
      Added value: +{
      +  "description": "Default false. true adds path_statistics per horizon (MAE/MFE, days under water, longest under-water streak, days to first recovery) over the same episodes as forward_returns. BTC and predicate presets only (not quiet_volatility, not ETH/SOL in v1).",
      +  "type": "boolean"
      +}
  2. 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: -[
      -  "preset",
      -  "context"
      -]New value: +[
      +  "preset"
      +]
  3. Changed3 schema fields changed
    • addedInput schema / properties / condition_on_direction
      Added value: +{
      +  "description": "quiet_volatility only. Condition episodes on the direction of the FIRST post-anchor move (sign of the direction_window_days-day return). Horizons <= direction_window_days are suppressed as circular. Sets study_finding_applies=false.",
      +  "enum": [
      +    "up",
      +    "down"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / direction_window_days
      Added value: +{
      +  "description": "Classification window for condition_on_direction (default 5). Only meaningful together with condition_on_direction.",
      +  "maximum": 90,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / vol_rank_threshold
      Added value: +{
      +  "description": "quiet_volatility only. Reference threshold as a FIXED step: 50 (default, below trailing median — the studied definition) or 5/10/20 (unusually quiet: RV30 below its trailing Nth percentile). Any value other than 50 sets study_finding_applies=false — the null study covered only the default.",
      +  "enum": [
      +    5,
      +    10,
      +    20,
      +    50
      +  ],
      +  "type": "number"
      +}
  4. Changed3 schema fields changed
    • changedInput schema / properties / forward_horizons / description
      Previous value: -"Forward-return horizons in days. Default [30, 90, 180, 365]."New value: +"Forward-return horizons in days. Default [30, 90, 180, 365] — except for quiet_volatility, which defaults to the horizons its study actually tested ([30, 90, 180]); anything beyond that is flagged as outside the protocol."
    • changedInput schema / properties / preset / description
      Previous value: -"Named ex-ante cycle-state condition set. One of: cycle_bottom_cluster, cycle_top_cluster, deep_fear, euphoria."New value: +"Named ex-ante cycle-state condition set. One of: cycle_bottom_cluster, cycle_top_cluster, deep_fear, euphoria, quiet_volatility."
    • changedInput schema / properties / preset / enum
      Previous value: -[
      -  "cycle_bottom_cluster",
      -  "cycle_top_cluster",
      -  "deep_fear",
      -  "euphoria"
      -]New value: +[
      +  "cycle_bottom_cluster",
      +  "cycle_top_cluster",
      +  "deep_fear",
      +  "euphoria",
      +  "quiet_volatility"
      +]
  5. First observed

TDQS

A4.3/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so thoroughly: small-n warnings, the evidence block's gate_applies_to, study_finding NULL semantics, vs_unconditional_drift separating raw drift from excess, circular-horizon suppression, min/max withheld below n=8, and the [API Pro tier] requirement. This is well beyond what any structured field declares.

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 core purpose is front-loaded in the first clause, but the body is a dense ~450-word block with heavy parenthetical stacking that is hard to scan. Most sentences do carry non-redundant information, but the volume and nesting hurt readability and some preset/parameter detail duplicates the schema.

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?

There is no output schema, so the description must carry the return shape and it does: preset_definition, current_state_matches, last_matching_date, study_finding, vs_unconditional_drift, evidence, and path_statistics with its own suppression rule. Nothing an agent needs to interpret the response is missing.

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 all seven parameters, including the fixed-step enum for vol_rank_threshold and the circularity rule for condition_on_direction. The description largely restates these rather than adding syntax or format detail the schema lacks, so the 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 resource and output: a conditional forward-return distribution for a named preset cycle state, over matched historical episodes. It also distinguishes itself from siblings by explicitly naming arena_get_volatility_history, arena_get_cycle, and arena_dip_scenario and stating the relationship to each. An agent can tell exactly what this returns 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 Guidelines4/5

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

Gives rich conditional context: which presets apply per asset, what include_path adds, when study_finding_applies is false, and names three related tools with their differing roles (the series behind the preset, the current state, the tranche composer). It lacks an explicit 'use this instead of X when Y' exclusion, but the routing context is strong.

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.