Professional Documents
Culture Documents
Abstract: Stock price index is a barometer of the national economy, which often shows strong nonlinearity because of
various factors. It is necessary to use nonlinear models to improve the accuracy of prediction. We predict Shanghai
Securities Composition stock index with ARIMA-BP neural network method, and compare the accuracy with the result
of single ARIMA model and BP neural network method. We find that the prediction accuracy of ARIMA-BP neural
network is better than the BP neural network, BP neural network is better than linear model ARIMA, which confirms the
change of stock price index is nonlinear.
Key Words: BP neural network; Shanghai Securities Composition stock index; ARIMA-BP; Foresting
978-1-5386-1243-9/18/$31.00 2018
c IEEE 2854
(3) Determining the parameters of the model and testing
the regression model
P and q are the key parameters in ARMA (p, q)
model.According to the AR (p), MA (q) model, we can use
the autocorrelation and partial autocorrelation function to
estimate p and q values of the stock price index by
comparing the minimum information criterion (AIC) and
consistency criterion (SC) to determine the optimal number
of model order. At the same time, the coefficient, equation Input layer Hidden layer Output layer
and residual error of the model should be tested. Figure 1 The structure of BP neural network
(4)Prediction through the model X 1 , X 2 , " , X n is the BP neural network input value,
After the model is determined, the data outside the
sample are extrapolated and predicted.There are two kinds Y1 , Y2 , ", Yn is to predict the value of the BP neural network,
of prediction methods: dynamic prediction and static ωij , ω jk are the weights of the neural network. BP neural
prediction. Dynamic prediction is based on the data of the
network can be regarded as a nonlinear function, the
first observation value, so the prediction is not very accurate.
network input and output respectively the function of the
Generally, it uses the static prediction method, which can
independent and dependent variables, as the network input
get better prediction by using the real value of the original
nodes and output nodes are respectively n, m, which reflects
time series.
a variable from the n to m because of the mapping function
2.2 Nonlinear model :BP neural network variables in BP neural network.
2.3 ARIMA-BP neural network method
In ARIMA model, we assume that the stock price
index follows a linear system. However, the stock price The ARIMA-BP model is the synthesis of two kinds of
index is nonlinear and time-varying. Therefore, the models, which regard the residuals of the ARIMA model as
prediction result of ARIMA is not ideal. A single prediction the input parameters of the BP neural network model, then
model can only reflect the stock price index segment pulsing them together to get the final result, the result will be
information, it is difficult to fully change the stock price more accurate than the single ARIMA model and the BP
data mining rules hidden in the prediction results and the neural network model result.
requirements of investors, investors have a certain gap,
combination model to great extent to the comprehensive use 3 DATA AND EMPIRICAL ANALYSIS
of various models to provide information as much as
possible to improve the prediction accuracy, especially in 3.1 Data
the economic, management and statistical research and all We select Shanghai securities composition index
kinds of combination forecasting method has been represent the stock price index, we choose the closing price
improved and an important way to improve the forecast data from January 3, 2017 to December 22, 2017. A total of
accuracy. 240 data samples were collected, of which the first 200 data
BP (Back Propagation) network is a multilayer feed were used as training set to model stock closing price index.
forward neural network, the network training, adjust the To avoid the chance of single sample prediction, the last 40
training algorithm right threshold follows the error samples are used as test sets tocheck the prediction ability
back-propagation method. Usually the BP neural network of the model. The closing price of Shanghai securities
has 3 layers or 3 layers these neurons, including input layer, composite index is shown in the figure 2.
hidden layer and output layer, realize the connection 3,500
between the upper and lower layer, and the same neuron
connection. The input layer neurons and neurons in the 3,400
The 30th Chinese Control and Decision Conference (2018 CCDC) 2855
we can get p through the partial autocorrelation coefficient be choosen from ARIMA˄1,1,1˅,ARIMA˄2,1,1˅ARIMA
of the series; q is the number of order moving average, ˄1,1,2˅.Finally we choose model by comparing their
which can be obtained through the auto regression function; values of the SC and BIC criteria.
d is the order of a single integration , obtained from the unit Table 2 The BIC and SC criteria value of models
root test. Three parameters in the ARIMA model and other
models is obtained from EViews9 and Matlab2014. BIC SC
3.2.1 Unit root test
ARIMA(1ˈ1ˈ1) -5.346911 -5.323679
We use ADF to test the series of Shanghai composite
index(SH) and its first difference , we get the following ARIMA(2ˈ1ˈ1) -5.367165 -5.357804
results: ARIMA(1ˈ1ˈ2) -5.358152 -5.336381
Table 1 The results of unit root test
From the results, we see that the SC and BIC values of
Time series Statistic p-Value Critical Value
ARIMA(2,1,1) model are the smallest. Therefore ARIMA
SH -2.48 0.1169 -3.99293˄1%˅ (2, 1, 1) model is the best model. We choose this model to
First predict the out of sample data.
-15.8*** 0.0001 -3.13293˄10%˅ 3.2.3 Out of sample prediction
difference
From the table ,we see that the Shanghai composite We will use ARIMA (2, 1, 1) to predict the out of
index is not stable, but the first order difference becomes sample data of Shanghai composite index using one step
stable, the Shanghai index is I(1), so the parameter d=1. prediction . The first I moments of the stock price, using the
3.2.2 Auto correlation function and partial I - 1 data as learning samples in the model training, the
autocorrelation function diagram follow-up data shall not participate in the training in the
According to the theory of time series, the partial prediction modeling. The prediction results of the ARIMA
autocorrelation coefficient of AR (p) mode truncated at p model are shown in Figure 5. From Figure 5, we can see that
order; autocorrelation coefficient of MA (q) truncated at q the prediction accuracy of ARIMA model to stock price
Order. So we can get p and q values from the partial index is not high, but we can grasp the trend of stock price
correlation and autocorrelation function image.The well, that is, we get the linear part information of stock price
Shanghai composite index and partial autocorrelation index.
autocorrelation function the number of images are as
follows:
2856 The 30th Chinese Control and Decision Conference (2018 CCDC)
3.4 Prediction based on ARIMA-BP neural network the model, the BP neural network model results the result is
model better than the ARIMA model, the stock price index has
According to ARIMA (2, 1, 1) the prediction results ,the obvious non-linear characteristics. The comparison results
actual stock price index is worth to the residual sequence of show that ARIMA-BP has made full use of the advantages
stock price index. We use it as the desired output of the BP of ARIMA and BP neural network to achieve
neural network, then reconstruce the original data of the complementary advantages, overcome both defects, and
phase space for the optimal order of the reconstructed data comprehensively depict the change rule of stock price index.
as BP input. We then train the input to the BP neural ARIMA-BP neural network model is an effective prediction
network for learning modeling, and the residual sequence method of stock price index.
test set was predicted by ARIMA (2,1, 1) residual sequence
prediction. At the same time, the prediction results of
ARIMA (2, 1, 1) and BP neural network model are added to 4 CONCLUSIONS
get the final prediction result of the stock price index. The
prediction results are shown in Figure 7. Because there are more and more uncertainty in financial
market, it is hard to use a single model to predict stock price
index. We predict Shanghai stock index with ARIMA-BP
neural network method, and compare the accuracy with the
result of ARIMA model and BP neural network method
along. We find that the prediction accuracy of ARIMA-BP
neural network is better than the BP neural network, BP
neural network is better than linear model ARIMA, which
confirms the change of stock price index is nonlinear.
REFERENCES
[1]Albanis George,Batchelor Roy.Five classification
algorithm to predict high performance stocks[M] .Kluw er
Figure 7 The prediction result of ARIMA-BP neural
AcademicPublishers, 2000(3): 1-30.
network
[2]Bhattacharya A, Abraham A, Grosan C, et al.
Meta-Learning Evolutionary Artificial Neural Network for
3.5 Comparison of the three models
Selecting Flexible Manufacturing Systems[C] Advances in
In order to verify the predictive ability of the three
Neural Networks - Isnn 2006, Third International
models, we measure the predictive effect of the three models
Symposium on Neural Networks, Chengdu, Proceedings.
by means of the root mean square error and the relative
DBLP, 2006:891-897.
mean error. The mean square error is the expected value of
[3]Guresen E, Kayakutlu G, Daim T U. Using artificial
the square of the difference between the parameter
neural network models in stock market index prediction[J].
estimation and the true value of the parameter ( Root Mean
Expert Systems with Applications,
Squared Error, RMSE).
2011,38(8):10389-10397.
1 [4]Jensen H L Using neural networks for credit scoring[J]
RM SE = ¦ (yˆ i − y i ) 2 Managerial Finance,1992,(6):15-26.
n i
[5]Majhi R, Panda G, Sahoo G, etal. Stock market
The mean relative error is better to reflect the actual
prediction of S&P 500 and DJIA using Bacterial Foraging
situation of the prediction error because it has no
Optimization Technique[C] Evolutionary Computation,
dimensional influence, it is a percentage easy to make
IEEE, 2007:2569-2575.
comparison.
[6]Qiu M, Song Y, Akagi F. Application of artificial neural
network for the prediction of stock market returns: The case
1 ŷ i − y i 2 of the Japanese stock market[J]. Chaos Solitons & Fractals
MRE = ¦( ) the Interdisciplinary Journal of Nonlinear Science &
n i yi
Nonequilibrium & Complex Phenomena, 2016,
Table 3 The MRE and RMSE of three models 85(September):1-7
Method MRE RMSE [7]Rather, Agarwal , Sastry. Recurrent neural network and
ARIMA 7.45% 89.21 a hybrid model for prediction of stock returns. Expert
BP 5.61% 65.73 Systems with Applications[J] , 2015 , 42 (6) :3234-3241.
ARIMA-BP 1.03% 18.02 [8]Vanstone BˈFinnie G.An empirical methodology for
From the result of the model , RMSE and MRE results developing stock market trading systems using artificial
of ARIMA-BP is the smallest among the three kinds of neural networks[J].Expert Systems with
models, the results of the BP model is in the middle, the Applications,2009,36(3):6668-6680.
worst is the results of ARIMA, so ARIMA-BP's stock price
prediction accuracy is much higher than that of single
ARIMA and BP neural network, the prediction accuracy of
The 30th Chinese Control and Decision Conference (2018 CCDC) 2857