Stock Price Prediction of PT Kalbe Farma Tbk Using the Extreme Gradient Boosting (XGBOOST)
Stock price prediction is crucial in investment decision - making due to its dynamic and volatile nature. Fluctuations in stock prices are influenced by macroeconomic indicators, market sentiment, and global financial conditions, resulting in complex and non-linear patterns that traditional modelsstruggle to capture. PT Kalbe Farma Tbk shares are among the leading stocks in the pharmaceutical sector listed on the Indonesia Stock Exchange. This study employs Extreme Gradient Boosting (XGBoost) to predict PT Kalbe Farma Tbk closing stock price. XGBoost was leveraging its ability to process time series data and model intricate dependencies. XGBoost was chosen for its efficiency in handling large datasets, managing missing values, and applying regularization to prevent overfitting. To enhance model performance ensuring accuracy, robustness, and generalization Particle Swarm Optimization (PSO)and GridSearchCV. PSO and GridSearchCV are used for hyperparameter tuning. PSO is a swarm intelligence-based algorithm, mimics collective behaviors in nature, refining parameters through individual and group adaptation. Meanwhile, GridSearchCV systematically explores parameter spacesvia cross-validation to select optimal configurations. The model was evaluated using Mean Absolute Percentage Error (MAPE). Based on the analysis result, it shows that XGBoost withoutoptimization has a MAPE of 1.78, while optimization with PSO, the MAPE is reduced to 1.46, and GridSearchCV, the MAPE achieved 1.58. These results confirm that PSO and GridSearchCV improve XGBoost’s predictive accuracy, making it a reliable method for financial market forecasting
Institutions
- Diponegoro University (ID)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2025-11-19
- DOI
- https://doi.org/10.5281/zenodo.17647289
- Primary Topic
- Stock Market Forecasting Methods
- Type
- article
- Field-Weighted Citation Impact
- 0.00