^{1}

^{1}

^{*}

To improve the accuracy of forecasting stock prices, a new method is proposed, which based on improved Wavelet Neural Network (WNN). Firstly, the Genetic Algorithm (GA) is used to optimize initial weights, stretching parameters and movement parameters. Then, comparing with traditional WNN, the momentum are added in parameters adjusting and learning of network, what’s more, learning rate and the factor of momentum are self-adaptive. The prediction system is tested using Shanghai Index data, simulation result shows that improved WNN performs very well.

The stock prices are time series data with multiple variables, there are non-linear, time-varying and uncertain relationship, and have always been a challenge to both economists and researchers [

A variety of models have been established to predict the stock prices by observing the law of data, such as Autoregressive Integrated Moving Average Model (ARIMA) [

Aiming at the shortcomings of WNN, the paper proposes the stocks market modeling and forecasting by using improved WNN. In parameters adjusting and learning of network, momentum items are added, in the same time, learning rate and the factor of momentum are self-adaptive and the form of decreasing factor of learning rate is connected with forecasting error. Using improved WNN to predict Shanghai Stock market, it shows that im- proved WNN is superior to WNN.

WNN is neural network model composed by wavelet function as its activation function. Structural diagram of three-layer wavelet neural network is shown in

the output of network as follows,

nodes is

The correction of parameters such as weights, movement parameters and stretching parameters as follows,

In the formulas,

pected output,

As the learning rate is constant, if there is large, the training may over convergence, in the same time WNN training method usually include the stochastic gradient algorithm and declined gradient, those only consider the nth while ignoring the previous direction of n times, which make training trapped into local minima. In order to overcome the shortcomings in the correcting, we propose the formulas of correction as follows,

where,

In the formulas,

Step 1. Considering when the initial parameters is not suitably selected, the WNN training will slow or even diverging [

Step 2. Setting initial learning rate

Step 3. Dividing sample into training sample and test sample. Training sample is used to train the network and test sample is used to test the prediction accuracy.

Step 4. Putting test sample as input of network and calculating the error between expected output and actual output.

Step 5. Making output of network is close to expected output, using error to adjust weights, stretching parameters and movement parameters.

Step 6. Judging the algorithm is end or not. If it is not, return Step 3.

Taking Shanghai stock market for example, the chosen time series is the closing index of daily stock price in Shanghai Stock exchange from March 23th, 2012 to November 28th, 2014. This yields a total of 607 data samples, in which, the former 507 data samples are selected as training samples, the later 100 data samples as test samples. To improve the prediction accuracy, the data are normalized, the formula as follows,

where

To stock market, taking into account the fact that there are five trading days a week, a WNN forecast model of one five-dimension input data [

The paper use root mean square error (RMSE) and mean absolute percentage error (MAPE) as evaluation standard of network, which are defined as

where n refers to the number of test sample,

Forecasting methods | RMSE | MAPE |
---|---|---|

WNN | 20.9191 | 0.75% |

Improved WNN | 16.7211 | 0.61% |

In this paper, the application of improved wavelet neural network to stock market prediction is studied. Considering that the forecasting accuracy is easy to be affected by initial parameters, which can provide GA to optimize it at first. The forecasting simulation results of Shanghai index data show that the improved WNN method is effective and the stock market model is of good prediction performance.