# The Stock Index Prediction Based on SVR Model with Bat Optimization Algorithm
## 7 Conclusions  
In this paper, the bat algorithm in the swarm optimization algorithm is applied to optimize the free parameters of the Gaussian radial basis kernel function support vector regression model, and then the BA-SVR hybrid model is constructed. In this paper, the constructed BA-SVR hybrid model is applied to the closing price forecasting of 18 stock indices in the capital market of mainland China, and compares it with the forecast results of the control model in the short, medium and long term, and the following conclusions are obtained. (1) The proposed BA-SVR model has better forecasting performance in the short, medium and long term. (2) After comparing with the polynomial kernel function support vector regression and the Sigmoid kernel function SVR model without optimization of free parameters, the prediction performance of the BA-SVR model is still robust in different periods. (3) The BA-SVR model has the best forecasting performance in the short-term, followed by the mid-term, and the lowest forecasting ability in the long term, while the other two control models have no such significant characteristics. Overall, the BA-SVR model has certain advantages in the application of forecasting stock indices in financial markets, and the optimization of the bat algorithm is further applied to stock index forecasting, which also provides a new perspective on the application of the bat algorithm in finance. In future research, more attention will be given to the prediction and optimization of this hybrid model in other financial and management problems, or to the setting and selection of initial free parameters by metaheuristic algorithms in other machine learning models, and to the implementation of these methods in other optimization problems. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Index** & **Evaluation Index** & **BA-SVR** & **ANN** & **RF** \\ \hline \multirow{4}{*}{SZSE B shares} & RMSE & 0.1771 *** & 0.1549 & 0.1504 \\ \cline{2-5}  & MAE & 0.1303 *** & 0.1135 & 0.1119 \\ \cline{2-5}  & MAPE & 0.2398 *** & 0.2160 & 0.2073 \\ \hline \multirow{4}{*}{SZSE} & RMSE & 0.1599 *** & 0.1617 & 0.1505 \\ \cline{2-5}  & MAE & 0.1228 *** & 0.1143 & 0.1107 \\ \cline{2-5}  & MAPE & 0.2942 *** & 0.3012 & 0.2763 \\ \hline \multirow{4}{*}{SZSE A shares} & RMSE & 0.1604 ** & 0.1675 & 0.1515 \\ \cline{2-5}  & MAE & 0.1233 ** & 0.1203 & 0.1106 \\ \cline{2-5}  & MAPE & 0.2963 ** & 0.3106 & 0.2781 \\ \hline \multirow{4}{*}{SME} & RMSE & 0.1938 *** & 0.2474 *** & 0.1788 \\ \cline{2-5}  & MAE & 0.1462 *** & 0.1760 *** & 0.1337 \\ \cline{2-5}  & MAPE & 0.7699 *** & 0.9326 *** & 0.7551 \\ \hline \multirow{4}{*}{SME 300} & RMSE & 0.1578 & 0.1781 *** & 0.1553 \\ \cline{2-5}  & MAE & 0.1183 & 0.1295 *** & 0.1152 \\ \cline{2-5}  & MAPE & 0.3124 & 0.3257 *** & 0.3049 \\ \hline \multirow{4}{*}{SME CI} & RMSE & 0.1572 *** & 0.1490 & 0.1430 \\ \cline{2-5}  & MAE & 0.1191 *** & 0.1067 & 0.1049 \\ \cline{1-1} \cline{2-5}  & MAPE & 0.3665 *** & 0.3711 & 0.3525 \\ \hline \hline \end{tabular}
\end{table} 
Table 17: _Cont._  
**Author Contributions:** Conceptualization, Y.W. ; methodology, Y.W. and S.L. ; software, Y.W. and S.L. ; validation, Y.W., S.L., H.C. and J.Z. ; formal analysis, Y.W., S.L. and J.Z. ; investigation, Y.W., S.L. and J.Z. ; resources, J.Z. ; data curation, Y.W. and S.L. ; writing--original draft preparation, Y.W. and H.C.; Writing--review & editing, Y.W. and S.L. ; visualization, Y.W., S.L. and J.Z. ; supervision, J.Z. ; project administration, J.Z. ; funding acquisition, S.L. and J.Z. All authors have read and agreed to the published version of the manuscript. **Funding:** This research is supported by the Fundamental Research Funds for the Central Universities under Grant No. CUSF-DH-D-2018050 and the NSFC Project (71871066). **Institutional Review Board Statement:** Not applicable. **Informed Consent Statement:** Not applicable.