# The Stock Index Prediction Based on SVR Model with Bat Optimization Algorithm
## 5 Empirical Research and Result Analysis
### Comparison and Analysis of Mid-Term Forecast Results
Compared with the two control models Polynomial kernel-SVR and Sigmoid kernel-SVR without the optimized free parameters, the results are shown in Table 9.  
In terms of RMSE, MAE and MAPE values, similar to the short-term results, the three evaluation indicators generally have the same evaluation when comparing different models, and there are fewer cases of inconsistent results for the three indicators. For the medium-term forecasts of the selected 18 stock indices, the BA-SVR forecasting performance remains optimal in the results of 11 stock indices, having the smallest RMSE, MAE and MAPE. The BA-SVR does not obtain the optimal performance in the other seven groups of stock indices. The Sigmoid kernel function SVR model has the best forecasting performance among the three models for the medium-term forecasts of the SSE B-shares, SSE 50 and SZSE B-index. As for CSI 500, SZSI, SZSE Composite Index and SZSE A Index, the Polynomial kernel function SVR model has slightly higher forecasting performance than the BA-SVR model, but the difference is not significant. The medium-term forecasting performance of BA-SVR is lower than the short-term forecasting performance of BA-SVR except for SZSE B. The medium-term values of RMSE, MAE and MAPE are higher than the short-term values. In contrast to the BA-SVR model, the Polynomial kernel function SVR and Sigmoid kernel function SVR models with default free parameters have improved in some samples, such as the SSE Composite Index and SSE A shares, in terms of medium-term forecasting performance. Combining the 18 stock indices, the BA-SVR model is still able to show better forecasting performance in medium-term forecasting when compared and contrasted with the two SVR models without the bat algorithm's optimality-seeking parameters. Table 10 averages the three forecasting evaluation metrics for the 18 stock indices forecasting performance. The average of the medium-term forecast performance of RMSE, MAE and MAPE of the three models in Table 10 also shows that the BA-SVR model still has an advantage when compared with the SVR model with unseeking parameters in a cross-sectional manner. The medium-term average of all three evaluation metrics of BA-SVR is the smallest, followed \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Algorithm** & **BA-SVR** & **Poly-SVR** & **Sigm-SVR** \\ \hline Average Mid-Term RMSE & 0.1457 & 0.1627 & 1.3907 \\ \hline Average Mid-Term MAE & 0.1268 & 0.1492 & 1.3535 \\ \hline Average Mid-Term MAPE & 0.1393 & 0.1696 & 1.4505 \\ \hline \hline \end{tabular}
\end{table} 
Table 10: Comparison of mid-term forecast results. \begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Index** & **Evaluation Index** & **BA-SVR** & **Poly-SVR** & **Sigm-SVR** \\ \hline \multirow{4}{*}{SME 300} & RMSE & 0.0999 & 0.1292 & 1.5626 \\ \cline{2-5}  & MAE & 0.0868 & 0.1230 & 1.5528 \\ \cline{2-5}  & MAPE & 0.0969 & 0.1388 & 1.7423 \\ \hline \multirow{4}{*}{SME CI} & RMSE & 0.0563 & 0.1050 & 1.4739 \\ \cline{2-5}  & MAE & 0.0431 & 0.0983 & 1.4623 \\ \cline{1-1} \cline{2-5}  & MAPE & 0.0482 & 0.1105 & 1.6348 \\ \hline \hline \end{tabular}
\end{table} 
Table 9: _Cont._by the Polynomial kernel function SVR. The Sigmoid kernel function SVR value is the largest. However, when comparing with the short-term prediction performance of the same model, it can also be found that the BA-SVR model's medium-term prediction is mostly inferior to its short-term prediction, while the Polynomial kernel function support vector regression and Sigmoid kernel function support vector regression without the free parameters optimized by the bat algorithm do not show this characteristic obviously.