International Journal of Electrical and Computer Engineering (IJECE) Vol. 15, No. 2, April 2025, pp. 1783~1792 ISSN: 2088-8708, DOI: 10.11591/ijece.v15i2.pp1783-1792 1783 Journal homepage: http://ijece.iaescore.com Predicting stock prices using ensemble learning techniques Salma Elsayed 1 , Ahmad Salah 1,2 , Ibrahim Elhenawy 1 , Marwa Abdellah 1 1 Department of Computer Science, Faculty of Computers and Informatics, Zagazig University, Zagazig, Egypt 2 Department of Information Technology, College of Computing and Information Sciences, University of Technology and Applied Sciences, Ibri, Sultanate of Oman Article Info ABSTRACT Article history: Received Dec 28, 2023 Revised Aug 13, 2024 Accepted Oct 23, 2024 Stock price prediction has grown in importance due to its role in determining the future worth of business shares. There are several approaches for stock price prediction that can be classified into machine learning, deep learning, and ensemble learning methods. To predict stock prices, we proposed collecting a dataset for different well-known stocks, e.g., Microsoft. The utilized datasets consist of two parts; the first part contains a set of tweets for the stocks under investigation in this study which were collected from the X social media platform and the other part contains the stock prices. Sentimental features of the tweets were extracted and merged with the stock price changes. Then, we framed the problem as a regression task. we aim to analyze the performance gap between ensemble learning and other machine learning (ML) and deep learning (DL) models for predicting stock prices based on tweets. In this context, different ensemble learning models were proposed to predict the price change of each stock. Besides, several machine learning and deep learning models were used for comparison purposes. Several evaluation metrics were utilized to evaluate the performance of the proposed models. The experimental results proved that the stacking regressor model outperformed the other models. Keywords: Deep learning Ensemble learning Machine learning Prediction regression Stock price This is an open access article under the CC BY-SA license. Corresponding Author: Ahmad Salah Department of Computer Science, Faculty of Computers and Informatics, Zagazig University Alzeraa Square, Zagazig, Sharkia, 44519, Egypt Email: ahmad@zu.edu.eg 1. INTRODUCTION The internet serves as an online learning platform for communication and exchanging ideas. Through common social media platforms, people can contribute feedback and suggestions for a wide range of services and offerings. Twitter, Facebook, and Google+ are well-known examples of social media platforms that are utilized for idea posting. Twitter is an online social network where millions of tweets are posted every day. The prediction method may be carried out using Twitter data. Live Twitter data may be collected via the Twitter API and analyzed using the classifier. The stock market is an important part of the economy and affects commerce changes and industrial growth. Several data mining approaches are employed to handle variations in the stock market, and financial news articles are assumed to influence stock prices [1], [2], [3]. In [4], a unique sentiment indicator based on weighted textual contents and financial aberrations to forecast stock changes is performed. First, the authors suggested a unique weighting approach for each stock movement. Then, they produced an actual adjusted sentiment measure that was more accurate by accounting for the day of the week and vacation. Using support vector machine (SVM) [5], [6], decision tree (DT), gradient boosting decision tree (GBDT), random forest (RF) [7] naïve Bayes (NB), K-nearest neighbor