Evaluation of Tree-Based Ensemble Machine Learning Models in Predicting Stock Price Direction of Movement

Forecasting the direction and trend of stock price is an important task which helps investors to make prudent financial decisions in the stock market. Investment in the stock market has a big risk associated with it. Minimizing prediction error reduces the investment risk. Machine learning (ML) mode...

Full description

Bibliographic Details
Main Authors: Ernest Kwame Ampomah, Zhiguang Qin, Gabriel Nyame
Format: Article
Language:English
Published: MDPI AG 2020-06-01
Series:Information
Subjects:
Online Access:https://www.mdpi.com/2078-2489/11/6/332
id doaj-dbde579b4e544b9bb996b5fed25addbb
record_format Article
spelling doaj-dbde579b4e544b9bb996b5fed25addbb2020-11-25T03:11:29ZengMDPI AGInformation2078-24892020-06-011133233210.3390/info11060332Evaluation of Tree-Based Ensemble Machine Learning Models in Predicting Stock Price Direction of MovementErnest Kwame Ampomah0Zhiguang Qin1Gabriel Nyame2School of Information and Software Engineering, University of Electronic Science and Technology of China (UESTC), Chengdu 610051, ChinaSchool of Information and Software Engineering, University of Electronic Science and Technology of China (UESTC), Chengdu 610051, ChinaSchool of Information and Software Engineering, University of Electronic Science and Technology of China (UESTC), Chengdu 610051, ChinaForecasting the direction and trend of stock price is an important task which helps investors to make prudent financial decisions in the stock market. Investment in the stock market has a big risk associated with it. Minimizing prediction error reduces the investment risk. Machine learning (ML) models typically perform better than statistical and econometric models. Also, ensemble ML models have been shown in the literature to be able to produce superior performance than single ML models. In this work, we compare the effectiveness of tree-based ensemble ML models (Random Forest (RF), XGBoost Classifier (XG), Bagging Classifier (BC), AdaBoost Classifier (Ada), Extra Trees Classifier (ET), and Voting Classifier (VC)) in forecasting the direction of stock price movement. Eight different stock data from three stock exchanges (NYSE, NASDAQ, and NSE) are randomly collected and used for the study. Each data set is split into training and test set. Ten-fold cross validation accuracy is used to evaluate the ML models on the training set. In addition, the ML models are evaluated on the test set using accuracy, precision, recall, F1-score, specificity, and area under receiver operating characteristics curve (AUC-ROC). Kendall W test of concordance is used to rank the performance of the tree-based ML algorithms. For the training set, the AdaBoost model performed better than the rest of the models. For the test set, accuracy, precision, F1-score, and AUC metrics generated results significant to rank the models, and the Extra Trees classifier outperformed the other models in all the rankings.https://www.mdpi.com/2078-2489/11/6/332stock pricemachine learningtechnical indicatorsfeature extraction
collection DOAJ
language English
format Article
sources DOAJ
author Ernest Kwame Ampomah
Zhiguang Qin
Gabriel Nyame
spellingShingle Ernest Kwame Ampomah
Zhiguang Qin
Gabriel Nyame
Evaluation of Tree-Based Ensemble Machine Learning Models in Predicting Stock Price Direction of Movement
Information
stock price
machine learning
technical indicators
feature extraction
author_facet Ernest Kwame Ampomah
Zhiguang Qin
Gabriel Nyame
author_sort Ernest Kwame Ampomah
title Evaluation of Tree-Based Ensemble Machine Learning Models in Predicting Stock Price Direction of Movement
title_short Evaluation of Tree-Based Ensemble Machine Learning Models in Predicting Stock Price Direction of Movement
title_full Evaluation of Tree-Based Ensemble Machine Learning Models in Predicting Stock Price Direction of Movement
title_fullStr Evaluation of Tree-Based Ensemble Machine Learning Models in Predicting Stock Price Direction of Movement
title_full_unstemmed Evaluation of Tree-Based Ensemble Machine Learning Models in Predicting Stock Price Direction of Movement
title_sort evaluation of tree-based ensemble machine learning models in predicting stock price direction of movement
publisher MDPI AG
series Information
issn 2078-2489
publishDate 2020-06-01
description Forecasting the direction and trend of stock price is an important task which helps investors to make prudent financial decisions in the stock market. Investment in the stock market has a big risk associated with it. Minimizing prediction error reduces the investment risk. Machine learning (ML) models typically perform better than statistical and econometric models. Also, ensemble ML models have been shown in the literature to be able to produce superior performance than single ML models. In this work, we compare the effectiveness of tree-based ensemble ML models (Random Forest (RF), XGBoost Classifier (XG), Bagging Classifier (BC), AdaBoost Classifier (Ada), Extra Trees Classifier (ET), and Voting Classifier (VC)) in forecasting the direction of stock price movement. Eight different stock data from three stock exchanges (NYSE, NASDAQ, and NSE) are randomly collected and used for the study. Each data set is split into training and test set. Ten-fold cross validation accuracy is used to evaluate the ML models on the training set. In addition, the ML models are evaluated on the test set using accuracy, precision, recall, F1-score, specificity, and area under receiver operating characteristics curve (AUC-ROC). Kendall W test of concordance is used to rank the performance of the tree-based ML algorithms. For the training set, the AdaBoost model performed better than the rest of the models. For the test set, accuracy, precision, F1-score, and AUC metrics generated results significant to rank the models, and the Extra Trees classifier outperformed the other models in all the rankings.
topic stock price
machine learning
technical indicators
feature extraction
url https://www.mdpi.com/2078-2489/11/6/332
work_keys_str_mv AT ernestkwameampomah evaluationoftreebasedensemblemachinelearningmodelsinpredictingstockpricedirectionofmovement
AT zhiguangqin evaluationoftreebasedensemblemachinelearningmodelsinpredictingstockpricedirectionofmovement
AT gabrielnyame evaluationoftreebasedensemblemachinelearningmodelsinpredictingstockpricedirectionofmovement
_version_ 1724653918740283392