Table of Contents Author Guidelines Submit a Manuscript
Journal of Applied Mathematics
Volume 2014, Article ID 614342, 7 pages
http://dx.doi.org/10.1155/2014/614342
Research Article

Comparison of ARIMA and Artificial Neural Networks Models for Stock Price Prediction

1School of Mathematics, Statistics & Computer Science, University of KwaZulu-Natal, Westville, Durban, South Africa
2Department of Computer and Information Sciences, Covenant University, Ota, Nigeria

Received 3 January 2014; Accepted 6 February 2014; Published 5 March 2014

Academic Editor: M. Montaz Ali

Copyright © 2014 Ayodele Ariyo Adebiyi et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract

This paper examines the forecasting performance of ARIMA and artificial neural networks model with published stock data obtained from New York Stock Exchange. The empirical results obtained reveal the superiority of neural networks model over ARIMA model. The findings further resolve and clarify contradictory opinions reported in literature over the superiority of neural networks and ARIMA model and vice versa.

1. Introduction

Several research studies on stock predictions have been conducted with various solution techniques proposed over the years. The prominent techniques fall into two broad categories, namely, statistical and soft computing techniques. Statistical techniques include, among others, exponential smoothing, autoregressive integrated moving average (ARIMA), and generalized autoregressive conditional heteroskedasticity (GARCH) volatility [1]. The ARIMA model, also known as the Box-Jenkins model or methodology, is commonly used in analysis and forecasting. It is widely regarded as the most efficient forecasting technique in social science and is used extensively for time series. The use of ARIMA for forecasting time series is essential with uncertainty as it does not assume knowledge of any underlying model or relationships as in some other methods. ARIMA essentially relies on past values of the series as well as previous error terms for forecasting [2, 3]. However, ARIMA models are relatively more robust and efficient than more complex structural models in relation to short-run forecasting [3].

Artificial neural networks (ANNs) as a soft computing technique are the most accurate and widely used as forecasting models in many areas including social, engineering, economic, business, finance, foreign exchange, and stock problems [48]. Its wide usage is due to the several distinguishing features of ANNs that make them attractive to both researchers and industrial practitioners. As stated in [4], ANNs are data-driven, self-adaptive methods with few prior assumptions. They are also good predictor with the ability to make generalized observations from the results learnt from original data, thereby permitting correct inference of the latent part of the population. Furthermore, ANNs are universal approximator as a network can efficiently approximate a continuous function to the desired level of accuracy. Finally, ANNs have been found to be very efficient in solving nonlinear problems including those in real world [4]. This is in contrast to many traditional techniques for time series predictions, such as ARIMA, which assume that the series are generated from linear processes and as a result might be inappropriate for most real-world problems that are nonlinear [5, 6]. There is growing need to solve highly nonlinear, time-variant problems as many applications such as stock markets are nonlinear with uncertain behaviour that changes with time [7, 8]. ANNs are known to provide competitive results to various traditional time series models such as ARIMA model [4, 911]. In this paper, the performance of ANN and ARIMA models is studied and compared for a case of stock prediction, which also further clarify and/or confirm contradictory opinions reported in literature about superiority of each of the model over one another.

The rest of the paper is organized as follows: Section 2 presents some related works on the comparison of the ARIMA and ANNs model, while the methodology used in this work is presented in Section 3. Section 4 presents and discusses the experimental results obtained in this work, while useful conclusions are provided in Section 5.

2. Related Works

The search for efficient stock price prediction techniques is profound in literature. This is motivated partly by the dynamic nature of the problem as well as the need for better results. Tansel et al. [12] compared the performance of linear optimization, ANNs, and genetic algorithms (GAs) in modelling time series data based on modelling accuracy, convenience, and computational time. The study revealed that linear optimization techniques gave the best estimates with GAs providing similar results if the boundaries of the parameters and the resolution were carefully selected, while NNs gave the worst estimates. The work reported in [13] also compared the forecasting performance of ARIMA and ANN models in forecasting Korean Stock Price Index. The ARIMA model generally provided more accurate forecasts than the back-propagation neural network (BPNN) model used. This is more pronounced for the midrange forecasting horizons. Merh et al. [14] presented a comparison between hybrid approaches of ANN and ARIMA for Indian stock trend forecasting with many instances of the ARIMA predicted values shown to be better than those of the ANNs predicted values in relation to the actual stock value. Sterba and Hilovska [15] argued that ARIMA model and ANN model achieved good prediction performance in many real-world applications especially time series prediction. Experimental results obtained by the authors further revealed that ARIMA model generally performs better in the prediction of linear time series, while ANNs perform better in the prediction of nonlinear time series. In a similar study for financial forecasting reported in [16], ANNs model was shown to perform better than ARIMA model in value forecasting, while ARIMA model performed better than ANNs in directional forecasting.

Yao et al. [17] compared the stock forecasting performance of ANN and ARIMA models and showed that the ANN model obtained better returns than the conventional ARIMA models Similarly, Hansen et al. [18] compared the prediction performance of ANNs and ARIMA on time series prediction to show that the ANNs outperformed ARIMA in predicting stock movement direction as the latter was able to detect hidden patterns in the data used. Prybutok et al. [19] also compared the forecasting performance of ANN and ARIMA model in forecasting daily maximum ozone concentration. Empirical results obtained also showed that the ANN model is superior to the ARIMA model. Wijaya et al. [20] did similar comparison based on the Indonesia stock exchange and got better accuracy with ANN than the ARIMA model. More literature has shown the prevalent use of ANNs as an effective tool for stock price prediction [10, 2129]. This makes ANN a promising technique or potential hybrid for the prediction of movement in time series.

However, literature has shown different view on the relative performance and superiority of ARIMA and ANNs models to time series prediction, especially for different data used; hence the need for further study that can help unified a coherent view on the better methodology. This paper therefore seeks to further clarify contradictory opinions reported in literature on the superiority of ANN model over ARIMA model and vice versa in the effective prediction of stock prices. Results obtained are based on empirical study on time series stock prediction using data from the New York Stock Exchange (NYSE).

3. Methodology

The research methodology used in this study is summarized below. The study used published stock data from NYSE on ARIMA and ANN models developed. EViews software and Matlab Neural Network Tools Box version 7 were used for ARIMA and ANNs models, respectively.

3.1. Input Data

The data used in this research work were historical daily stock prices. The stock data consists of open price, low price, high price, close price, and volume traded. The open price is the opening price of the index (PoI) at the start of the trading day, the low price represents the minimum PoI during the trading day, the high price represents the maximum PoI during the trading day, and the closing price indicates the PoI when the market closes. In this research the closing price is chosen to represent the PoI to be modeled and predicted. This is because the closing price reflects all the activities of the index of the day.

3.2. ARIMA Model Development for Stock Price of Dell Incorporation

This study used the Dell Inc. stock data used that covered the period from August 17, 1988, to February 25, 2011, having a total number of 5680 observations. It was observed that the original pattern of the time series of the index is not stationary. The time series have random walk pattern and vary randomly with no global trend or seasonality pattern observed.

A correlogram is used to determine whether a particular series is stationary or nonstationary. Usually, a stationary time series will give an autocorrelation function (ACF) that decay rapidly from its initial value of unity at zero lag. In the case of nonstationary time series, the ACF dies out gradually over time. The correlogram of the time series of Dell stock index was observed to be nonstationary as the ACF dies down extremely slowly. Differencing is used to make this nonstationary time series become stationary. The value of difference () is determined by the number of times the differencing is performed on the time series.

In order to construct the best ARIMA model for Dell stock index, the autoregressive () and moving average () parameters have to be effectively determined for an effective model. To determine the best model, we set the criteria as follows (also depicted in Table 1): relatively small Bayesian Information Criterion (BIC) and Standard Error of regression (SER), relatively high adjusted . The -statistics and correlogram done showed no significant pattern left in the ACFs and partial autocorrelation functions (PACFs) of the residuals which implies that the residual of the selected model is white noise.

tab1
Table 1: ARIMA (1, 0, 0) estimation output with CLOSE of Dell index.

Table 2 shows the different parameters and in the ARIMA model. ARIMA is considered the best for Dell stock index as shown in Table 1.

tab2
Table 2: Statistical results of different ARIMA parameters for Dell stock index.

In forecasting form, the best model selected can be expressed as follows: where is the difference between the actual value and the forecast value of the series.

3.3. ANN Model Construction for the Dell Stock Index

This study employed a three-layer (one hidden layer) multilayer perceptron model trained with back-propagation algorithm. The ANN model used for the nonlinear data is represented as follows: where and are the connection weights, is the number of input nodes, and is the number hidden nodes. Ten input variables, each grouped into two as inputs for day and day , were supplied into the model. These variables are the opening price , daily high price , daily low price , daily closing price , and trading volume .

The creation of the ANN predictive model with Matlab for the Dell stock index involves the following.(i)Creating the network topology. This involves the selection of the number of input neurons (in this case 10 inputs), the number of hidden layers, the number of hidden neurons in the hidden layer (see Table 3), and the number of output neurons (one, in this case).(ii)Training the network. This involves selecting the network type/training algorithm, in our case feed-forward back-propagation algorithm, inputting the training and target data, selecting the training function (TRAINGDM), selecting the adaptation learning function (LEARNGDM), selecting the performance function (MSE), and selecting the transfer function (TANSIG).The training parameters were set as follows: learning rate = 0.01, momentum term = 0.9, and epoch size = 1000, 2000, 5000. Finally, the network was tested with the data set to estimate its generalization ability.

tab3
Table 3: Statistical performance of ANN model of Dell stock index*.

To determine the best performing model, simulation experiment was run on different ANN model configurations. Both training and testing data were carefully selected. However, the training was not done with test data. The model was trained with 1000, 2000, and 5000 epochs, respectively, while the mean squared error (MSE) for each training session of the different network structure was noted.

Figure 1 is the graph of network training showing the best performance in each of the network structure models in the different training sessions. The network structure that returns the smallest MSE in each of the models was adjudged the best model that can give the best accurate prediction. Similarly, Table 3 presents the outcome of the various training sessions in each of the ANN network structure. It was observed in most cases that the best model was obtained when the network was well trained.

614342.fig.001
Figure 1: Graph of the best result achieved in network training of ANN of Dell index.

4. Experimental Results and Discussion

The tools for simulation of the models are Matlab 2007 and EViews software for ANN model and ARIMA model, respectively. The results obtained are presented in the subsection below.

4.1. Result of ARIMA Model

We experimented with different parameters of autoregressive () and moving average () in order to determine the best model that will give best forecast as indicated in Table 2. ARIMA is considered the best for Dell stock index as shown in Table 1; hence it was selected as the best model based on the criteria listed in the previous section. The actual stock price and predicted values are presented in Table 4, while Figure 2 gives the graph of predicted price against actual stock price to see the performance of the ARIMA model selected. From the predicted values, it was observed that a constant number is added to the subsequent values from the previous value and this accounted for the linear graph of the predicted values in Figure 2. However, the forecast error is quite low and impressive as the predicted values are close to the actual values and move in the direction of the forecast values in many instances as shown in Figure 2, which depicts the correlation of the level of accuracy. The forecast error is determined by

tab4
Table 4: Sample of empirical results of ARIMA (1, 0, 0) of Dell stock index.
614342.fig.002
Figure 2: Graph of actual stock price versus predicted values for Dell stock index using ARIMA.
4.2. Results of ANN Model

After several experiments with different network architectures based on our ANN algorithm, the network structure that returns the smallest MSE was noted to give the best forecasting accuracy with the test data. The MSE recorded in the experiments are presented in Table 3, from where we observed that 10-17-1 (10 input neurons, 17 hidden neurons, and 1 output neuron) is the predictive model with the most accurate daily price prediction. The results presented in Table 5 were the findings from testing period (out of sample test data), while Figure 3 illustrates the correlation of the level accuracy. The forecast error of ANN model is equally low which demonstrated good forecast performance as indicated in Table 5.

tab5
Table 5: Sample results of ANN model for Dell stock index.
614342.fig.003
Figure 3: Graph of ANN model of predicted values against actual values for Dell stock index.
4.3. Comparison of ARIMA and ANN Model

From the empirical results presented in Table 6 and Figure 4, we observed that the forecasting accuracy level of the ANN model compared with that of the ARIMA model is not quite significant. It can be argued that both models achieved good forecast performance judging from the forecast error of both models which are quite low. This finding agrees with the work of [15]. However, the performance of ANN model is better than ARIMA model in terms of forecasting accuracy on many occasions from the test data. Results of Figure 4 show that the ANN model is better than the ARIMA model for stock price prediction. We also observed that the pattern of ARIMA model is directional, which accounted for the linear pattern observed in the graph of Figure 2, while ANN model is toward value forecasting. This finding also agrees with the work of [16]. Statistical test was carried out, which also showed that there is no significant difference between the actual and predicted values of the two models as the values of ANN and ARIMA are 0.439 and 0.604, respectively. Notwithstanding, ANN is still better. Hence, this research work also further clarifies the contrary opinions reported in literature about the superiority of ANN model over ARIMA model in time series prediction.

tab6
Table 6: Sample results of ANN and ARIMA models for Dell stock index.
614342.fig.004
Figure 4: Graph of predicted values of ARIMA and ANN model against actual stock price.

5. Conclusion

The empirical results obtained with published stock data on the performance of ARIMA and ANN model to stock price prediction have been presented in this study. The performance of the ANN predictive model developed in this study was compared with the conventional Box-Jenkins ARIMA model, which has been widely used for time series forecasting. Our findings revealed that both ARIMA model and ANN model can achieve good forecast in application to real-life problems and thus can be effectively engaged profitably for stock price prediction. We also observed that the pattern of ARIMA forecasting models is directional. The developed stock price predictive model with the ANN-based approach demonstrated superior performance over the ARIMA models; indeed, the actual and predicted values of the developed stock price predictive model are quite close. In future studies, hybrid of intelligent techniques similar to that reported in [11, 15, 30] can be engaged to improve existing predictive models with recent stock data and more stock index.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

References

  1. J. J. Wang, J. Z. Wang, Z. G. Zhang, and S. P. Guo, “Stock index forecasting based on a hybrid model,” Omega, vol. 40, no. 6, pp. 758–766, 2012. View at Publisher · View at Google Scholar · View at Scopus
  2. B. G. Tabachnick and L. S. Fidell, Using Multivariate Statistics, Pearson Education, Upper Saddle River, NJ, USA, 4th edition, 2001.
  3. A. Meyler, G. Kenny, and T. Quinn, “Forecasting Irish Inflation Using ARIMA Models,” Technical Paper 3/RT/1998, Central Bank of Ireland Research Department, 1998. View at Google Scholar
  4. M. Khashei and M. Bijari, “An artificial neural network (p, d, q) model for timeseries forecasting,” Expert Systems with Applications, vol. 37, no. 1, pp. 479–489, 2010. View at Publisher · View at Google Scholar · View at Scopus
  5. G. Zhang, B. Patuwo, and M. Y. Hu, “Forecasting with artificial neural networks: the state of the art,” International Journal of Forecasting, vol. 14, no. 1, pp. 35–62, 1998. View at Google Scholar · View at Scopus
  6. M. Khashei, M. Bijari, and G. A. R. Ardali, “Improvement of auto-regressive integrated moving average models using fuzzy logic and artificial neural networks (ANNs),” Neurocomputing, vol. 72, no. 4–6, pp. 956–967, 2009. View at Publisher · View at Google Scholar · View at Scopus
  7. R. Fuller, Neural Fuzzy System, Abo Akademic University, 1995.
  8. E. Khan, “Neural fuzzy based intelligent systems and applications,” in Fusion of Neural Networks, Fuzzy Systems, and Genetic Algorithms Industrial Application, C. J. Lakhmi and N. M. Martin, Eds., The CRC Press International Series on Computational Intelligence, pp. 107–139, CRC Press, New York, NY, USA, 2000. View at Google Scholar
  9. Y. Chen, B. Yang, J. Dong, and A. Abraham, “Time-series forecasting using flexible neural tree model,” Information Sciences, vol. 174, no. 3-4, pp. 219–235, 2005. View at Publisher · View at Google Scholar · View at Scopus
  10. F. Giordano, M. La Rocca, and C. Perna, “Forecasting nonlinear time series with neural network sieve bootstrap,” Computational Statistics and Data Analysis, vol. 51, no. 8, pp. 3871–3884, 2007. View at Publisher · View at Google Scholar · View at Scopus
  11. A. Jain and A. M. Kumar, “Hybrid neural network models for hydrologic time series forecasting,” Applied Soft Computing Journal, vol. 7, no. 2, pp. 585–592, 2007. View at Publisher · View at Google Scholar · View at Scopus
  12. I. N. Tansel, S. Y. Yang, G. Venkataraman, A. Sasirathsiri, W. Y. Bao, and N. Mahendrakar, “Modeling time series data by using neural networks and genetic algorithms,” in Smart Engineering System Design: Neural Networks, Fuzzy Logic, Evolutionary Programming, Data Mining, and Complex Systems: Proceedings of the Intelligent Engineering Systems Through Artificial Neural Networks, C. H. Dagli, A. L. Buczak, J. Ghosh, M. J. Embrechts, and O. Erosy, Eds., vol. 9, pp. 1055–1060, ASME Press, New York, NY, USA, 1999. View at Google Scholar
  13. C. K. Lee, Y. Sehwan, and J. Jongdae, “Neural network model versus SARIMA model in forecasting Korean stock price index (KOSPI),” Issues in Information System, vol. 8, no. 2, pp. 372–378, 2007. View at Google Scholar
  14. N. Merh, V. P. Saxena, and K. R. Pardasani, “A comparison between hybrid approaches of ANN and ARIMA for Indian stock trend forecasting,” Journal of Business Intelligence, vol. 3, no. 2, pp. 23–43, 2010. View at Google Scholar
  15. J. Sterba and K. Hilovska, “The implementation of hybrid ARIMA neural network prediction model for aggregate water consumption prediction,” Aplimat—Journal of Applied Mathematics, vol. 3, no. 3, pp. 123–131, 2010. View at Google Scholar
  16. A. G. Lahane, “Financial forecasting: comparison of ARIMA, FFNN and SVR,” 2008, http://www.it.iitb.ac.in/~ashishl/files/MTechProjectPresentation.pdf.
  17. J. T. Yao, C. L. Tan, and H. L. Poh, “Neural networks for technical analysis: a study on KLCI,” International Journal of Theoretical and Applied Finance, vol. 2, no. 2, pp. 221–241, 1999. View at Publisher · View at Google Scholar
  18. J. V. Hansen, J. B. Mcdonald, and R. D. Nelson, “Time series prediction with genetic-algorithm designed neural networks: an empirical comparison with modern statistical models,” Computational Intelligence, vol. 15, no. 3, pp. 171–184, 1999. View at Google Scholar · View at Scopus
  19. V. R. Prybutok, J. Yi, and D. Mitchell, “Comparison of neural network models with ARIMA and regression models for prediction of Houston's daily maximum ozone concentrations,” European Journal of Operational Research, vol. 122, no. 1, pp. 31–40, 2000. View at Publisher · View at Google Scholar · View at Scopus
  20. Y. B. Wijaya, S. Kom, and T. A. Napitupulu, “Stock price prediction: Comparison of Arima and artificial neural network methods—an Indonesia stock's case,” in Proceedings of the 2nd International Conference on Advances in Computing, Control and Telecommunication Technologies (ACT '10), pp. 176–179, Jakarta, Indonesia, December 2010. View at Publisher · View at Google Scholar · View at Scopus
  21. P. M. Tsanga, P. Kwoka, S. O. Choya et al., “Design and implementation of NN5 for Hong stock price forecasting,” Journal of Engineering Applications of Artificial Intelligence, vol. 20, no. 4, pp. 453–461, 2007. View at Publisher · View at Google Scholar
  22. T. H. Roh, “Forecasting the volatility of stock price index,” Expert Systems with Applications, vol. 33, no. 4, pp. 916–922, 2007. View at Publisher · View at Google Scholar · View at Scopus
  23. H. Al-Qaheri, A. E. Hassanien, and A. Abraham, “Discovering stock price prediction rules using rough sets,” Neural Network World, vol. 18, no. 3, pp. 181–198, 2008. View at Google Scholar · View at Scopus
  24. B. Vanstone and G. Finnie, “An empirical methodology for developing stockmarket trading systems using artificial neural networks,” Expert Systems with Applications, vol. 36, no. 3, pp. 6668–6680, 2009. View at Publisher · View at Google Scholar · View at Scopus
  25. S. K. Mitra, “Optimal combination of trading rules using neural networks,” International Business Research, vol. 2, no. 1, pp. 86–99, 2009. View at Google Scholar
  26. G. S. Atsalakis and K. P. Valavanis, “Forecasting stock market short-term trends using a neuro-fuzzy based methodology,” Expert Systems with Applications, vol. 36, no. 7, pp. 10696–10707, 2009. View at Publisher · View at Google Scholar · View at Scopus
  27. M. M. Mostafa, “Forecasting stock exchange movements using neural networks: empirical evidence from Kuwait,” Expert Systems with Applications, vol. 37, no. 9, pp. 6302–6309, 2010. View at Publisher · View at Google Scholar · View at Scopus
  28. E. Hadavandi, H. Shavandi, and A. Ghanbari, “Integration of genetic fuzzy systems and artificial neural networks for stock price forecasting,” Knowledge-Based Systems, vol. 23, no. 8, pp. 800–808, 2010. View at Publisher · View at Google Scholar · View at Scopus
  29. T. H. Yu and K. H. Huarng, “A neural network-based fuzzy time series model to improve forecasting,” Expert Systems with Applications, vol. 37, no. 4, pp. 3366–3372, 2010. View at Publisher · View at Google Scholar · View at Scopus
  30. A. O. Adewumi and A. Moodley, “Comparative results of heuristics for portfolio selection problem,” in Proceedings of the IEEE Conference on Computational Intelligence for Financial Engineering & Economics (CIFEr '12), pp. 1–6, New York, NY, USA, March 2012. View at Publisher · View at Google Scholar