An improved Stacking framework for stock index prediction by leveraging tree-based ensemble models and deep learning algorithms

Abstract Stock price index is an essential component of financial systems and indicates the economic performance in the national level. Even if a small improvement in its forecasting performance will be highly profitable and meaningful. This manuscript input technical features together with macroeconomic indicators into an improved Stacking framework for predicting the direction of the stock price index in respect of the price prevailing some time earlier, if necessary, a month. Random forest (RF), extremely randomized trees (ERT), extreme gradient boosting (XGBoost) and light gradient boosting machine (LightGBM), which pertain to the tree-based algorithms, and recurrent neural networks (RNN), bidirectional RNN, RNN with long short-term memory (LSTM) and gated recurrent unit (GRU) layer, which pertain to the deep learning algorithms, are stacked as base classifiers in the first layer. Cross-validation method is then implemented to iteratively generate the input for the second level classifier in order to prevent overfitting. In the second layer, logistic regression, as well as its regularized version, are employed as meta-classifiers to identify the unique learning pattern of the base classifiers. Empirical results over three major U.S. stock indices indicate that our improved Stacking method outperforms state-of-the-art ensemble learning algorithms and deep learning models, achieving a higher level of accuracy, F-score and AUC value. Besides, another contribution in our research paper is the design of a Lasso (least absolute shrinkage and selection operator) based meta-classifier that is capable of automatically weighting/selecting the optimal base learners for the forecasting task. Our findings provide an integrated Stacking framework in the financial area.

[1]  Adriano Lorena Inácio de Oliveira,et al.  Expert Systems With Applications , 2022 .

[2]  Dong Yu,et al.  Context-Dependent Pre-Trained Deep Neural Networks for Large-Vocabulary Speech Recognition , 2012, IEEE Transactions on Audio, Speech, and Language Processing.

[3]  Li-Chiu Chang,et al.  Reinforced recurrent neural networks for multi-step-ahead flood forecasts , 2013 .

[4]  Guy Lapalme,et al.  A systematic analysis of performance measures for classification tasks , 2009, Inf. Process. Manag..

[5]  Tara N. Sainath,et al.  Deep Neural Networks for Acoustic Modeling in Speech Recognition: The Shared Views of Four Research Groups , 2012, IEEE Signal Processing Magazine.

[6]  Lin Lu,et al.  Macroeconomic indicators alone can predict the monthly closing price of major U.S. indices: Insights from artificial intelligence, time-series analysis and hybrid models , 2018, Appl. Soft Comput..

[7]  Kuldip K. Paliwal,et al.  Bidirectional recurrent neural networks , 1997, IEEE Trans. Signal Process..

[8]  Yoshua Bengio,et al.  Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling , 2014, ArXiv.

[9]  Ömer Kaan Baykan,et al.  Predicting direction of stock price index movement using artificial neural networks and support vector machines: The sample of the Istanbul Stock Exchange , 2011, Expert Syst. Appl..

[10]  Hong Peng,et al.  Improving the integration of piece wise linear representation and weighted support vector machine for stock trading signal prediction , 2017, Appl. Soft Comput..

[11]  Muh-Cherng Wu,et al.  An effective application of decision tree to stock trading , 2006, Expert Syst. Appl..

[12]  Leo Breiman,et al.  Bagging Predictors , 1996, Machine Learning.

[13]  Rabab Kreidieh Ward,et al.  Deep Sentence Embedding Using Long Short-Term Memory Networks: Analysis and Application to Information Retrieval , 2015, IEEE/ACM Transactions on Audio, Speech, and Language Processing.

[14]  Alex Graves,et al.  Long Short-Term Memory , 2020, Computer Vision.

[15]  Ian H. Witten,et al.  Data mining: practical machine learning tools and techniques, 3rd Edition , 1999 .

[16]  Pierre Geurts,et al.  Extremely randomized trees , 2006, Machine Learning.

[17]  Yulei Rao,et al.  A deep learning framework for financial time series using stacked autoencoders and long-short term memory , 2017, PloS one.

[18]  Leo Breiman,et al.  Random Forests , 2001, Machine Learning.

[19]  Kyoung-jae Kim,et al.  Financial time series forecasting using support vector machines , 2003, Neurocomputing.

[20]  Snehanshu Saha,et al.  Predicting the direction of stock market prices using tree-based classifiers , 2019, The North American Journal of Economics and Finance.

[21]  Tie-Yan Liu,et al.  LightGBM: A Highly Efficient Gradient Boosting Decision Tree , 2017, NIPS.

[22]  Sahil Shah,et al.  Predicting stock and stock price index movement using Trend Deterministic Data Preparation and machine learning techniques , 2015, Expert Syst. Appl..

[23]  Rabab Kreidieh Ward,et al.  Distributed Compressive Sensing: A Deep Learning Approach , 2015, IEEE Transactions on Signal Processing.

[24]  Manish Kumar,et al.  Forecasting Stock Index Movement: A Comparison of Support Vector Machines and Random Forest , 2006 .

[25]  Youngohc Yoon,et al.  A Comparison of Discriminant Analysis versus Artificial Neural Networks , 1993 .

[26]  David C. Yen,et al.  Predicting stock returns by classifier ensembles , 2011, Appl. Soft Comput..

[27]  Hasan Dehghan Dehnavi,et al.  Evaluating the Employment of Technical Indicators in Predicting Stock Price Index Variations Using Artificial Neural Networks (Case Study: Tehran Stock Exchange) , 2012 .

[28]  Ming-Chi Lee,et al.  Using support vector machine with a hybrid feature selection method to the stock trend prediction , 2009, Expert Syst. Appl..

[29]  Shouyang Wang,et al.  Forecasting stock market movement direction with support vector machine , 2005, Comput. Oper. Res..

[30]  Jian Ma,et al.  A comparative assessment of ensemble learning for credit scoring , 2011, Expert Syst. Appl..

[31]  François Chollet,et al.  Deep Learning with Python , 2017 .

[32]  David Brownstone,et al.  Using percentage accuracy to measure neural network predictions in Stock Market movements , 1996, Neurocomputing.

[33]  Jianjun Xu,et al.  Deep Learning with Gated Recurrent Unit Networks for Financial Sequence Predictions , 2018 .

[34]  R. Tibshirani Regression Shrinkage and Selection via the Lasso , 1996 .

[35]  Jian Cao,et al.  Financial time series forecasting model based on CEEMDAN and LSTM , 2019, Physica A: Statistical Mechanics and its Applications.

[36]  Achilleas Zapranis,et al.  Stock performance modeling using neural networks: A comparative study with regression models , 1994, Neural Networks.

[37]  Steven H. Kim,et al.  Graded Forecasting using an Array of Bipolar Predictions: Application of Probabilistic Neural Networks to a Stock Market Index , 1998 .

[38]  Michel Ballings,et al.  Evaluating multiple classifiers for stock price direction prediction , 2015, Expert Syst. Appl..

[39]  J. Friedman Greedy function approximation: A gradient boosting machine. , 2001 .

[40]  Mark J. Kamstra,et al.  Forecast combining with neural networks , 1996 .

[41]  J. Ross Quinlan,et al.  Induction of Decision Trees , 1986, Machine Learning.