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.

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.

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.

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.

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.

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

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.

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.

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.