Skip to main content
Glama

Backtesting Arena

Historical analog — conditional forward returns

arena_get_historical_analog
Read-only

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]

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": {
      "preset": "<preset>"
    },
    "name": "arena_get_historical_analog"
  }
}

Input 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. Changed5 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / forward_horizons / items / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / vol_rank_threshold / anyOf
      Added value: +[
      +  {
      +    "const": 5,
      +    "type": "number"
      +  },
      +  {
      +    "const": 10,
      +    "type": "number"
      +  },
      +  {
      +    "const": 20,
      +    "type": "number"
      +  },
      +  {
      +    "const": 50,
      +    "type": "number"
      +  }
      +]
    • removedInput schema / properties / vol_rank_threshold / enum
      Removed value: -[
      -  5,
      -  10,
      -  20,
      -  50
      -]
    • removedInput schema / properties / vol_rank_threshold / type
      Removed value: -"number"
  2. 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"
      +}
  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: -[
      -  "preset",
      -  "context"
      -]New value: +[
      +  "preset"
      +]
  4. 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"
      +}
  5. 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"
      +]
  6. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare readOnlyHint, yet the description discloses substantial behavior: per-horizon n, small-n warnings, point-in-time integrity, an evidence block naming gate_applies_to/threshold/window, study_finding_applies=false for non-default vol_rank_threshold and condition_on_direction, suppression of horizons inside direction_window_days as circular, and withholding of min/max below n=8 because MAE is an extreme-value statistic. It also warns that excess returns can be negative while the raw median is positive — a genuine misinterpretation hazard for an agent.

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 purpose is front-loaded and essentially every sentence carries non-redundant information, but the shape is a single dense paragraph of stacked parentheticals and internal jargon (gate_applies_to, study_finding_applies, vs_unconditional_drift). It is scannable only with effort, and some material (the web-search value proposition) is padding relative to invocation needs.

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 7-parameter tool with no output schema, the description carries the return-shape burden itself: preset_definition, current_state_matches, last_matching_date, vs_unconditional_drift, and the optional path_statistics block are all described. Asset/preset compatibility, caveats, and cross-tool relationships are covered, leaving no obvious gap an agent needs before calling.

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 nevertheless adds conceptual meaning beyond the schema — why vol_rank_threshold asks 'the stricter UNUSUALLY quiet question the null study left open', why direction-window horizons are circular, and that quiet_volatility changes the default horizon set. Most individual parameter mechanics are duplicated from the schema rather than extended, so it stops short of 5.

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 concrete framing question and then names the specific resource: a conditional forward-return distribution (median/IQR/positive-share at 30/90/180/365d) for a named preset cycle state over matched_episodes. It is unmistakably distinct from siblings like arena_get_cycle (current state) or arena_get_volatility_history (the underlying series), and it enumerates the five presets by name.

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?

States what this tool is for versus web search / public APIs and names three siblings with their roles ('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...)'), which amounts to implicit routing. It also gives asset/preset applicability rules (ETH/SOL only for price-derived presets; fear-greed and volatility presets BTC-only). What it lacks is an explicit 'use this instead of X when Y' exclusion statement.

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.