Application of K-Means and Random Forest Algorithms for Trader Segmentation and Activity Status Prediction at GKINVEST
Downloads
Abstract
Trader activities at trading firms exhibit heterogeneous characteristics, necessitating an analytical approach to identify segmentation patterns and trader activity status. This study aims to analyze GKInvest trader segmentation using the K-Means algorithm and to build a Random Forest model to predict trader activity status based on historical activity characteristics. The dataset comprises trader data with key variables including 30-day transaction volume, 30-day login count, 30-day transaction count, days since last activity (recency), account tenure, number of active days, and the number of instruments traded. K-Means was employed as an unsupervised learning method to establish segments, while Random Forest was used independently as a supervised learning method to classify active versus inactive status. The K-Means analysis yielded three segments: Passive Traders (Churn Risk) comprising 1,135 traders (56.7%), Highly Active Traders (VIP) comprising 437 traders (21.9%), and Regular Active Traders comprising 428 traders (21.4%). The Random Forest model achieved an accuracy of 83%; performance for the "Active" class reached a precision of 84%, recall of 93%, and F1-score of 88% (with a weighted average F1-score of 82%). Feature importance analysis revealed that 30-day transaction volume made the largest relative contribution (~0.218), followed by 30-day login count (~0.184) and 30-day transaction count (~0.183). The findings demonstrate that K-Means and Random Forest can independently provide complementary perspectives for understanding the activity characteristics and status of GKInvest traders, serving as a foundation for developing data-driven trader activity monitoring systems.
References
[1] S. A. Perdana, S. F. Florentin, and A. Santoso, “Analisis segmentasi pelanggan menggunakan K-Means clustering studi kasus aplikasi Alfagift,” Sebatik, vol. 26, no. 2, pp. 446–457, 2022, doi: https://doi.org/10.46984/sebatik.v26i2.1991.
[2] S. F. Pratama and N. A. Putri, “User Profiling Based on Financial Transaction Patterns: A Clustering Approach for User Segmentation,” Int. J. Appl. Inf. Manag., vol. 4, no. 4, pp. 217–228, 2024, doi: https://doi.org/10.47738/ijaim.v4i4.92.
[3] H. Rizkyanto and L. G. Ford, “Customer segmentation of personal credit using recency, frequency, monetary (RFM) and K-means on financial industry,” Int. J. Adv. Comput. Sci. Appl., vol. 14, no. 4, 2023, doi: https://doi.org/10.14569/IJACSA.2023.0140417.
[4] A. F. Azmi and A. Voutama, “Prediksi churn nasabah bank menggunakan klasifikasi random forest dan decision tree dengan evaluasi confusion matrix,” KOMPUTA J. Ilm. Komput. dan Inform., vol. 13, no. 1, pp. 111–119, 2024, doi: https://doi.org/10.34010/komputa.v13i1.12639.
[5] T. T. Cong, “Banking customer churn prediction using random forest based on smote and adasyn approach,” Tạp chí Phát Triển và Hội Nhập, no. 78, pp. 86–91, 2024, doi: https://doi.org/10.61602/jdi.2024.78.11.
[6] S. Juanita and R. D. Cahyono, “K-means clustering with comparison of elbow and silhouette methods for medicines clustering based on user reviews,” J. Tek. Inform., vol. 5, no. 1, pp. 283–289, 2024, doi: https://doi.org/10.52436/1.jutif.2024.5.1.1349.
[7] M. I. Prasetiyowati, N. U. Maulidevi, and K. Surendro, “The accuracy of Random Forest performance can be improved by conducting a feature selection with a balancing strategy,” PeerJ Comput. Sci., vol. 8, p. e1041, 2022, doi: https://doi.org/10.7717/peerj-cs.1041.
[8] M. Guntara and N. Lutfi, “Optimasi cacah klaster pada klasterisasi dengan algoritma kmeans menggunakan silhouette coeficient dan elbow method,” J. Teknol. Inf., vol. 2, no. 1, pp. 43–52, 2023, doi: https://doi.org/10.26798/juti.v2i1.944.
[9] Y. Dong and Z. Zhang, “Deep forest modeling: An interpretable deep learning method for mineral prospectivity mapping,” J. Geophys. Res. Mach. Learn. Comput., vol. 1, no. 4, p. e2024JH000311, 2024, doi: https://doi.org/10.1029/2024JH000311.
[10] E. H. L. Tan, Y. Hamed, H. Daud, M. A. F. Abdul Wahab, A. A. A. Azhar, and S. Y. Tan, “Profiling investor behavior in the Malaysian derivatives market using K-means clustering,” Front. Artif. Intell., vol. 8, p. 1640776, 2025, doi: https://doi.org/10.3389/frai.2025.1640776.
[11] F. M. Ilyas and S. S. Priscila, “An optimized clustering quality analysis in k-means cluster using silhouette scores,” Explain. AI Appl. Hum. Behav. Anal., pp. 49–63, 2024, doi: 10.4018/979-8-3693-1355-8.ch004.
[12] M. Yusran, R. Fadillah, and R. Shawn, “Segmentasi Pelanggan E-Commerce Berbasis Perilaku Belanja Menggunakan Algoritma K-Means Clustering dan Evaluasi Silhouette Score,” J. Comput. Informatics Res., vol. 5, no. 3, pp. 482–488, 2026, doi: https://doi.org/10.47065/comforch.v5i3.3079.
[13] A. Haryoko, A. Putra, A. Arifia, and A. Nurlifa, “Penerapan Algoritma K-Means dengan Pendekatan RFM untuk Analisis Loyalitas Pelanggan pada Bisnis Online,” Curtina, vol. 6, no. 1, pp. 9–17, 2025, doi: https://doi.org/10.55719/curtina.v6i1.1745.
[14] R. Bhuria et al., “Ensemble-based customer churn prediction in banking: a voting classifier approach for improved client retention using demographic and behavioral data,” Discov. Sustain., vol. 6, no. 1, p. 28, 2025, doi: https://doi.org/10.1007/s43621-025-00807-8.
[15] R. A. de Lima Lemos, T. C. Silva, and B. M. Tabak, “Propension to customer churn in a financial institution: A machine learning approach,” Neural Comput. Appl., vol. 34, no. 14, pp. 11751–11768, 2022, doi: https://doi.org/10.1007/s00521-022-07067-x.
License
Copyright (c) 2026 Ramadhan Alvito Alfian, Safrizal

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





