← Market Flow Research 🌙
Event classes

Event Classes Found Without a Teacher: 3 Survive, 60% Are Noise

We asked the order book to sort its own events into classes — 2,786 events, eight features, no price and no human labels. Out of 512 configurations only 5 produced anything stable, 60% of events belong to no class at all, and the three that do exist raise volatility while leaving direction at a coin flip.

Research note · 2026 · AI-assisted, human-reviewed

① Let the data name its own events

Every earlier study started from a human definition: a spike is this, a wall is that. Here we did the opposite. We cut 2,786 events out of the archive, described each one as all 8 order-book features over a 210-second window, and handed that to an unsupervised pipeline — log transform, robust scaling, PCA, UMAP, then HDBSCAN. Price was not shown to the algorithm at any point; it only gets to comment afterwards.

Event map (UMAP-2D), coloured by discovered classes
Event map (UMAP-2D), coloured by discovered classes

② Most configurations find nothing — and that is the point

Clustering will always return something, so the real work is deciding what to believe. We swept 512 configurations and demanded stability, not beauty: only 5 survived the suitability filter. The winner explains 73% of input variance and lands on k=3 classes with bootstrap ARI 0.85 (sd 0.019).

Grid search: stability versus number of classes
Grid search: stability versus number of classes

③ Beating the shuffled null

A stability number means nothing on its own, so we ran the same pipeline on time-shuffled and fully shuffled data. Real data: ARI 0.61 on the full bootstrap and 0.67 across folds. Shuffled null: 0.33. The gap is the whole claim of this study — the structure is in the book, not in the method.

④ Sixty percent of events belong to nothing

The honest headline: 60% of events are noise — HDBSCAN refuses to assign them to any class, and we do not force it. Only 40% form stable groups. A classifier that labelled everything would look far more impressive and be far less true.

⑤ The three classes that do exist

What survives: class 0 — 546 events (19.6%), led by drain out of the sell wall; class 1 — 363 events (13.0%), led by the resting buy wall; class 2 — 89 events (3.2%), led by the resting buy wall. The portraits show the median behaviour of all eight features through the event window, which is what actually separates the classes — one is dominated by liquidity leaving the book, the others by resting liquidity standing its ground.

Class portraits — median curves of the 8 features
Class portraits — median curves of the 8 features

⑥ How the classes differ, feature by feature

The same difference stated as levels rather than curves: for each class, how far each feature sits from its own normal. This is the most compact description of what the algorithm found.

⑦ How long an event lasts

Median event duration is 7.7 minutes, and the distribution is wide and skewed — the classes differ in duration as clearly as they differ in shape.

Full event duration by class
Full event duration by class

⑧ What happens after — the part price is allowed to answer

Only now does price enter. Forward volatility after an event averages 0.0396 and the forward range 0.442, both meaningfully above the quiet baseline. Direction: 49.6% of events are followed by an up move — a coin flip, again, on classes that were found without ever looking at price.

What follows the event (* = significant after BH correction)
What follows the event (* = significant after BH correction)

⑨ Where the classes sit on the price line

The discovered classes drawn over the whole dataset, plus a zoom. Useful as a sanity check: the classes are not concentrated in one regime or one month.

⑩ Transitions between states

Which state hands over to which, and how the sides balance inside each one. Note what is absent: no forecast is claimed here — transitions are a description of the sequence, not a prediction of it.

Research, not financial advice.

States as they are — transitions and structure
States as they are — transitions and structure
🤖 This research — data collection, analysis, charts and the narrated video — was produced with the assistance of AI, then reviewed by a human. We forecast volatility, not direction, and log every prediction. Research, not financial advice.

Comments

Discussion is powered by GitHub. Enable it by adding secrets/giscus.json (repo IDs from giscus.app).

← All research