Information System Establishment and Prediction Analysis for SVM Model of RBF Kernel Function

The effective prediction of Shanghai Composite Index can provide much useful information for relative organizations to analyze the changes of stock market and then make right decision. Therefore, the prediction of the Shanghai Composite Index is meaningful. In this study, supported vector machine (SVM) algorithm is employed to construct the prediction model, and MSE R2 are used for error test. The result shows SVM model has high accuracy, which indicates the prediction model established in this study is reliable.


Introduction
Since the birth of the stock and the futures markets, people have been looking for a scientific method to effectively predict the stock index or term index ,which will help to achieve the purpose of maximizing investment profits, such as avoiding risks by the way of predicting risks [1]. From the perspective of theoretical research, accurate prediction theory is not only a guide for economic decision-making, but also a necessary analysis link for making effective decisions, and more scientific development of capital market is the ultimate goal of analysis and prediction [2]. Therefore, the research on the fitting, simulation and prediction of stock index or term index has a far-reaching impact on the development of investors or disciplines, as well as economic prosperity and social progress. The international capital market operation practice shows that the capital market (i.e., the stock market as a special case) in the daily pay most of time series presents the normality and thick tail characteristics, and have volatility clustering and persistence (i.e. if the current market is volatile, the next issue of fluctuation will be big, and it will vary with the degree of deviation from the mean current yields more or less. Conversely, if the volatility of one period is low, the volatility of the next period will be low, unless the current yield is significantly off the average.) Based on the properties of stock markets, SVM algorithm can be a effective way to predict the changes of stock index, which is widely used in prediction and classification problem. Therefore, it's applied herein to predict the changes of Shanghai Composite Index.

Methodology of Supported Vector Machine
Support vector machine [3] is a commonly used classification model. The core idea is to carry out nonlinear transformation of input data through kernel function, map it to a high-dimensional feature 2 space to make these data linearly separable, and then find out the best hyperplane(as shown in Fig.1) to achieve classification, in which the selection of kernel function is the key to SVM classification.

Fig.1 Hyperplane of SVM
The SVM classifier construction process in this paper is shown as follows: Step 1: Construction of the optimal hyperplane Assume the data after preprocessing as{( , … , ( , where is the input and is the output. Then the hyperplane can be constructed by Equation (1) (1) Where denotes slack variables. The goal of the classifier is to find an optimal hyperplane with the lowest classification error rate [4], and the following optimization problems can be constructed as Equaiton (2): Where is the penalty coefficient.
Step 2: Selection of kernel function The selection of kernel function has a great impact on the performance of SVM classifier. Considering that the data complexity in this paper is moderate, radial basis function (RBF kernel function) is selected in this paper. Compared with other kernel functions, it has fewer parameters, lower complexity and less numerical computation, and it can be expressed as Equation (3): Where denotes the effective range of RBF .
Step 3: Model Training and test Input the training data and test data, adjust the parameters in SVM, and then obtain the final model.

Data processing
The data of Shanghai Composite Index from December, 1990 to August,2009 is used in this paper. Assume that Assume that the opening index of Shanghai Composite Index is correlative to the opening index of yesterday, the highest index, the lowest index is the lowest, the closed index, the trade index and trading volume. And the six indicators are determined to be the input variables while the opening index is the output variables. And 80% of data is used for training data while 20% is used for test data. The first step is to normalize the data, which can guarantee the accuracy of prediction model and Zscores method [5] is employed herein, which can be expressed as Equation (4): Where is the original data; is the mean value of the original data; is the variance of the original data. After normalization, the data is shown in Fig.2.It can be seen that the tendency of data has no changes while narrow the range to [0,2].

Model Solution via MATLAB
The process of SVM modeling for prediction can be shown in Fig.3.Then the SVM model is established via MATLAB 2018a software, and after 541 iterations, the best SVM model was obtained. The optimal parameters for SVM and corresponding error is shown in Fig.4.   Fig.3 Process of SVM prediction model  Fig.4. The optimal parameters for SVM and corresponding error

Error Test
The error analysis is carried out to test the accuracy of SVM prediction model. The mean square error (MSE) and R 2 are employed herein to evaluate the performance of SVM model in accuracy [6]. They can be calculated by Equation (5) and (6): Where is the real value ; is the predicted value; is the number of samples, The results are shown in Table.1, Fig.5 shows the error changes with time series and Fig.6 compares the predicted and the true value. It is obvious that the prediction model fits well with the true data, which indicates the predicition model has high accuracy and is reliable for practical application.

Conclusion
To evaluate the tendency of Shanghai Composite Index by historical data, SVM model was established in this study and the results of error test shows R 2 is 0.9992 and MSE is 2.35705×10 -05 .Therefore, the prediction model has proved to be effective and practical.