Skip to main content
Glama

start_regime_analysis

Analyze one stock, or check one chosen pair of stocks.

    One stock: HMM regime detection, Hurst exponent, Bollinger/Keltner
    squeeze, Monte Carlo forward simulation.

    A pair (`ticker` and `ticker_b`, e.g. KO and PEP): whether the two
    hold together for spread trading. The QuanterLab pairs check rates
    the evidence that the two prices hold together as strong, mixed or
    weak, with a score out of a hundred, from the Engle-Granger and
    Johansen cointegration tests, the spread's half-life, how much the
    hedge ratio moves, and how often the two stocks share a market
    regime. It is the check to run when someone asks "is X / Y a
    tradable pair?" about any two stocks; `start_pairs_scan` searches a
    whole index for pairs instead.

    Every account runs it within a daily allowance; a refused call does not count, and get_started and
    every run's answer give today's count.

    An analysis takes about 30 seconds to 2 minutes. The call returns
    `{task_id, status, kind, dashboard_url}`; `get_regime_analysis_progress`
    reports progress and, when it has finished, carries `result`: for one
    stock, the regime now and how long it has run, volatility against the
    stock's own history, how the stock behaves (trending, mean reverting
    or a random walk), its trend and its drops, rounded; for a pair, how
    strong the evidence is that the two hold together and the check's
    score, the cointegration tests as p-value bands, the spread's
    half-life, the hedge ratio's variation, the correlation, and how often
    the two shared a regime, rounded.

    Unlike `start_regime_optimization`, which uses HMM regimes to
    grid-search trading thresholds, this analysis is descriptive.

    Args:
        ticker: Stock symbol (uppercased). Required.
        ticker_b: Optional second ticker; with it the analysis checks the
            pair (`ticker` / `ticker_b`) for spread trading.
        mode: Optional. `'volatility'` runs only the squeeze module.
        years: Lookback window in years (default 2).
        params: Optional dict overriding module-specific knobs. Most
            useful: `hmm_enabled` / `hurst_enabled` / `squeeze_enabled` /
            `mc_enabled` (disable modules); `hmm_states`; `mc_simulations`.
        question: Optional. One sentence restating what the run should answer, not the person's
            message: the title of the report the finished run becomes, and kept only as that.

    When the run has finished, its progress answer also carries `report_url`: the analysis written up as
    a QuanterLab report (the market states and their spells, or for a pair the checks of whether the two
    hold together). The call waits for the run while it is likely to finish inside it; the run's card in
    the chat shows the result or, for a longer run, how far it is, and fills in by itself, with the next
    steps as choices and the report link. A run started here needs no `show_report_card`.
    

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": {
      "ticker": "<ticker>"
    },
    "name": "start_regime_analysis"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo
yearsNo
paramsNo
tickerYes
questionNo
ticker_bNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, it discloses the daily allowance, that refused calls do not count, the 30-second to 2-minute runtime, the async return shape `{task_id, status, kind, dashboard_url}`, and that `get_regime_analysis_progress` eventually carries `result` and `report_url`. It also explains the chat card behavior and that `show_report_card` is unnecessary for runs started here.

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 well organized and front-loads the one-stock versus pair distinction, then moves through usage, runtime/output, and parameters. It is somewhat long and repeats the pair evidence concept several times, but the length is largely justified by the tool's complexity and asynchronous workflow.

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?

Given six parameters, no output schema, and an asynchronous task model, the description covers everything an agent needs: analysis modes, prerequisites, quota behavior, runtime, return fields, progress/result retrieval, report URL behavior, and sibling-tool alternatives. Nothing material appears missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by documenting every parameter: `ticker` as required and uppercased, `ticker_b` as the optional second leg for pair analysis, `mode='volatility'` as squeeze-only, `years` defaulting to 2, `params` overrides including HMM/Hurst/squeeze/MC toggles, and `question` as the one-sentence report title.

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 states a specific verb and resource: analyze one stock or a chosen pair of stocks. It enumerates the one-stock modules and the pair spread-trading checks, and explicitly distinguishes the pair check from `start_pairs_scan`, which searches a whole index instead.

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?

It gives clear when-to-use guidance: run it for one stock with HMM/Hurst/squeeze/Monte Carlo analysis, or for a pair when someone asks whether two stocks are a tradable pair. It names the alternative `start_pairs_scan` for whole-index pair searches and contrasts itself with `start_regime_optimization` as descriptive rather than grid-searching thresholds.

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.

Resources