# Unleashing the Power of Tweets and News in Stock-Price Prediction Using Machine-Learning Techniques
## 5 Results and Discussion
### Comparing Predictive Models under Pantic and Normal Circumstances  
To investigate the models' performance under panic and normal circumstances, we created two separate test sets, the normal set (nor-set) and the panic set (pan-set), for each stock. The reason behind creating two sets for each stock is due to the nature of Bloomberg, which generates TC and NC variables relating to the number of times the public mentions a company. Therefore, interesting insights can be gained by analyzing the performance of all models in times of increased panic in the stock market. It is a general consensus that, in the first half of 2020, North America experienced widespread panic related to the performance of the stock market and the economy due to the impact of the global COVID-19 pandemic outbreak [164]. The average RMSE for models tested on the pan-set was 0.0670, while the average RMSE for the nor-set was 0.0354. There is an apparent decrease in performance when testing models on the nor-set compared to the pan-set. To test the statistical significance of this difference, a Wilcox signed-rank test was conducted between the RMSEs of the models tested on these sets. The results showed that this difference in performance is significant, even at a 1% level (\(p\)-value-0.001).  
To better understand this discrepancy in performance, an analysis of how the variables of interest differed between the different test sets can be found in Appendix. This analysis provides insights into the changes in mean, standard deviation, and coefficient of variation (CV) of the T+ variable (including TC, NC, and close price) across the overall dataset, training dataset, normal test sets, and panic test set. It is worth noting that the normal test set spans from January 2019 to November 2019 (including 218 observations), whereas the panic test set includes 151 observations, covering December 2019 to May 2020 (this is mainly due to the date of a report issued by the World Health Organization which resulted in panic in the US stock market [34]). Additionally, the training data encompasses 1043 observations, covering the period from January 2015 to December 2018. By splitting our analysis into these three distinct sections, we allow ourselves a starting point from which to theorize what may have caused an average decrease in performance for the tests done on the pan-set versus the nor-set.  
Table 4 shows a summary of the analysis of two T+ variables, the TC and the NC, and the price differences between the pan-set and the training data. The companies aredisplayed in descending order by mean RMSE for the pan-set. As shown in Table 4, when comparing the bottom 50% to the top 50% of the list, the CV for the TC and NC variables exhibit a 19% and 27% absolute difference, respectively. In addition, the percentage change of mean TC and NC variables shows an 18% and 19% absolute difference, respectively. The difference in variance between the data the models are learning from and the additional period added to the nor-set to make it the pan-set are critical to our analysis. The average percentage change in mean for the price data, as well as the average CV of the price data, exhibits a similar difference between the panic data and training data for all the stocks being predicted. This discrepancy in variable variance between the training and test sets can be the primary cause of the drop in performance when it comes to the pan-set compared to the nor-set.