A novel model by evolving partially connected neural network for stock price trend forecasting

https://doi.org/10.1016/j.eswa.2011.07.051Get rights and content

Abstract

This paper proposes a novel model by evolving partially connected neural networks (EPCNNs) to predict the stock price trend using technical indicators as inputs. The proposed architecture has provided some new features different from the features of artificial neural networks: (1) connection between neurons is random; (2) there can be more than one hidden layer; (3) evolutionary algorithm is employed to improve the learning algorithm and training weights. In order to improve the expressive ability of neural networks, EPCNN utilizes random connection between neurons and more hidden layers to learn the knowledge stored within the historic time series data. The genetically evolved weights mitigate the well-known limitations of gradient descent algorithm. In addition, the activation function is defined using sin(x) function instead of sigmoid function. Three experiments were conducted which are explained as follows. In the first experiment, we compared the predicted value of the trained EPCNN model with the actual value to evaluate the prediction accuracy of the model. Second experiment studied the over fitting problem which occurred in neural network training by taking different number of neurons and layers. The third experiment compared the performance of the proposed EPCNN model with other models like BPN, TSK fuzzy system, multiple regression analysis and showed that EPCNN can provide a very accurate prediction of the stock price index for most of the data. Therefore, it is a very promising tool in forecasting of the financial time series data.

Highlights

► A novel model by evolving partially connected neural networks is developed to predict the stock price trend using technical indicators as inputs. ► EPCNN utilizes random connection between neurons and more hidden layers to learn the knowledge stored within the historic time series data. ► Experimental results show that EPCNN is a very promising tool in forecasting of the financial time series data.

Introduction

Recently, stock price prediction has been a subject of interest for most investors and professional analysts. Nevertheless, mining stock market trend is a challenging task due to its high volatility and noisy environment. Many factors influence the performance of a stock market including political events, general economic conditions, and traders’ expectations. Although, a number of papers are describing the predictability of share prices, the performances of these models developed are still quite limited owing to noise and nonlinearity in stock price prediction.

During the past decades, many researchers have predicted stock market returns using artificial intelligence (AI) approaches. Recently, artificial neural networks (ANNs) combined with other approaches have been applied to this area. Chang, Liu, Lin, Fan, and Ng (2009) had applied neural network, dynamic time windows, and Case Based Reasoning (CBR) to predict stock trading. They concluded that percentage prediction accuracy for stock buying or selling decisions was promising. Two neural network architectures, namely multi-layer perception (MLP) neural networks and generalized regression neural networks have been used to forecast closing price movements of Kuwait stock exchange (Mostafa, 2010). Chang, Liu, Fan, Lin, and Lai (2009) also used ensemble of neural networks and intelligent piecewise linear representation to determine the stock turning points. The results demonstrated that the hybrid system can make a significant and constant amount of profit compared to other approaches. Levenberg–Marquardt BP algorithm (Li & Liu, 2009) has been adopted for stock market prediction in order to avoid local extremities and promote convergence speed. The prediction accuracy of stock rates was different for back-propagation neural network and genetic algorithms based on neural network (Khan et al., 2008, Kim and Han, 2000, Mandziuk and Jaruszewicz, 2007). The experimental results showed that genetically evolving weights mitigated the well-known limitations of the gradient descent algorithm. Kim and Chun (1998) had applied a graded forecasting of multiple discrete values to circumvent yielding only to achieve a bipolar output of probabilistic neural networks (PNNs) (Montana, 1992). For the prediction of stock turning points, a piecewise linear representation method and dynamic time warping system was integrated and back-propagation neural network (BPN) was further used to learn the connection weights (Chang et al., 2008, Chang et al., 2009). The BPN integrated with an improved bacterial chemotaxis optimization (IBCO) was applied to predict various stock indices of S&P 500 (Zhang & Wu, 2009). Trippi and DeSieno (1992) had integrated neural network with conventional rule-based expert system techniques to outperform passive investment in the stock index. GGAP-RBF network was also applied to predict stock prices and achieve good prediction accuracy (Wang, Huang, Saratchandran, & Sundararajan, 2005).

Many researchers have used time series to study stock market (Amihud et al., 2010, Gong and Sun, 2009, Jiang et al., 2009, Wang et al., 2010). A new approach based on logistic regression model predicted the stock price trend of next month by using the stock prices of current month (Gong & Sun, 2009). This approach achieved a minimum prediction accuracy of 83% which is unsatisfactory. Markov chain concept was also incorporated into fuzzy stochastic prediction of stock indexes to attain better performances and confidence (Wang et al., 2010). Predictive regressions with order-p autoregressive predictors were used to predict quarterly stock returns by dividend yield which is apparently AR(2) (Amihud et al., 2010).

Other approaches such as hybrid method, rough set; Fuzzy Rule Based System, etc. are used to study the stock index. Hybrid classification which includes probabilistic neural network, rough set and C4.5 was applied by Cheng, Chen, and Lin (2010) to create a model with better predictive power in terms of stock market timing analysis. Cheng, Chen, and Wei (2010) applied a hybrid model based on rough sets theory, genetic algorithms and multi-technical indicators to forecast stock price trends. Zhang, Sai, and Yuan (2008) combined rough set with support vector machine (a hybrid prediction model) to explore the future tendencies of stock index. A Takagi–Sugeno–Kang (TSK) type Fuzzy Rule Based System (Chang & Liu, 2008) was developed to predict the stock prices. A random level shift model (Lu & Perron, 2010) was applied to the logarithm of daily absolute returns for stock market return indices to forecast the stock return volatility. For the same time series stock, multivariate adaptive regression splines (MARS) was used to predict stock price and the performance of MARS, BPN and SVR was compared (Lu, Chang, Chen, Chiu, & Lee, 2009).

From the above mentioned papers, many kinds of neural networks have been applied to predict stock market tendencies but they have many flaws. When there are many numbers of neurons and many numbers of layers, the neural networks are over-fitting. The purpose of this paper is to propose a novel approach of partially connected neural model (Canning and Gardner, 1988, Garis, 2008, Hubert, 1993) to improve expressive ability and predictive percentage. This research will apply EPCNN for training historic stock data and test data. There can be more than one hidden layers, so the additional hidden knowledge stored within the historic time series data are utilized to improve the expressive ability of network. As gradient descents, the algorithm searches the local solution. The genetically evolved weights mitigate limitations of gradient descent algorithm and search the global solution (Kim & Han, 2000). EPCNN consists of six steps: (1) provide number of neurons and layers; (2) normalize input variables; (3) initialize weights and make sure that the neurons are connected; (4) calculate the output value by inputting variables into the network; (5) search optimal or near-optimal connection weights by GA; (6) store optimized weights. The input and output of neural network is technical indexes and stock price index respectively. Finally, financial time series data from S&P 500 is applied to demonstrate the effectiveness of the system.

In addition, the activation function is defined by sin(x) because the range of sin(x) is [−1, 1] and sin(x) is monotonous in the range. Sin(x) and sigmoid function have similar effect on the neural network. The experiment in this paper shows the performance of sin(x) is better than sigmoid function.

The remainder of the paper is organized as follows. Section 2 introduces EPCNN. In Section 3, input variables for the forecasting model are discussed and the implementation of EPCNN is described. In Section 4, the empirical results are summarized and discussed. In Section 5, conclusions are presented.

Section snippets

Evolving partially connected neural networks (EPCNNs)

This section firstly introduces partially connected neural networks and then applies genetic algorithms to further fine-tune the connection weights of the neural network architecture.

Research method

This section firstly states input variables for EPCNN. Traditionally, financial experts have been proposing a set of prediction based on moving average crosses, head and shoulders, range breakout, triangle breakout, etc. In this paper, technical indexes are applied as inputs to EPCNN. Technical indexes are calculated with the help of set of formulas, variation in stock price, and trading volumes. Technical indexes reflect the current tendency of the stock price fluctuations. These indexes can

Research data and experiments

In this section, two different stocks are selected. The selected stocks are Citigroup and Motors Liquidation Company. The historic data is collected form ⧹S&P 500 and covers the financial time-series data from 2008/01/01 to 2009/6/31. The historic data from 2008/01/01 to 2008/12/31 is used for training and the historic data from 2009/01/01 to 2009/06/31 is used for testing. For Citigroup, the size of the training and test data is 254 and 124, respectively. For Motors Liquidation Company the

Conclusions

As mentioned earlier, previous studies tried to optimize the controlling parameters of ANN using local search algorithms whereas this paper combines global search algorithms with a partially connected neural network to forecast stock price index trend. The expressive ability of EPCNN is stronger than back propagation neural network since connection between neurons is probabilistic. Normalization is made to dispose the historical data which includes the technical indexes and stock price. The

References (31)

  • Y.D. Zhang et al.

    Stock market prediction of S&P 500 via combination of improved BCO approach and BP neural network

    Expert Systems with Applications

    (2009)
  • H. Adeli et al.

    Machine learning: Neural networks, genetic algorithms, and fuzzy systems

    (1995)
  • A. Canning et al.

    Partially connected models of neural networks

    Journal of Physics A

    (1988)
  • P.C. Chang et al.

    Integrating a piecewise linear representation method and a neural network model for stock trading points prediction

    IEEE Transactions on Systems, Man and Cybernetics Part C: Applications and Reviews

    (2009)
  • Chang, P. C., Fan, C. Y., Lin, J. L., & Lin, J. J. (2008). Integrating a piecewise linear representation method with...
  • Cited by (87)

    View all citing articles on Scopus
    View full text