# Unleashing the Power of Tweets and News in Stock-Price Prediction Using Machine-Learning Techniques
## 2 Literature Review
### ML Techniques in Stock-Price Prediction  
Several ML techniques have been employed in stock-price prediction. Among these techniques, the K nearest neighbor (KNN), random forests (RF), support vector machines (SVM), regression, support vector regression (SVR), and ARIMA are the most popular. The KNN algorithm is one of the initial ML algorithms for stock-price prediction and is a supervised algorithm used exclusively for classification and regression. The primary operation involves identifying the closest neighbors to the queried data point. If the task is classification, the most-occurring neighbor value is returned and used as the output value. However, if regression is the objective, then the average of all neighbor values is returned and used as the output value. [PERSON] and [PERSON] [131] applied the regression format of this algorithm for stock-price prediction. Nevertheless, its application in stock-price prediction has decreased in recent years due to its simplicity, as it results in poor performance when compared to newer ML approaches. For instance, [PERSON] et al. [97] utilized the KNN and SVM algorithms for stock-price prediction and compared their performance to show the superiority of the SVM algorithm. [PERSON] et al. [104] also used ML algorithms to investigate the impact of the forecasting window length on stock-price prediction. They concluded that KNN-SVM results in appropriate prediction accuracy; however, the KNN leads to poor performance. Regression is another supervised ML technique used for stock-price prediction. For instance, [PERSON] et al. [88] incorporated this algorithm to predict stock-price movements. To this end, they divided users into stakeholder groups and then analyzed how stakeholder group postings correlated with events in the company. They then used this information to predict movements in stock prices. Furthermore, [PERSON] and [PERSON] [58] investigated the sentiments extracted from a vast repository of tweets sourced from StockTwits. They employed three distinct machine-learning algorithms (i.e., Naive Bayes, SVM, and logistic regression) and additionally explored five different featurization techniques (i.e., bag of words, bigram, trigram, term frequency-inverse document frequency (TF-IDF), and latent semantic analysis (LSA)) in an attempt to comprehensively understand the nuanced relationship between sentiment and stock-market dynamics. The work of [PERSON] et al. [123] also utilized ML for stock-price prediction. However, they introduced the bat algorithm to optimize the three free parameters of the SVR model to create the BA-SVR hybrid model. This model was then employed to forecast the closing prices of 18 stock indexes in the Chinese stock market. The empirical results demonstrated that the BA-SVR model surpassed both the polynomial kernel SVR model and the sigmoid kernel SVR model, particularly when compared to the latter models without the optimized initial parameters. Moreover, random forests (RF) are another ML algorithm for stock-price prediction (e.g., [15; 83; 110; 132]). This algorithm aggregates the power of a large number of individual decision-tree algorithms to improve the prediction performance [133]. More specifically, it is based on the simple principle that many relatively simple models that exhibit low correlation will outperform any of the individual models when they operate as a joint group [134]. [PERSON] et al., [83] examined whether textual data improves stock-price prediction when RFs are employed in training their models. The authors' proposed RF model consisted of 2000 trees, and all the models tested were successfully trained. Their results demonstrated that the incorporation of textual data improved next-day price-movement prediction by 10%. Similarly, [PERSON] et al. [110] examined the effectiveness of incorporating both textual data and technical data in stock-price prediction. Applying decision trees was one of their tested methods alongside SVM and NN.