# The Stock Index Prediction Based on SVR Model with Bat Optimization Algorithm
###### Abstract  
Accurate stock market prediction models can provide investors with convenient tools to make better data-based decisions and judgments. Moreover, retail investors and institutional investors could reduce their investment risk by selecting the optimal stock index with the help of these models. Predicting stock index price is one of the most effective tools for risk management and portfolio diversification. The continuous improvement of the accuracy of stock index price forecasts can promote the improvement and maturity of China's capital market supervision and investment. It is also an important guarantee for China to further accelerate structural reforms and manufacturing transformation and upgrading. In response to this problem, this paper introduces the bat algorithm to optimize the three free parameters of the SVR machine learning model, constructs the BA-SVR hybrid model, and forecasts the closing prices of 18 stock indexes in Chinese stock market. The total sample comes from 15 January 2016 (the 10 th trading day in 2016) to 31 December 2020. We select the last 20, 60, and 250 days of whole sample data as test sets for short-term, mid-term, and long-term forecast, respectively. The empirical results show that the BA-SVR model outperforms the polynomial kernel SVR model and sigmoid kernel SVR model without optimized initial parameters. In the robustness test part, we use the stationary time series data after the first-order difference of six selected characteristics to re-predict. Compared with the random forest model and ANN model, the prediction performance of the BA-SVR model is still significant. This paper also provides a new perspective on the methods of stock index forecasting and the application of bat algorithms in the financial field.  
bat algorithm; support vector regression (SVR); stock index prediction; financial market; optimal strategy +
Footnote †: journal:  
Article  
The Stock Index Prediction Based on SVR Model with Bat  
(1) In terms of data selection, this paper selects the daily data of 18 stock indices in China from 2016 to 2020, and uses the data of the last 20, 60, and 250 days in the full sample interval as the short-term forecast group, Mid-term forecast group and long-term forecast group.  
(2) In the selection of predictive performance evaluation indicators, this paper integrates the existing evaluation indicators. Three indicators--RMSE, MAE and MAPE--were selected. The simulation experiment calculates the three index values of the gap between the optimized model predicted value and the true value and compares and analyzes it with the control model.  
The rest of the paper is organized as follows: Section 2 mainly introduces the literature review on stock price forecasting. Section 3 improves the original bat algorithm and proposes a novel hybrid bat algorithm model (BA-SVR) that can predict stock prices. The steps and processes are also described in detail. Section 4 discusses the choice of parameters and designs empirical simulation experiments. Section 5 deals with performance evaluation and Section 6 discusses the robustness test. Finally, the last section consists of the conclusion and future work.