> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simplefunctions.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Regime detection

> Categorical labels summarizing each market's microstructure — observability, event type, edge direction.

A market's regime is a categorical label summarizing its current microstructure: how observable it is, what kind of event it tracks, where the cross-venue edge points. The label drives downstream filtering — idea generation, screening, agent prompts.

## Schema

```json theme={null}
{
  "label": "string (e.g. 'observable_macro_balanced')",
  "score": "number (0-100, confidence)",
  "computedAt": "ISO timestamp",
  "signals": {
    "spreadCents": "number",
    "volumeZscore": "number",
    "depthChange1h": "number",
    "flowImbalance": "number",
    "crossVenueGap": "number",
    "sfEdgeCents": "number",
    "sfEdgeDirection": "'long' | 'short' | null",
    "catalystType": "string | null",
    "catalystHours": "number | null",
    "observability": "string",
    "eventType": "string"
  }
}
```

## Labels (selected)

| Label                          | Meaning                                               |
| ------------------------------ | ----------------------------------------------------- |
| `observable_macro_balanced`    | Macro event with two-sided liquidity, no obvious edge |
| `observable_macro_long_skewed` | Same, but flow / depth points toward YES              |
| `cliff_resolving_imminent`     | τ \< 7 days, binary resolution near                   |
| `low_liquidity_thin`           | LAS high, depth low; price unreliable                 |
| `no_flow_dormant`              | Stale, no recent volume                               |

The full label set lives in `lib/regime/labels.ts`.

## Compute

`scan-regime` cron evaluates each market periodically and writes to `market_regimes`. Heavy markets (top by volume / open interest) get scored more often via `warm-regime` cron.

## How agents use it

The agent prompt includes the regime label and signals for every market it considers. Agents filter out `low_liquidity_thin` and `no_flow_dormant` by default.

## Next steps

<CardGroup cols={2}>
  <Card title="Indicators" href="/concepts/indicators">
    Numeric inputs that feed regime detection.
  </Card>

  <Card title="Idea pipeline" href="/concepts/idea-pipeline">
    How regime labels gate trade idea generation.
  </Card>
</CardGroup>
