Cluster Analysis on Time Series Data for Indonesian Stock Prices Using Dynamic Time Warping
Abstract
This study investigates the application of the Dynamic Time Warping (DTW) algorithm to cluster the ten stocks with the largest market capitalization on the Indonesia Stock Exchange as of February 2026. Unlike conventional distance metrics, DTW handles time lag nonlinearly to identify hidden temporal pattern similarities. Adjusted closing price data was obtained through web scraping from Yahoo Finance using the R programming language. The clustering procedure was performed using Ward's Hierarchical Agglomerative Clustering method, where the optimal number of clusters was determined through Silhouette coefficient analysis. The results indicate that a three-cluster solution is the most representative structure. The first cluster is dominated by the banking and energy sectors with stable growth trends. The second cluster includes cyclical industrial and infrastructure stocks with high volatility. The third cluster uniquely unites GOTO and UNVR stocks in a long-term bearish downward pattern, despite their origins in different sectors. These findings demonstrate that DTW is highly effective in uncovering cross-sector market dynamics, providing a more accurate basis for portfolio diversification strategies than traditional business sector classifications.
Downloads
Copyright (c) 2026 Wisnowan Hendy Saputra, Nuruddeen Shehu

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

















