Classification of LQ45 Stock Investment Decisions Using the Random Forest Algorithm Based on Technical Indicators

Authors

  • Mutiara STMIK Kaputama Binjai
  • Novriyenni STMIK KAPUTAMA
  • Marto Sihombing STMIK KAPUTAMA

DOI:

https://doi.org/10.59934/jaiea.v6i1.2840

Keywords:

Classification, LQ45, Random Forest, Stock Investment, Technical Indicators

Abstract

Fluctuating stock price movements make it challenging for investors to determine appropriate investment decisions. This study aims to classify investment decisions for LQ45 stocks into buy, hold, and sell categories using the Random Forest algorithm based on technical indicators. The study utilized 26,377 historical records collected from eight companies listed in the LQ45 index. The data were processed through preprocessing, calculation of technical indicators, including SMA5, SMA10, EMA12, EMA26, MACD, Signal, Histogram, and RSI14, and label generation based on future returns. Furthermore, three train–test split ratios of 60:40, 70:30, and 80:20 were compared to evaluate the model's performance. The results demonstrate that the Random Forest algorithm is capable of effectively classifying investment decisions for LQ45 stocks. In addition to the train–test split ratio, the model's performance was also influenced by the labeling strategy. Different future return horizons, such as 5, 30, and 60 days, produced different label distributions, thereby affecting the classification accuracy. These findings indicate that selecting an appropriate labeling strategy is a crucial factor in developing an effective stock investment decision classification model.

Downloads

Download data is not yet available.

References

PT Kustodian Sentral Efek Indonesia, "Statistik Pasar Modal Indonesia, Januari 2026," Jan. 2026. [Online]. Available: https://web.ksei.co.id/files/Statistik_Publik_Januari_2026.pdf

S. M. Mostafavi and A. R. Hooman, "Key Technical Indicators for Stock Market Prediction," Machine Learning with Applications, vol. 20, 2025.

C. Lohrmann and M. Lohrmann, "A Machine Learning Approach to Predicting the Accuracy of Analysts' Target Prices," Sustainability, 2021.

H. V. H. Ayala et al., "Technical Analysis Strategy Optimization Using a Machine Learning Approach in Stock Market Indices," 2021.

Arif et al., "Integration of Technical Analysis and Machine Learning to Improve Stock Price Prediction Accuracy," 2024.

D. Purwitasari, O. P. Putri, and W. N. Khotimah, “Aturan Asosiasi Dengan Standar Storet Pada Model Prediksi Parameter Pendukung Uji Kualitas Air Baku,” J. Inf. Syst. Eng. Bus. Intell., vol. 1, no. 1, pp. 1–8, 2015.

B. Purnama and I. Sofana, Implementasi Artificial Intelligence dan Machine Learning. Bandung, Indonesia: Informatika Bandung, 2021.

M. E. Bastian, B. Rahayudi, and D. E. Ratnawati, "Prediksi Trend Harga Saham Jangka Pendek Berdasarkan Fitur Technical Analysis dengan Menggunakan Algoritma Random Forest," Jurnal Pengembangan Teknologi Informasi dan Ilmu Komputer, vol. 5, no. 10, pp. 4536–4542, 2021.

S. Behl, J. Jarsania, and S. Maitra, "A Machine Learning Framework for Stock Trading: Integrating Technical and Economic Indicators," Journal of Posthumanism, vol. 5, no. 8, pp. 48–56, 2025, doi: 10.63332/joph.v5i8.3133.

S. Dongrey, "Study of Market Indicators Used for Technical Analysis," International Journal of Engineering and Management Research, vol. 12, no. 2, 2022, doi: 10.31033/ijemr.12.2.11.

Downloads

Published

2026-10-15

How to Cite

Mutiara, Novriyenni, & Marto Sihombing. (2026). Classification of LQ45 Stock Investment Decisions Using the Random Forest Algorithm Based on Technical Indicators. Journal of Artificial Intelligence and Engineering Applications (JAIEA), 6(1), 752–757. https://doi.org/10.59934/jaiea.v6i1.2840