The Predictability of Tree-based Machine Learning Algorithms in the Big Data Context

Document Type : Original Article


Computer Engineering Department, Yazd University, Yazd, Iran


This research work is concerned with the predictability of ensemble and singular tree-based machine learning algorithms during the recession and prosperity of the two companies listed in the Tehran Stock Exchange in the context of big data. In this regard, the main issue is that economic managers and the academic community require predicting models with more accuracy and reduced execution time; moreover, the prediction of the companies recession in the stock market is highly significant. Machine learning algorithms must be able to appropriately predict the stock return sign during the market downturn and boom days. Addressing the stated challenge will upgrade the quality of stock purchases and, subsequently, will increase profitability. In this article, the proposed solution relies on the utilization of tree-based machine learning algorithms in the context of big data. The proposed solution exploits the decision tree algorithm, which is a traditional and singular tree-based learning algorithm. Furthermore, two modern and ensemble tree-based learning algorithms, random forest and gradient boosted tree, has been utilized for predicting the stock return sign during recession and prosperity. The mentioned cases were implemented by applying the machine learning tools in python programming language and PYSPARK library that is used explicitly for the big data context. The utilized research data of the current study are the shares information of two companies of the Tehran Stock Exchange. The obtained results reveal that the applied ensemble learning algorithms have performed better than the singular learning algorithms. Additionally, adding 23 technical features to the initial data and subsequent applying of the PCA feature reduction method have demonstrated the best performance among other modes. In the meantime, it has been concluded that the initial data do not possess the proper resolution or generalizability, either during prosperity or recession.


  1. Khedmati. M, Seifi. F, Azizi. M.J, “Time Series Forecasting of Bitcoin Price Based on Autoregressive Integrated Moving Average and Machine Learning Approaches”, International Journal of Engineering, Transactions A: Basics, Vol. 33, No. 7, (2020), 1293-1303. DOI: 10.5829/IJE.2020.33.07A.16
  2. Hemati. H.R., Ghasemzadeh. M,  Meinel. C, “A Hybrid Machine Learning Method for Intrusion Detection”, International Journal  
  • of Engineering, Transactions C: Aspects, Vol. 29, No. 9, (2016), 1242-1246, DOI: 10.5829/idosi.ije.2016.29.09c.09
  1. Liu, J, and Kemp. A, “Forecasting the sign of U.S. oil and gas industry stock index excess returns employing macroeconomic variables”, Energy Economics, Vol. 81, (2019), 672-686.
  2. Jiang. M, Liu. J, Zhang. L, and Liu. C, “An improved Stacking framework for stock index prediction by leveraging tree-based ensemble models and deep learning algorithms”, Physica A-Statistical Mechanics and Its Applications, Vol. 541, (2020) 122272.
  3. Begenau. J, Farboodi. M, and Veldkamp. L, “Big data in finance and the growth of large firms”, Journal of Monetary Economics, Vol. 97, (2018), 71-87.
  4. Breiman. L, “Bagging Predictors”, Machine Learning Archive, Vol. 24, No. 2, (1996), 123-140.
  5. Freund. Y and Schapire. R.E, “Experiments with a New Boosting Algorithm”, in Proceedings of the International Conference on Machine Learning, (1996), 148-156.
  6. Tsai. C.-F, Lin. Y.-C, Yen. D.C, and Chen. Y.M, “Predicting stock returns by classifier ensembles”, Applied Soft Computing, Vol. 11, No. 2, (2011), 2452-2459.
  7. Ballings. M, Van den Poel. D, Hespeels. N, and Gryp. R,  “Evaluating multiple classifiers for stock price direction prediction,” Expert Systems With Applications, Vol. 42, No. 20, (2015), 7046-7056.
  8. Basak. S, Kar. S, Saha. S, Khaidem. L, and Dey. S.R, “Predicting the direction of stock market prices using tree-based classifiers,” The North American Journal of Economics and Finance, Vol. 47, (2019), 552-567.
  9. Weng. B, Martinez. W.G, Tsai. Y, Li. C, Lu. L, Barth. J.R., Megahed F.M, “Macroeconomic indicators alone can predict the monthly closing price of major U.S. indices: Insights from artificial intelligence, time-series analysis and hybrid models”, Applied Soft Computing, Vol. 71, (2018), 685-697.