IMPLEMENTASI METODE RANDOM FOREST DALAM MEMPREDIKSI SINYAL PERGERAKAN SAHAM - APRIHARTHA, MOCH. ANJAS; HUSNIYADI, M.; ALAM, TAUFIK NUR (E-Jurnal Matematika, 2025)
Trading involves purchasing stocks at low prices and then selling them at high prices to generate profits in a short period. Although it offers significant gains, trading is considered a high-risk activity. Careful analysis is required in stock trading to maximize profits and minimize losses. One way to analyze stocks is through technical analysis, a method used to predict price movements by understanding market actions with charts and technical indicators. One statistical method developed to predict stock trends is the random forest method. Random forest is a combination algorithm of several decision trees used to solve prediction or classification problems. The objective of this research is to obtain the best model for predicting stock price movements. Three types of datasets, namely deterministic, nondeterministic, and mixed, are applied for comparison. The data used is daily historical stock price data of Bank Central Asia Tbk (BBCA) for 10 years. The research results reveal that the best model is using the mixed dataset, constructed with mtry = 6 and ntree = 500. The resulting accuracy is 94,26%, indicating that the model accurately predicts the movement signals of BBCA stock by 94,26%, with the remaining 5,74% misclassification .