Volatile stock price movements are a big problem in making investment decisions, especially in stocks with high volatility. This research aims to build a stock price prediction model by utilising the Extreme Gradient Boosting (XGBoost) algorithm optimised using the Adaptive Particle Swarm Optimization (APSO) method. The research focuses on two stocks with high volatility levels, namely PT Jaya Agra Wattie Tbk (JAWA) and PT Charnic Capital Tbk (NICK) with historical closing price data from August 2019 to July 2024. The research process includes data collection, preprocessing, modelling, optimazing and model performance evaluation using the Mean Absolute Percentage Error (MAPE) metric. The results showed that the XGBoost-APSO combination proved superior to the standard XGBoost-PSO and XGBoost methods in predicting stock prices without overfitting. The MAPE value on JAWA stock is 5.20 (training) and 5.95 (testing) with a difference of 0.75. As for NICK stock, the MAPE on training data is 4.50 and testing is 5.40, with a difference of 0.90. The model also successfully predicts the closing price movement in the next five days realistically according to its historical volatility characteristics. This research proves that the combination of XGBoost with APSO optimisation is effective in handling stock data with high volatility and can be used as a predictive tool in investment decision making. Keyword: prediction, stock price, volatile, XGBoost, APSO Data, Source Code, dan Plagiarisme: https://drive.google.com/file/d/1GRhEguXHYj-mzbE2fW7MsnpjUuaJnyxl/view?usp=sharing
Copyrights © 2026