Master'sOpen Access

Prediction of prices using XGBoost algorithm: An application on BIST 100, BIST 50, and BIST 30 indices

2025
0 views
0 downloads
Advisor: Prof. Dr. Abdulkadir Kaya

Abstract (EN)

For investors trading in financial markets, it is very important to be able to predict the price of the relevant investment instrument. With globalization, the economic system has become affected by many variables, making the direction and price predictability of financial market instruments more complex. Investors have sought different methods to minimize the impact of this complexity or to turn it in their favor. Before determining and using a forecasting method, investors should be informed about the concept of investment, return and risk, financial markets and financial instruments. In this study, we first provide detailed information about financial literacy. Then, price forecasting with machine learning, which we have started to hear more frequently with the increase in the performance of LLM in recent years, is applied. The XGBoost algorithm, one of the machine learning methods, is used to predict daily index prices for BIST 30, BIST 50 and BIST 100, the leading indices of BIST. The application part of our study consists of two parts. In the first part, daily data obtained between 01.01.2015 and 30.12.2020 are analyzed. 80% of the data was allocated for model training and 20% for testing. In the second part, new data was entered into the model with daily data obtained between 01.01.2011 - 30.12.2023, covering a wider time period, and the model was trained with 100% of the entered data. After the training of the model, price forecasts were made for ten stock market trading days between 02.01.2024 - 15.01.2024. In order for our study to train and predict in an optimized way for the different data sets we input, we did not use standard hyperparameter values. Instead, we chose the GridSearchCV method, which provides a more comprehensive hyperparameter optimization than the RandomizedSearchCV method. With the GridSearchCV method, "n_estimators", "max_depth", "learning_rate", colsample_bytree", 'gamma' and 'subsample' hyperparameters were optimized. All hyperparameters used in the implementation are explained in the paper. The ability of the XGBoost algorithm to make fast and efficient forecasts with decision trees was the main motivation of the study. The performance of the model was evaluated using the R^2 Score and MAPE metrics for both sections. In our study, where 80% of the data was allocated for training and 20% for testing, the model performed best in both performance metrics with a MAPE value of 5.07% and an R^2 value of 0.9002 in our prediction study on BIST 30. In our out-of-sample study, where 100% of the data was used for training, the studies that gave the best MAPE and R^2 values were different. In our out-of-sample study, the best MAPE value is given by our forecasting study on BIST 100 with 2.02%, while the best R^2 value is given by our forecasting study on BIST 30 with 0.4804. The results show that the model offers high accuracy rates on both training and test data.

Author

Tahsin Tayır

How to Cite

Tahsin Tayır (Master Thesis). Prediction of prices using XGBoost algorithm: An application on BIST 100, BIST 50, and BIST 30 indices, 2025, Bursa Technical University.

Keywords

License

Tüm Hakları Saklıdır

This work is shared under the specified license terms.

More theses from Bursa Technical University