Unsupervised Learning for Trading: K-Means Clustering and PCA
Summary
The article introduces unsupervised learning as a way to find structure in data without target labels, contrasting it with supervised prediction. Its trading example uses K-means to group stocks by return on equity and market beta. The workflow standardizes the features, fits a model with a chosen cluster count, and interprets the resulting groups; the example reports that utility companies and higher-growth technology companies fall into different clusters. It discusses the elbow method, which compares within-cluster distances as the number of clusters changes, to help choose the cluster count. The article also introduces principal component analysis (PCA) as a dimensionality-reduction technique, though the excerpt supplies limited detail about its application.
The examples illustrate exploratory analysis and possible inputs for further research, including finding similar stocks for pair-trading candidate searches. They do not establish that the clusters predict returns or make a profitable strategy. Results depend on feature selection, scaling, and modeling choices, while the lack of labels makes evaluation and interpretation difficult. The article positions unsupervised methods as exploratory tools that may complement supervised models.
Key ideas
- Unsupervised learning can reveal groupings and structure in data without predefined labels.
- K-means assigns observations to clusters by repeatedly updating assignments and cluster centroids.
- Scaling features helps prevent variables with larger numerical ranges from dominating distance-based clustering.
- The elbow method uses changes in within-cluster distance to guide the choice of cluster count.
- Clusters can help screen for similar stocks, but they do not by themselves show that a trading strategy will be profitable.
- PCA reduces feature dimensionality, though the resulting components may require interpretation.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.