analyze
Analyze historical patterns by computing metrics such as anomaly, volume profile, crowding, correlation shifts, and earnings reactions on a cohort or symbol-date anchor.
Instructions
Analytic metrics on a cohort or (symbol, date) anchor.
metric values:
- "anomaly" — is the pattern unusual vs the symbol's
own history? (needs symbol)
- "volume_profile" — intraday volume vs historical norms
(needs symbol)
- "crowding" — cross-symbol crowding indicator
(market-wide; no symbol needed)
- "correlation_shift" — rolling correlation breakdowns
(extra_args: lookback, window, symbols)
- "earnings_reaction" — historical earnings gap reactions
(needs symbol; extra_args: min_gap)
- "pattern_degradation" — are signals losing edge vs historical
accuracy? (market-wide)
- "regime_accuracy" — win rates filtered by current regime
(needs symbol)
- "decompose" — find slice conditions that separated
winners from losers within a cohort
(needs cohort_id; horizon, max_slices,
explain_slices apply)
- "clusters" — cluster a cohort into k forward-return
groups (needs cohort_id; horizon, k)
Supply cohort_id (preferred, anchor inherited) OR explicit
symbol+date for the symbol-needing metrics.
Args:
metric: see list above
cohort_id: handle from `search` or `cohort` (required for
decompose, clusters; preferred for symbol-needing metrics)
symbol, date: explicit anchor when no cohort_id available
extra_args: per-metric optional kwargs (see metric list)
horizon: forward horizon in trading days (decompose, clusters,
regime_accuracy)
max_slices: max returned slice conditions (decompose)
explain_slices: include Haiku narrative tying slices together
(decompose)
k: cluster count override (clusters; default chosen automatically)Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metric | Yes | ||
| cohort_id | No | ||
| symbol | No | ||
| date | No | ||
| extra_args | No | ||
| horizon | No | ||
| max_slices | No | ||
| explain_slices | No | ||
| k | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |