How It Works

A precision alerting system for detecting unusual activity on Kalshi prediction markets

The Pipeline

The system runs continuously, processing data in a loop:

StepFrequencyWhat It Does
Market SyncEvery 30 minPulls all active markets from Kalshi, filters to eligible ones
Trade IngestionEvery 5 minFetches recent trades for every eligible market
Orderbook SnapshotsEvery 5 minCaptures current bid/ask depth for eligible markets
Baseline ComputationEvery 2 hoursCalculates each market's "normal" behavior over a rolling 7-day window
ScoringEvery 5 minRuns the model against the last 30 minutes of data
Alert GenerationEvery 5 minFlags markets scoring 70+ for the dashboard and email alerts

Eligibility

A market must meet at least one of these thresholds to be monitored:

Additionally, the market must be open/active, expiring in 2+ hours, and not in the Sports or Weather categories.

The Scoring Model

Each eligible market is scored on a 0–100 scale using six independent signals. Every signal compares the market's current behavior to its own historical baseline — so a 500-contract trade in a low-volume market and a 50,000-contract trade in a high-volume market can both trigger alerts when they deviate from what's normal for that specific market.

Individual signals are capped at 95 to prevent any single signal from dominating the composite.

1. Trade Size 30% weight

Detects abnormally large trades relative to a market's history.

2. Price Impact 25% weight

Measures whether trades are moving the price more than they normally would.

3. Liquidity 20% weight

Detects unusual changes in the orderbook structure.

4. Clustering 15% weight

Identifies burst patterns — trades arriving in concentrated bunches rather than evenly distributed.

5. Timing 5% weight

Flags activity occurring at unusual times or near market expiration.

6. Cross-Market 5% weight

Checks whether sibling markets in the same Kalshi event are also spiking. If multiple related markets are scoring Medium (55+) or above, correlated activity is likely meaningful. Each elevated sibling adds 25 points.

Multi-Signal Confirmation Gate

To prevent false positives from a single noisy signal, a market must pass a confirmation gate to reach "High" or above:

If a market would score 70+ but fails the gate, it is capped at 54.99 (Low). This ensures that a genuine alert always has confirmation from multiple independent signals.

Score Labels

ScoreLabel
85–100Very High
70–84High
55–69Medium
40–54Low
0–39Very Low

Tradeability Overlay

After scoring, each market receives an opportunity status:

StatusMeaning
OpenFresh signal, tight spread (≤10¢), sufficient depth (20+ contracts each side)
Needs ReviewStrong signal but stale (>10 min old) or wide spread / thin depth
LatePrice already moved 10+ cents within the window
Likely MovedPrice moved and signal is stale — opportunity probably passed

Baselines

Every metric is compared to a per-market baseline computed over a rolling 168-hour (7-day) window. Baseline values include:

A minimum of 20 trades in the baseline window is required before scoring begins for a market. This prevents false signals on markets with sparse data.