Perbandingan Algoritma K-Means dan DBSCAN dalam Segmentasi Profil Risiko dan Keuntungan Saham di Bursa Efek Indonesia
Comparison of K-Means and DBSCAN Algorithms in Segmenting Risk and Profit Profiles of Stocks on the Indonesia Stock Exchange
DOI:
https://doi.org/10.57152/malcom.v6i4.2754Keywords:
Algoritma, Bursa Efek Indonesia, DBSCAN, K-Means, SegmentasiAbstract
Tingginya dinamika fluktuasi harga saham harian menuntut investor untuk memiliki strategi portofolio yang presisi. Algoritma clustering tradisional seperti K-Means seringkali rentan dan bias terhadap data pencilan (outliers). Penelitian ini membandingkan kinerja algoritma K-Means dan DBSCAN dalam menyegmentasikan profil risiko dan keuntungan saham indeks IDX30. Metodologi yang digunakan berbasis Knowledge Discovery in Databases (KDD) dengan mengekstraksi fitur ekspektasi keuntungan dan volatilitas harian. Evaluasi arsitektur klaster diukur secara komparatif menggunakan Silhouette Score, Davies-Bouldin Index (DBI) dan Dunn Index. Hasil penelitian membuktikan bahwa DBSCAN jauh lebih unggul dibandingkan K-Means. DBSCAN memperoleh Silhouette Score tertinggi sebesar 0.518, DBI terendah sebesar 0.481 dan Dunn Index tertinggi sebesar 0.245, sedangkan K-Means hanya mencapai 0.391, 0.810, dan 0.200. DBSCAN terbukti secara efektif memisahkan lima saham anomali yang sangat spekulatif sebagai noise (saham gorengan), serta mengelompokkan sisa emiten secara akurat ke dalam klaster moderat dan agresif tanpa tumpang tindih
Downloads
References
F. Wulandari, “Analisis Volatilitas Indeks Harga Saham Dan Indikator Ekonomi Makro Di Indonesia Dalam Menghadapi Kondisi Vuca,” Bisnis dan Pendidikan, vol. 5, no. 5, p. 2025, doi: 10.17977/um066.v5.i5.2025.1.
N. Syahla and M. I. Harahap, “Studi Literatur?: Saham Gorengan,” Media Ekonomi, vol. 22, no. 2, pp. 75–84, Jan. 2022, doi: 10.30595/MEDEK.V22I2.14086.
F. Seru and B. F. Kuddi, “Pendekatan Optimalisasi Portofolio dengan Capital Asset Pricing Model dan Model Markowitz sebagai Strategi Investasi Cerdas bagi Investor Milenial,” Journal of Mathematics: Theory and Applications, vol. 6, no. 2, pp. 214–224, Oct. 2024, doi: 10.31605/jomta.v6i2.4117.
A. D. C. M. de Oliveira, P. F. A. Pinto, and S. Colcher, “Stocks Clustering Based on Textual Embeddings for Price Forecasting,” Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), vol. 12320 LNAI, pp. 665–678, 2020, doi: 10.1007/978-3-030-61380-8_45.
M. Steinbacher, M. Steinbacher, and M. Steinbacher, “An Identification and Estimation of Stock Price Pattern Equations using K-Means,” Comput. Econ., Feb. 2025, doi: 10.1007/S10614-025-10879-3.
P. B. Martin and S. S. Suneesh, “Data-Driven Intelligence in Pair Trading: Exploring Advanced Pair Selection Techniques for Long–Short Portfolio,” Lecture Notes on Multidisciplinary Industrial Engineering, vol. Part F1254, pp. 331–345, 2026, doi: 10.1007/978-981-95-0853-2_31.
H. Dastkhan, A. Mosaffa, and F. J. Fabozzi, “Integrated machine learning framework for dynamic portfolio management: clustering, forecasting, and optimization,” Ann. Oper. Res., 2026, doi: 10.1007/S10479-026-07053-9.
J. Chevallier, “Particle Swarm Optimization with Stretching and Clustering for Asset Allocation,” International Journal of Financial Studies, vol. 14, no. 2, Feb. 2026, doi: 10.3390/IJFS14020038.
Y. Hasan, “Pengukuran Silhouette Score dan Davies-Bouldin Index pada Hasil Cluster K-Means dan Dbscan,” 2024.
A. Ridwan, … S. S.-I. J. of, and undefined 2021, “IDX30 stocks clustering with K-means algorithm based on expected return and value at risk,” v2.rescollacomm.comAF Ridwan, S Subiyanto, S SupianInternational Journal of Quantitative Research and Modeling, 2021•v2.rescollacomm.com, vol. 2, no. 4, pp. 201–208, 2021, Accessed: May 21, 2026. [Online]. Available: https://v2.rescollacomm.com/index.php/ijqrm/article/view/157
A. Anfossi and D. Chicco, “An easy guide to the Davies-Bouldin index for unsupervised internal clustering evaluation,” Discover Computing, vol. 29, no. 1, Dec. 2026, doi: 10.1007/S10791-026-10094-0.
U. Kazemi and S. Soleimani, “A new approach data processing: Density-Based Spatial Clustering of Applications with Noise (DBSCAN) clustering using game-theory: U. Kazemi, S. Soleimani,” SpringerU Kazemi, S SoleimaniSoft Computing, 2025•Springer, vol. 29, no. 3, pp. 1331–1346, Feb. 2025, doi: 10.1007/S00500-025-10405-5.
C. Llatas, B. Soust-Verdaguer, L. C. Torres, and D. Cagigas, “Application of Knowledge Discovery in Databases (KDD) to environmental, economic, and social indicators used in BIM workflow to support sustainable design,” Journal of Building Engineering, vol. 91, Aug. 2024, doi: 10.1016/j.jobe.2024.109546.
R. Swastika, S. Mukodimah, F. Susanto, and M. Muslihudin, “Implementasi Data Mining (Clastering, Association, Prediction, Estimation, Classification),” 2023, Accessed: May 21, 2026. [Online]. Available: https://books.google.com/books?hl=id&lr=&id=LsOqEAAAQBAJ&oi=fnd&pg=PA59&dq=Lebih+lanjut,+untuk+memastikan+integritas+dataset+hasil+scraping,+prosedur+prapemrosesan+awal+dilakukan+dengan+mengevaluasi+keberadaan+data+hilang+(missing+values)&ots=08CUqzL0Lu&sig=mIKHX4fms9AWkjY7DyyCZrwenBQ
A. K. Hidayah and R. E. Putra, “Penerapan Metode Long Short Term Memory untuk Memprediksi Harga Beras di Indonesia,” Journal of Informatics and Computer Science, vol. 06, 2024.
C. Wongoutong, “The impact of neglecting feature scaling in k-means clustering,” PLoS One, vol. 19, no. 12, Dec. 2024, doi: 10.1371/journal.pone.0310839.
D. A. Setiady and H. Leong, “Implementation Of K-Means Algorithm Elbow Method And Silhouette Coefficient For Rainfall Classification,” 2020.
I. Chintia Sarumaha et al., “of Superstore Data using K-Means and K-Medoids for Product Delivery Insights,” 2025. [Online]. Available: https://citedness.com/index.php/jdsihttps://citedness.com/index.php/jdsi
F. B. Wijaya, W. Budiaji, and A. S. Wicaksono, “Applied Machine Learning DBSCAN for Identifying Clusters of Micro and Small Industries,” RIGGS: Journal of Artificial Intelligence and Digital Business, vol. 4, no. 2, pp. 380–386, May 2025, doi: 10.31004/riggs.v4i2.515.
Z. Teng, J. Yan, D. Liu, and P. Zhang, “When Does the Silhouette Score Work? A Comprehensive Study in Network Clustering,” Dec. 2025, [Online]. Available: http://arxiv.org/abs/2512.24841
P. Hasugian, … D. M.-M. J., and undefined 2025, “Comparative Evaluation of Data Clustering Accuracy through Integration of Dimensionality Reduction and Distance Metric,” journal.universitasbumigora.ac.idPM Hasugian, D Mathelinea, S Simamora, PBN SimangunsongMATRIK: Jurnal Manajemen, Teknik Informatika dan, 2025•journal.universitasbumigora.ac.id, Accessed: May 23, 2026. [Online]. Available: https://journal.universitasbumigora.ac.id/matrik/article/view/5057
A. Yudono, A. R. R. T. Hidayat, W. P. Wijayanti, F. Afrianto, and A. D. Fitrianto, “Spatial Clustering of The Village Development Index Using K-Means and DBSCAN Approaches in Machine Learning: A Case Study in Malang Regency, Indonesia,” IOP Conf. Ser. Earth Environ. Sci., vol. 1595, no. 1, p. 012031, Mar. 2026, doi: 10.1088/1755-1315/1595/1/012031.
E. Schubert, J. Sander, M. Ester, H. P. Kriegel, and X. Xu, “DBSCAN revisited, revisited: Why and how you should (still) use DBSCAN,” ACM Transactions on Database Systems, vol. 42, no. 3, Jul. 2017, doi: 10.1145/3068335.
P. Sakowski, R. Sieradzki, and R. ?lepaczuk, “Systemic risk indicator based on implied and realized volatility,” Quality & Quantity 2025 60:2, vol. 60, no. 2, pp. 6389–6427, Dec. 2025, doi: 10.1007/S11135-025-02515-X.
R. M. Leushuis and N. Petkov, “Advances in forecasting realized volatility: a review of methodologies,” Financial Innovation 2026 12:1, vol. 12, no. 1, pp. 14-, Jan. 2026, doi: 10.1186/S40854-025-00809-5.
B. M. Barber, X. Huang, T. Odean, and C. Schwarz, “Attention?induced trading and returns: Evidence from Robinhood users,” Wiley Online LibraryBM Barber, X Huang, T Odean, C SchwarzThe Journal of Finance, 2022•Wiley Online Library, vol. 77, no. 6, pp. 3141–3190, Dec. 2022, doi: 10.1111/JOFI.13183.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Zeydan Fazle Mawla, Dwiki Aprilian Aryanda, Masna Wati, Joan Angelina Widians

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Copyright © by Author; Published by Institut Riset dan Publikasi Indonesia (IRPI)
This Indonesian Journal of Machine Learning and Computer Science is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.










