Predicting direction of stock price movement by using adaptive ensemble learning method

thumbnail.default.alt
Tarih
2022
Yazarlar
Pekmez, Ali Özkan
Süreli Yayın başlığı
Süreli Yayın ISSN
Cilt Başlığı
Yayınevi
Graduate School
Özet
The stock market allows market players such as traders, investors, and the general public to increase their capital by investing in company stocks. However, their investment may also decrease due to stock market conditions. Chaotic and noisy nature of stock markets leads randomness in price values and makes investments intrinsically risky. Therefore, it is notably important to predict future directions in stock price movements in order to maximize gains and minimize losses in investments. The search for methods that can accurately forecast stock price trends has been a highly researched topic for many years. In the field of financial time series analysis, the machine learning algorithms have been implemented in numerous researches and have showed great promising results. Frequently adopted methods, especially in classification tasks, include Random Forests (RF), Extreme Gradient Boosting (XGB), Light Gradient Boosting Machine (LightGBM), Logistic Regression (LR), Support Vector Machine (SVM), and Neural Networks (NN) etc. But, every single model has its own advantages and drawbacks with various prediction accuracy. On the other hand, an ensemble framework could promote successful aspects and compansate weaknesses by integrating these different algorithms. The objective of this study is to estimate the next day direction of stock price movements using an ensemble model. To achieve this, a group of machine learning algorithms commonly used in this field were selected and combined by an adaptive ensemble learning method to produce a better prediction accuracy. In this context, a multi-stage process was devised and followed step by step. Firstly, the historical data of the stock to be forecasted and its relevant input data were collected. The features were prepared and matched to corresponding output classes (up or down). Secondly, hyperparameter optimization was performed for each selected algorithms. By using a fixed size sliding window model validation, the algorithms were tested along the entire dataset. The observations that fall into the window borders was divided as training and test data in each iteration. After searching optimal hyperparameter values, the some of top values giving highest accuracy score were chosen, and then, based on these hyperparameters and the size of sliding window, single prediction models were constructed. In the next stage, all created single classifier models started to forecast every day individually. As a result of this, for each day in the dataset, classification outputs of all single algorithms which has different accuracy were obtained. Lastly, various ensemble models were established and evaluated. Based on their voting mechanisms, they performed differently. Compared to others, it was determined that dynamic accuracy-based ensemble model produced most succesful prediction results. This ensemble framework mainly consists of two components: majority voting and dynamic class accuracies of individual classifiers. At each forecasting, according to the class outcome of each single algorithm for that day, the class accuracy in the previous n prediction is calculated. Subsequently, these accuracies are utilized as weights on majority voting and aggregated separately. The class with the highest vote value is determined as the estimation output and this process continues to be applied for each next day in the dataset. When compared to using single machine learning algorithms, the proposed method in this study showed a higher prediction accuracy and outperformed the other voting mechanisms. Thus, it was concluded that the proposed ensemble method for stock data classification tasks could provide a better guidance to help stock market players in making their investment decisions rather than using individual classifiers independently.
Açıklama
Thesis (M.Sc.) -- İstanbul Technical University, Graduate School, 2022
Anahtar kelimeler
Learning techniques, Estimation methods, Stocks
Alıntı