Abstract. A stock portfolio represents an investment strategy aimed at maximizing returns while minimizing risk. Stock data, as a form of time series data, relies on historical information to evaluate performance and identify price movement patterns. Consequently, stock selection is a critical component in asset diversification. The novelty of this study is to apply time series clustering methods to stock data and utilize the resulting clusters to construct a mean-variance portfolio. The data used are the weekly closing prices of 10 Sharia-Growth Index stocks for the period December 2022 to November 2024. Using Dynamic Time Warping (DTW) distance with average linkage, two clusters were identified: cluster 1 (MPMX, TLKM) and cluster 2 (MAPI, HEAL, ISAT, AKRA, BMTR, SIDO, KLBF, PWON), with a Silhouette coefficient of 0.9471 indicating strong clustering performance. To construct the mean-variance portfolio, three stocks with positive expected returns were selected: HEAL, ISAT, and MAPI, which are members of Cluster 2. The optimal weights obtained using Lagrange optimization are HEAL (0.49%), ISAT (99.51%), and MAPI (0%). The Lagrange method allocates 0% to MAPI because its risk level (variance of 0.00322) is the highest among the three candidate stocks, thereby not helping to minimize the overall portfolio risk. Therefore, the optimal portfolio formed by combining HEAL and ISAT would have provided an estimated return of 0.56% and a risk of 4.1%.
Copyrights © 2026