TradeLikeInsidersSee live signals

← Blog · November 14, 2026

Clustering Market Segmentation: A Trader's Practical Guide

Clustering Market Segmentation: A Trader's Practical Guide

The most repeated advice in this corner of the market is to copy the trade. A lawmaker discloses a purchase, an executive files a buy, a fund reports a new position, and within hours someone turns that single line into a signal you're supposed to act on. Public filings, public access, everybody reading the same documents. It feels like a level playing field.

It isn't, and not only because the paperwork arrives late. The bigger problem is that reading one filing at a time gives you a story, not evidence. You can build a convincing narrative around any single disclosure, and you'll never know whether it predicted anything, because you tested it exactly once, after the fact, with the answer already visible.

One disclosure is an anecdote. Forty disclosures that look alike are a pattern, and only a pattern can be tested.

Clustering market segmentation is the discipline of building those patterns on purpose. It means sorting trades, filers and accounts into groups by measured similarity instead of by the story you already believe, and brands have done exactly this to shoppers for decades. There's a catch most write-ups skip: a tight, clean, beautifully separated cluster can be statistically excellent and worthless for a decision. The rest of this guide is about telling those two apart.

Table of Contents

Choosing Features From Volatility, Flows and Disclosures

A cluster is only as sharp as the numbers you feed it. Group assets by price alone and you've built a price sort, which is a momentum screen wearing a lab coat. Features decide what your segments could possibly mean, so pick them by the question you're asking, not by whatever downloads fastest.

Feature family Example measures Typical source Typical lag
Volatility Rolling standard deviation of returns, average true range Exchange or price feeds Real time to daily
Flows Net fund inflow and outflow, change in large-holder share, quarter-over-quarter change in reported 13F positions Exchange and fund flow data, SEC Form 13F filings Daily for flow data; up to 45 days after quarter end for 13F
Disclosures Count of reported transactions, days since the last filing House Periodic Transaction Reports, SEC Form 4 Up to 45 days for PTRs; Form 4 generally within two business days

Read that last column twice, because that's where retail signal models break. Under the STOCK Act, covered House officials must generally disclose qualifying purchases, sales or exchanges of stocks, bonds and other securities above $1,000 through a Periodic Transaction Report, and the House Ethics Committee's PTR form instructions put the deadline at the earlier of 30 days after the filer becomes aware of the transaction or 45 days after the transaction date. A filing is a reporting event, not a trade alert. Conditions can move a long way before you ever see the line.

Why scaling is not optional

Standardization means rescaling each feature to a common range so the distance math weighs them equally. Skip it and your cluster becomes a dollar-flow sort: net inflow measured in millions will swamp a volatility figure that lives between 0.01 and 0.15, and the algorithm will hand you three groups that differ only in size of flow. Scale first, then sanity-check that no single column is driving every split.

The mistake that makes a backtest lie

Timestamps decide whether your model is honest. Every feature needs the date you could first have observed it, not the date it describes. A filing submitted in March about a February transaction is a March observation, and your test rows have to be built that way.

Hard rule: if a feature needs information you'd only have had after the decision, delete the feature. "It was probably mostly known by then" is how a backtest turns into fiction.

A pre-flight checklist that saves a lot of rework:

Which Clustering Algorithm Fits Your Question

Clustering sorts items into groups by similarity, with no labels telling the algorithm what the groups should be. Think of tipping a shoebox of photographs onto a table and pushing them into piles by who's in the frame. Nobody named those piles in advance. Three algorithms cover most of what a trader needs.

Algorithm Needs cluster count up front Cluster shapes handled Handles outliers Best use in trader data
k-means Yes Roughly round, similar-size groups Poor, outliers pull centres Baseline grouping of traders or tokens on normalized features
Hierarchical (agglomerative) No, cut the tree later Nested groups, shape depends on linkage Moderate Exploring how groups nest, such as sectors inside a market
DBSCAN No, set density instead Arbitrary shapes Yes, labels noise points Finding dense cohorts and isolating unusual activity

What each one does in practice

k-means picks a number of groups, drops that many centres into the data, assigns every point to its nearest centre, moves each centre to the middle of the points it captured, and repeats until nothing moves. It's fast and it's the standard baseline, and it will cheerfully force a lone outlier into a group where it doesn't belong.

Hierarchical clustering builds a family tree instead, merging the closest items step by step, and you cut that tree at whatever height gives you usable groups. It won't tell you where to cut, but the tree exposes nesting that k-means flattens.

DBSCAN looks for dense neighbourhoods and labels everything outside them as noise. For disclosure data that's often precisely what you want: one strange filing should be flagged, not absorbed into a cohort of thirty.

The number of groups is a decision, not a discovery. A published history of market segmentation practice makes the point that clusters are analytical constructs whose count, variables and interpretation depend on the data and the method chosen, and that finer-grained grouping only became practical once computing made large customer records storable. Swap shoppers for filings and nothing about that logic changes.

The algorithm itself is the cheap part now. SNS Insider's clustering software market research values the global clustering software market at USD 5.8 billion in 2024, and a commodity function can't be your edge. The question you ask and the proof you demand can be.

Start with k-means as your baseline. Move to a tree when you suspect nesting, and to DBSCAN when the interesting thing is the filing that doesn't fit anywhere.

How to Run the Segmentation Workflow Step by Step

The boring default wins, and the literature says so. A review of cluster analysis for market segmentation documents 243 business-administration publications that identified or constructed data-driven segments, with a later review of 172 relevant articles finding that algorithmic customer segmentation was the predominant approach and that k-means was the most frequently used algorithm. Here's the sequence that works, with the mistake that undoes each step.

  1. Define the decision the segments serve. Choose which alerts you'll prioritise or which filers you'll watch, because that decision sets the outcome you'll measure later. The slip is building segments first and hunting for a use afterwards, which ends in a nice chart and no change in behaviour.

  2. Collect features with timestamps. Keep only what was readable on each decision date. The slip is treating a quarter-end holdings report or a congressional filing as though it were known on the trade date.

  3. Clean, then standardize. Handle missing values by the rule you wrote down in advance, then rescale every feature to a common range. Mixing scales lets large dollar flows drown out everything else.

  4. Sweep the cluster count. Run k-means across a range, say 2 to 10, and record a score for every run. The slip is grabbing the highest score and stopping, which is how people end up with nine segments containing four members each.

  5. Run a second algorithm on the same data. Hierarchical or DBSCAN, same features, same scaling. Disagreement is information: a group that survives both is structural, while one that appears in a single method is often the algorithm's preference rather than the market's.

  6. Re-run on resampled data and a later window. If the segments dissolve the moment you change the sample, you modelled noise. Judging stability on the fitted sample alone is the most common self-deception in this work.

  7. Profile each segment in plain English. Give it a label a colleague could act on. "Cluster 3, high variance" describes the maths. "Small discretionary buyers who file repeatedly" describes behaviour.

The picture below compresses the same logic into five stages, each with the slip that usually accompanies it.

A five-step workflow infographic detailing the systematic process for performing effective data-driven market segmentation.

One historical detail is worth keeping in mind while you work through this. A 1986 study of the personal-computer market used clustering to reveal a market structure that differed from management's assumed view, which is exactly when the method earns its keep: when it disagrees with the person who thought they already knew the answer. That same review covers the later methodological sprawl, fuzzy clustering, Bayesian approaches and neural-network variants, but none of it removes the need to prove your segments against reality.

Metrics That Separate Real Segments From Noise

A silhouette score of 0.8 looks like proof. It's a geometry reading, nothing more. It tells you the groups sit far apart in feature space, not that acting on them makes or saves a dollar.

Metric Range Better when What it misses
Silhouette score -1 to 1 Closer to 1 Says nothing about business value
Davies-Bouldin index 0 and above Lower Assumes compact, convex clusters
Calinski-Harabasz index 0 and above Higher Favours dense, spherical groups
Bootstrap stability (adjusted Rand index) 0 to 1 Closer to 1 across resamples Does not prove profitability
Out-of-sample campaign or signal lift Percent versus baseline Higher on unseen data Needs outcome data and time to observe

Clustering is a multi-criteria problem. The variables, the measurement choices and the competing optimisation targets all pull against each other, so no internal score can establish commercial value by itself. Applied work still tends to present the tidy loop of standardize, pick centroids, run k-means, validate, without connecting validation to outcomes like conversion, retention, profitability or campaign lift. One experiment reported a silhouette score of 0.8 after combining PCA with a Gaussian mixture model, a result that demonstrates separation in space and nothing whatsoever about performance, as a study of clustering methods published in Expert Systems with Applications sets out.

The one metric that pays

Out-of-sample lift is the test that matters, and it's the one people skip because it takes waiting. Fit your segments on data through a cut-off date. Then, in the window you never touched, check whether the priority segment beat a dumb baseline on the thing you care about: did those alerts resolve better, did those filings precede larger moves, did that cohort of accounts behave differently from the rest. Everything else in the table is a tiebreaker.

Why a cleaner split can target worse

Better-separated clusters can produce worse decisions when the variables encode historical behaviour rather than changeable needs or response propensity. Cluster accounts by past trade size and you'll separate whales from minnows beautifully, then discover the split says nothing about who responds to a new alert. You've rebuilt the past and labelled it a forecast.

Ranking rule: order candidate segmentations by stability and out-of-sample lift first. Use silhouette only to break ties between runs that are otherwise equal, and reject any segment too small or too expensive to act on.

One constraint sits under all of this. Scores compare runs only on the same data and the same scaling. A 0.6 on one feature set and a 0.7 on another tells you nothing, because the geometry changed underneath the number.

Real Examples From Tokens, Traders and Insiders

Abstract distance formulas get concrete fast once you point them at real filings. Five public data sets show the same pattern: the clustering step is easy, and the value sits entirely in how you read the groups.

A hand-drawn illustration showing three open notebooks detailing concepts about market risk, data analysis, and investment strategies.

Tokens, sorted on two features. Pull three hundred tokens and compute 90-day volatility plus the share of supply held by the top twenty wallets. One group lands volatile with rising concentration, another calm and widely held. That split says nothing about what to own. It tells you which kind of risk sits in front of you, which is the difference between a crowded trade and a quiet one.

Trading accounts, sorted by behaviour. Take a year of account activity and cluster on median holding period, average position size and turnover. The labels write themselves: short-term rotators, patient accumulators, an event-driven middle. Once the groups exist you can ask each one a different question, because a signal that works for rotators usually means nothing to accumulators.

Insider filings, sorted by intent. SEC Form 4 gives you a structured record for many corporate-insider trades, identifying the insider, the issuer, the transaction date, the transaction code, the number of shares and price information. The code and the footnotes carry most of the signal: an open-market purchase is a different animal from a sale driven by an equity-compensation plan, tax withholding or an option exercise. Cluster on code and footnote type and the discretionary-buy group earns closer review while plan-driven sales get down-weighted. One insider's sale can be entirely mechanical.

If the mechanics of grouping still feel abstract, this walkthrough makes the distance and centroid ideas concrete in a few minutes.

Two more clusters from the disclosure stack

Congressional reports, sorted by how they arrive. Group Periodic Transaction Reports by how long they took to appear, how many transactions they bundle and which sector they touch. Read every cluster as delayed evidence of reported activity, and feed the model size bands rather than precise dollar figures, because the forms report ranges. A cluster of slow, bundled reports describes filing habits. It does not describe conviction.

Institutional holdings, sorted by turnover. Cluster 13F filers by how much their reported positions change between consecutive quarter-end snapshots. A cohort of persistent holders reads differently from a cohort that turns over most of the book each quarter, and the label decides which filings deserve attention when the next batch lands.

None of these clusters forecasts anything. They sort what has already been reported, and a tidy-looking sort can still mislead: the features you picked decide what "similar" means, so two filers can land together for reasons that have nothing to do with the behaviour you care about. When legislation or a rule change hits a sector, related names often move together, and that co-movement shows up in the data as a cluster worth testing. Testing is the operative word. A segment earns its label only if the grouped names keep behaving alike after the split, not just inside the window that built it.

Stress-Test Segments and Their Risks

A line drawing illustration showing a woman exploring various life development sectors like potential and relationships.

A clean cluster can still fail where it matters: the next window. Remove the sensitive column and the risk stays in the table. Account size, trade timing, sector mix, the device someone uses, the feed they subscribe to: any of these can act as a proxy, meaning a stand-in variable for the trait you deliberately excluded, and the cluster will happily encode the proxy instead. Recent fair-clustering research flags exactly this, naming unresolved problems around utility, downstream effects and fairness composition, where applying a fairness-aware method does not guarantee that later targeting or decision systems remain fair. Differential privacy also has a cost. It can reduce output quality, and the degradation bites hardest on small datasets, which is where segments are already thinnest.

Labels carry risk of their own. A segment that groups accounts or officials by activity describes a pattern of filings. It is never evidence of wrongdoing, and no label should be built around a real person's name, because at that point you have stopped analysing data and started publishing an accusation. Keep labels behavioural and keep the analysis politically neutral: the same method applied to both parties, with no commentary on individuals.

The opposite failure is just as real. Forcing balance across groups can bury genuine differences in behaviour and leave you with segments that describe nobody in particular. The goal is a segment you can justify, monitor and defend.

Run this checklist before any segment influences a decision.

  1. Write the method down first. Feature list, cluster count, scaling choice, data cut-off, source timestamps. If you cannot reproduce the segmentation next month, you cannot trust it this month.
  2. Test on a later window. Refit on older data, then confirm the same groups appear in newer data. Out-of-sample means exactly that: structure fitted on one period has to survive contact with a period it never saw. A pattern that exists only in the fitted sample is an artifact of that sample.
  3. Check lift against a dumb baseline. Lift is the improvement over a rule you could have used anyway. Compare the priority segment against treating every filing identically. If the cluster cannot beat that, it is decoration.
  4. Set a minimum segment size and a monitoring cost. Six accounts is not a segment, it is six accounts, and every extra group you track spends attention you could use elsewhere.
  5. Schedule the refit and watch for drift. Drift is the gap between what a cluster meant at fit time and what it means now. Segments change meaning as markets change, so re-run on a calendar rather than when something feels wrong.

TradeLikeInsiders puts congressional trades, SEC insider activity, whale moves and policy signals in one place, so you can run these checks against real disclosure data instead of a toy dataset, with educational AI analysis layered on top of the raw filings. Start with TradeLikeInsiders and practise the validation habit before it costs you anything.

This content is for informational purposes only and is not financial advice. Do your own research.

Track what Congress and insiders are trading.

Real-time signals from public disclosures.

Open TradeLikeInsiders