K-Means and DBSCAN for Clustering Market Regimes
Summary
The article compares two unsupervised clustering methods using daily RSI and ADX observations as an example for grouping stock behavior into possible bullish, bearish, and sideways regimes. K-means assigns observations to the nearest of a chosen number of centroids, recalculating cluster centers until assignments stabilize. This makes it straightforward to describe, but the number of groups must be chosen in advance, and centroid-based distance can split points in naturally curved or irregularly shaped groups.
DBSCAN instead groups observations by local density. It uses a neighborhood radius and a minimum number of nearby points to identify core points, attach nearby boundary points, and leave isolated observations as noise. This can find clusters with less regular shapes and does not require choosing the cluster count first. The article is an intuitive explanation rather than an empirical trading study: it gives no evidence that the example clusters predict profitable trades, and DBSCAN results depend on suitable parameter settings and the scale of input features.
Key ideas
- K-means repeatedly assigns observations to their nearest centroid and updates the centroids.
- K-means requires a chosen cluster count and works poorly when cluster shapes differ from its centroid-based assumptions.
- DBSCAN forms clusters from dense neighborhoods using a radius and a minimum point count.
- DBSCAN labels sparse observations as noise and can identify irregularly shaped groups without a preset cluster count.
- Clustering technical indicators can suggest market regimes, but the example does not establish trading performance.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.