## 5 Experimental Results
### ANN
#### 5.5.2 Can News and Tweets Improve the Prediction of the Next Closing Price? In order to check if the sentiment score of the news and the number of tweets can improve the prediction of the next closing price, we examined the intervals in which there are patterns and at the same time have a small DTW distance, i.e., the rules that have a small DTW distance (Supplementary Material file, Table S25). If the sentiment score of news and the number of tweets on these rules help to improve the prediction, then the rules are more useful than the random intervals of days. Thus, the experiments to check if these rules improve the prediction of the next closing price were performed as follows:  
1. the sentiment score of news
2. the number of tweets
3. both of them  
Afterwards, we compared these rules against random intervals of time. In the random intervals of time, the improvement rates of the next closing price are calculated, again, by the sentiment score of news, the number of tweets and both of them. The RapidMiner tool [26] was used for the experiments, and for the prediction, we used two methods of regression, linear regression and the SVM regression. Due to the fact that linear and SVM regression are two of the most popular algorithms in predictive modeling, we decided to perform our experiments by using these two methods. In addition, SVM is a rather robust method for forecasting. The prediction was based on the three previous days. Then, we compared the two methods to evaluate which gives better improvement rates. Figure 8 shows the basic process, which consisted of the following four processes in the RapidMiner tool. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multicolumn{5}{c}{**Null Hypothesis: Both Forecasts Have the Same Accuracy**} \\ \hline \(p\)-value & ARIMA & GLM & LR & SVM & ANN \\ \hline ARIMA & & 0.6067 & 0.6506 & 0.6280 & 0.5403 \\ GLM & & & 0.8132 & 0.1086 \\ LR & & & & 0.1086 & 0.0069 \\ SVM & & & & 0.0076 \\ ANN & & & & & \\ \hline DM-statistic & ARIMA & GLM & LR & SVM & ANN \\ \hline ARIMA & & & 0.5357 & 0.4704 & 0.5038 & \(-\)0.6397 \\ GLM & & & 0.1442 & 0.0520 & \(-\)3.4563 \\ LR & & & & 0.0473 & \(-\)3.6067 \\ SVM & & & & & \(-\)3.5415 \\ ANN & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Diebold–Mariano (DM)-test results on AAPL for all five forecasting models, carried out in pairs. Green colors represent high \(p\)-values, while red corresponds to cases where the null hypothesis is rejected due to almost zero \(p\)-values. The steps of the process in more detail:  
* Read Excel ([[http://docs.rapidminer.com/studio/operators/data_access/files/read/read_excel.html](http://docs.rapidminer.com/studio/operators/data_access/files/read/read_excel.html)]([http://docs.rapidminer.com/studio/operators/data_access/files/read/read_excel.html](http://docs.rapidminer.com/studio/operators/data_access/files/read/read_excel.html))) This operator can be used to load data from Microsoft Excel spreadsheets. In our case, the excel file that will be loaded in the Rapid Miner tool has the following columns (attributes): date, close, volume, open, high, low, sentiment and tweets. * Select Attribute ([[http://docs.rapidminer.com/studio/operators/blending/attributes/selection/select_attributes.html](http://docs.rapidminer.com/studio/operators/blending/attributes/selection/select_attributes.html)]([http://docs.rapidminer.com/studio/operators/blending/attributes/selection/select_attributes.html](http://docs.rapidminer.com/studio/operators/blending/attributes/selection/select_attributes.html))) This operator selects which attributes of an ExampleSet should be kept and which attributes should be removed. This is used in cases when not all attributes of an ExampleSet are required; it helps to select required attributes. In our case, we selected the \"date\" as a filter of attributes, and we selected the option \"invert selection\" because we needed to filter a subset of attributes.