Data Mining for Finance
Online B.Com · Sem 5
0% complete
0/3 lessons
Lesson 2 of 3Fin Analytics
Clustering in Finance
Data Mining for Finance
About the video
StatQuest: K-means clustering
StatQuest with Josh Starmer
Study notes
Clustering is an unsupervised learning technique that groups observations so that members of a group are similar to each other and different from other groups. In finance it is used for customer segmentation, portfolio diversification, fraud detection and regime identification.
Concept
- Unsupervised: uses no labels.
- Relies on a distance or similarity measure, e.g. Euclidean distance or correlation-based distance.
- Standardise features first so that scale does not dominate the distance.
Methods
- K-means: choose k, assign points to the nearest centroid, update the centroids, and repeat; minimises within-cluster sum of squares.
- Hierarchical: agglomerative merging shown in a dendrogram; linkage can be single, complete, average or Ward.
- DBSCAN: density-based; finds clusters of any shape and flags outliers.
- Choose k with the elbow method or the silhouette score.
Finance Applications
- Customer segmentation for marketing and credit.
- Grouping stocks by return correlation to diversify across clusters, as in hierarchical risk parity.
- Anomaly and fraud detection: points far from every cluster.
- Identifying market regimes.
Limitations
- K-means is sensitive to initialisation, outliers and the choice of k, and assumes spherical clusters.
- Clusters need interpretation and may be unstable over time.
Key terms
- Clustering
- Grouping unlabeled data by similarity.
- K-means
- An algorithm that partitions data into k clusters around centroids.
- Dendrogram
- A tree diagram showing hierarchical merges.
- Silhouette score
- A measure of how well points fit their own cluster compared with others.
- Elbow method
- Choosing k where the decrease in within-cluster SSE levels off.
Takeaways
- Clustering is unsupervised similarity grouping.
- Standardise the data and choose k carefully.
- Key uses include segmentation, diversification and anomaly detection.
Contribute
Was this lesson helpful?
We read every rating and fix the weakest lessons first.