#### Abstract

In view of the applications of artificial neural networks in economic and financial forecasting, a stochastic time strength function is introduced in the backpropagation neural network model to predict the fluctuations of stock price changes. In this model, stochastic time strength function gives a weight for each historical datum and makes the model have the effect of random movement, and then we investigate and forecast the behavior of volatility degrees of returns for the Chinese stock market indexes and some global market indexes. The empirical research is performed in testing the prediction effect of SSE, SZSE, HSI, DJIA, IXIC, and S&P 500 with different selected volatility degrees in the established model.

#### 1. Introduction

Financial analysis of fluctuations of financial market is an active topic in economic research, with applications to the prediction of interest rates, foreign currency risk, stock market volatility, and so forth [1–8]. With the progress of globalized security markets, forecasting stock market volatility has become a significant financial subject, which attracts much increasing attention [9–11]. A key element of financial planning and financial forecasting is the ability to construct models showing the interrelatedness of financial data. Models showing correlation or causation between variables can be employed to improve financial decision making. The popular model of financial time series analysis is the artificial neural network (ANN), which is composed of artificial neurons or nodes. ANN is nonlinear statistical data modeling or decision making method; it can be used to model complex relationships between inputs and outputs or to find patterns in data. Generally, stock price changes can be regarded as a random time sequence with noise and artificial neural network and as a nonparametric method with large-scale processing elements operating in parallel that depend on their own intrinsic link data and can forecast future behaviors by learning the pattern of market variables without any strict theoretical assumption. ANN possesses data-driven, self-learning, and self-adaptive abilities and has strong antijamming capabilities. ANN has been widely used in the financial fields such as prediction of stock or option price, exchange rate, and risk analysis [12–19].

In the real markets, the noise of financial time series is usually caused by large volatilities, and it is hard to reflect the market variables directly into the model without any assumptions. Therefore, making accurate forecast is a challenging task due to the inherently noisy and nonstationary nature of stock price. To improve predicting precision, various network architectures and learning algorithms have been developed in the literature [20–24]. Multilayer perceptron (MLP) is one of the most prevalent neural networks, which has the capability of complex mapping between inputs and outputs that makes it possible to approximate nonlinear function [25–28]. The present work applies MLP with a backpropagation algorithm and stochastic time strength function to develop a stock price volatility forecasting model; a stochastic time strength neural network (STNN) and the corresponding learning algorithm are presented. The motivation of modeling the STNN is that the data in the data training set should be time variant, reflecting the different behavior patterns of the markets at different times; if all the data are used to train the network equivalently, the network system may not be consistent with the evolvement of the stock markets. It is difficult to use the historical data of the past to reflect the current stock markets; however, if only the recent data are selected, a lot of useful information, which the early data hold, will be lost. From this consideration, the historical data are given weights depending on their time, and the Brownian motion is introduced in the time strength function in order to make the model have the effect of random movement while maintaining the original trend. In the present paper, we perform the empirical research focusing on the volatility degree’s behaviors of stock returns, and a threshold value is introduced to correspond to the volatility degree. For different threshold values, the volatility degree forecasting is made by STNN model. The empirical data are selected from the global stock indexes, including Shanghai Stock Exchange (SSE) Composite Index, Shenzhen Stock Exchange (SZSE) Component Index, Hong Kong Hang Seng Index (HSI), Dow Jones Industrial Average Index (DJIA), Nasdaq Composite Index (IXIC), Standard & Poor’s 500 Index (S&P 500), and Japan Nikkei 225 Index (N225).

#### 2. Methodology for STNN Model

The structure of ANN plays an important role in its performance. In Figure 1, we introduce a three-layer multi-input neural network, in which a stochastic time strength function is applied to minimize the error between the network’s prediction and the actual target. The architecture consists of a hidden layer of neurons with nonlinear activation functions and an output layer of neurons with linear activation functions. represents the input variable at time ; represents the output of hidden layer neurons at time ; and represents the output of the network at time . is the weight that connects the node in the input layer neurons to the node in the hidden layer. is the weight that connects the node in the hidden layer neurons to the node in the output layer. Hidden layer stage is as follows. The input of all neurons in the hidden layer is calculated by the following equation: The output of hidden neuron is given by where is the threshold of neuron in hidden layer. The sigmoid function in hidden layer is selected as the activation function: . Output stage: the output of STNN is given as follows: where is the threshold of neuron in output layer and is an identity map as the activation function.

The backpropagation algorithm has emerged as one of the most widely used learning procedures for multilayer networks [7, 29, 30]. That is a supervised learning algorithm which minimizes the global error by using the gradient descent method. For the STNN model, we assume that the error of the output is given by and the error of the sample is defined as where is the time of the sample , is the actual value, is the output at time , and is the stochastic time strength function which endows each historical data with a weight depending on the time at which it occurs. We define as follows where is the time strength coefficient, is the time of the newest data in the data training set, and is an arbitrary time in the data training set. is the drift function, is the volatility function, and is the standard Brownian motion. A Brownian motion is a real valued, continuous stochastic process , on a probability space with independent and stationary increments, such that is a normal random variable with mean and variance , where and are constant real numbers. A Brownian motion is standard (we denote it by ) if -a.s., , and , and the corresponding probability density function is given by . The above stochastic time strength function implies that the impact of the historical data on the stock market is a time variable function. Then, the corresponding global error of data training set at th training iterations is defined as

The training objective of STNN is to update the network weights so as to minimize the global error in the data training set. The training algorithm procedure of STNN is described as follows. Step 1 is performing input data normalization. In STNN model, we choose four kinds of stock prices as the input values in the input layer: daily opening price, daily highest price, daily lowest price, and daily closing price. The output layer is the closing price of the next trading day. Step 2 is determining the network structure which is three-layer network model, parameters including learning rate which is between and , the maximum training iterations number , and initial connective weights. At the beginning of data processing, sets and follow the uniform distribution on , and let the neural thresholds and be 0. Step 3 is introducing the stochastic time strength function in sample error and the global error , choosing the drift function and the volatility function , and determining the activation functions and . Step 4 is setting a predefined minimum training threshold . Based on network training objective , if is below the , go to Step 6; otherwise, go to Step 5. Step 5 is updating the STNN connective weights and applying the error to compute the gradient of the weights , and the gradient of the weights , . For the weight nodes in the input layer, the gradient of the connective weight is given by and for the weight nodes in the hidden layer, the gradient of the connective weight is given by where is the learning rate and is the derivative of the activation function. So the update rule for the weight and is given by Step 6: until the global error satisfies the predefined minimum training threshold or training times reach the maximum iterations number, output the predictive value .

#### 3. Data Selection

##### 3.1. Statistical Behaviors of Price Changes and Volatilities

Study of the behaviors of stock price changes and volatilities has long been a focus in economic research. Recent empirical research shows that returns on financial markets are not Gaussian but exhibit excess kurtosis and fatter tails than the normal distribution, which is usually called the “fat-tail” phenomenon [31–33]. Higher kurtosis, which means more of the variance, is due to infrequent extreme deviations rather than frequent modestly sized deviations, indicating that the distribution is more “peaked.” The power-law distribution is an efficient way to study the fat-tail phenomenon. It is a universal property that emerged from complex physics systems and is also observed in economic and financial systems. The empirical evidence has shown that the distribution of logarithmic returns follows the power-law fluctuations () [34–36]; the formula of the stock logarithmic return [37, 38] from to is as follows: where denotes the stock daily closing price at time . In Figure 2, we investigate the behaviors of probability density distributions and power-law distributions of daily returns for SSE, SZSE, HSI, DJIA, IXIC, S&P 500, and N225 in the 21-year period from April 1991 to February 2012, and the corresponding Gaussian distributions are also presented for comparison. Figure 2(a) exhibits that the peak distributions of returns are obvious and that the fat-tail phenomena are also visible. Figure 2(b) shows that the power-law tails of SSE, SZSE, and HSI decay slower than those of IXIC, N225, S&P 500, and DJIA. Besides, all the indexes’ power-law tails decay slower than those of Gaussian distribution. This result illustrates that the fat-tail phenomenon in Chinese financial markets is more obvious than other financial markets of the world. We also study the SSE power-law tail with liner fitting in Figure 2(b) and obtain that (which is smaller than ); this reveals that Chinese financial markets have more severe volatilities than other stock markets of the world.

**(a)**

**(b)**

##### 3.2. Data Selecting and Processing

Financial market volatility is central to the theory and practice of asset allocation, asset pricing, risk management, and stock return volatility forecasting in the literature [11, 39, 40]. In the present paper, we introduce a threshold value to correspond to the volatility degrees and regard their corresponding index prices as STNN model’s dataset. We use the data samples with a volatility degree range to train the STNN model, and the output will be almost in the same range, providing a new approach to forecast the different volatility degrees. The procedure of STNN model datasets selection is described as follows. (i) Select the stock returns whose absolute returns are greater than a threshold value ; let denote this corresponding return set which is given by ; see Figure 3. (ii) For a fixed threshold value , we determine the corresponding stock trading dates in return set ; that is to say, we determine values that satisfy , . In order to reflect the volatility of prices, considering that the return series is decided by the daily closing price values on th and th trading days (see the formula of in Section 3.1), we should select the price values at time as the input variables. The new dates series is also arranged in a chronological order. (iii) Select the daily opening prices, the daily highest prices, the daily lowest prices, and the daily closing prices in those dates that were filtered according to Step 2 as the four input variables. A trading date corresponds to a group of input variables, and the output variable is the daily closing price in the next group of variables. The dataset is divided into two parts, the training set and the testing set. We collect the data in the training set from January 2001 to December 2010 and the data in the testing set from January 2011 to February 2012. In the pretreatment and preprocessing stage, the collected data should be normalized and properly adjusted, in order to reduce the impact of noise in the stock markets; the normalized values of the above-mentioned four kinds of price data can be given as follows: In Table 1, the measures of training and test samples for indexes SSE, SZSE, HSI, DJIA, IXIC and S&P 500 are performed for different values of . The value is the mean of daily absolute returns of SSE from January 2001 to February 2012 for 2692 trading days, and the mean values of daily absolute returns for SZSE, HSI, DJIA, IXIC, and S&P 500 are , , , , and , respectively. Since the objective of this work is the volatility degree forecasting, we choose some different volatility degrees for the forecasting analysis. Here, we take the mean of absolute returns of SSE as , and the next five values (from to ) are all larger than the former. Then, we can compare the errors of the prediction when values gradually increase. In order to consider the large volatility prediction effect of STNN model, we take and into account. For the volatility degrees from to , here we take values from to as examples in Table 1. For other different values of , the corresponding volatility degree forecasting can be made similarly. Table 1 and Figure 3 show that the numbers of absolute returns that exceed or larger are few. Since and belong to large volatilities in the stock market, the events whose absolute returns exceed or do not happen frequently. From Table 1, the quantity of data samples gradually reduces with the increase of value . When ranges from to , the corresponding numbers descend slowly. However, for and , the numbers of the data decrease sharply because of large volatilities of returns’ relatively rare appearing in the real markets.

#### 4. Forecasting Analysis

##### 4.1. Parameters Determining of STNN Model

In the STNN model, the proper number of the hidden layer nodes requires validation techniques to avoid underfitting (too few neurons) and overfitting (too many neurons). According to the procedures of the three-layer network introduced in Section 2, we chose the neural network structure in which the number of neural nodes in the input layer is , the number of neural nodes in the hidden layer is , the number of neural nodes in the output layer is , the maximum training iterations number , , and the predefined minimum training threshold . When using STNN model to predict the daily closing price of stock index, we assume (the drift function) and (the volatility function) are as follows: where is the parameter which is equal to the number of sample in the datasets, , and is the mean of the sample data. Then the stochastic time strength function is given by (see Section 2)

To evaluate the forecasting performance of the STNN model, we use the following error evaluation criteria, absolute error (AE), relative error (RE), and mean absolute error (MAE), root mean-square error (RMSE), mean absolute percentage error (MAPE). These measures are defined as follows: where and are the actual and prediction values at time , respectively, and is the sample size. Noting that AE, RE, MAE, RMSE, and MAPE are measures of the deviation between prediction and actual values, the prediction performance is better when the values of these evaluation criteria are smaller. However, if the results are not consistent among these criteria, we choose the MAPE as the benchmark since MAPE is relatively more stable than other criteria [41].

##### 4.2. Forecasting Results

In Section 3, the method of selecting datasets of STNN model is put forward, and the database is presented. For the different values of , the training and testing datasets including the quantity and corresponding prices date of sample are various. Next, we predict the fluctuation behaviors of stock prices by the proposed model with different threshold values of . (1) For , the selected datasets are the original daily price series. Forecasting results of SSE and S&P 500 by STNN are displayed in Figures 4 and 5, respectively.

Figures 4 and 5 exhibit that the predictive values by STNN model and the actual values are close, and the relative errors are almost below . Compared with traditional backpropagation neural network (BPNN), the forecasting results are presented in Table 2, where the MAPE(100) stands for the latest 100 days of MAPE in the testing data. Table 2 shows that the evaluation criteria by STNN model are almost smaller than those by BPNN. Besides, the values of MAPE(100) are smaller than those of MAPE in all stock indexes. Therefore, the short-term prediction outperforms the long-term prediction. In order to comparatively study the effect of fluctuation prediction for the STNN model and the BPNN model, we perform the paired-sample -test and the nonparametric Wilcoxon signed rank test on two absolute AE value vectors of STNN and BPNN models (see Section 4.1). The corresponding statistical test results of six indexes are presented in Table 3. For indexes SZSE, HSI, DJIA, IXIC, and S&P 500, the values of double-tailed test in two test methods approach , much smaller than the significance level , and the values of are all . Thus, the null hypothesis is rejected that the predicted errors of STNN and BPNN models have significant difference. Besides, in Table 2, the error evaluation criteria MAE, RMSE, and MAPE by STNN are all smaller than those by BPNN for the above indexes. This shows that the effect of price fluctuation forecasting of STNN model is superior to that of BPNN model for these five indexes. Only for SSE index, the values of in two test methods are and the values of double-tailed test are larger than . Thus, the null hypothesis is accepted that the predicted errors by STNN and BPNN models have no significant difference for SSE index.

(2) Let range from (the mean of absolute returns of SSE from January 2001 to February 2012) to . The experiment analysis of the prediction is performed by STNN for indexes SSE, SZSE, HSI, DJIA, IXIC, and S&P 500. Figures 6 and 7 show the volatility degree forecasting of SSE and S&P 500 by STNN model with different values of , and they illustrate the effectiveness of the corresponding forecasting. When is small, such as in Figure 6(a) and in Figure 6(b), the better performance of volatility prediction is revealed by the empirical results; that is, the predictive values and the actual values in Figures 6(a) and 6(b) are closer than those in Figures 6(c) and 6(d). Similar results are also indicated in Figure 7.

**(a)**

**(b)**

**(c)**

**(d)**

**(a)**

**(b)**

**(c)**

**(d)**

In order to comparatively investigate the volatility degree forecasting results for the other stock indexes more clearly, we present the same forecasting for SZSE, HSI, DJIA, and IXIC. Table 4 shows the prediction performance by STNN model. The MAPE of the prediction becomes gradually larger with the increasing of , and the experiment results exhibit that the volatility degree forecasting by STNN model is feasible.

##### 4.3. Further Evaluation of Forecasting Performance

To further evaluate the forecasting performance, we employ three statistical analysis methods including directional symmetry (DS), correct up (CP) trend, and correct down (CD) trend [42]. CP and CD provide the correctness of predicted up trend and predicted down trend indexes in terms of percentage, respectively. The forecasting of change direction will be more precise when the values of three statistical metrics become larger. The definitions of the three statistical methods are given as follows: where is the number of training (testing) samples; where is the number of training (testing) samples for ; where is the number of training (testing) samples for .

Table 5 gives the numerical forecasting results for SSE, SZSE, HSI, DJIA, IXIC, and S&P 500. All the stock indexes change a little when varies from to . The direction forecasting effect of IXIC index is the best from to since the values of DS, CP, and CD all exceed . When , some criteria change sharply; for example, for SSE index, the values of DS and CP decrease from and (for ) to and (for ), respectively. The value of CD of S&P 500 increases, but its value of CP reduces when varies from to , and HSI index has the adverse result. From Table 5, we can conclude that the direction forecasting by STNN model has little difference when is small but may cause obvious changes when is large.

#### 5. Conclusion

In the present paper, we develop a neural network with the stochastic time strength function to forecast the volatility degrees of stock market indexes. The effectiveness of STNN model has been analyzed by performing the numerical experiments on the price data of SSE, SZSE, HSI, DJIA, IXIC, and S&P 500. We also investigate the statistical behaviors of the tail distributions (or volatilities) for SSE, SZSE, and other global indexes by comparison, revealing that the Chinese financial markets have more severe fluctuations than other stock markets of the world. We select different volatility degrees for different threshold values of , and the corresponding training and testing databases are introduced. The empirical research of this work indicates that some prediction results have been improved by STNN model, and the forecasting effect will decline as becomes larger. We hope this new approach can make some contributions to financial market volatility forecasting.

#### Acknowledgment

The authors were supported in part by the National Natural Science Foundation of China Grant no. 71271026 and Grant no. 10971010.