Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Neural Computing and Applications (2021) 33:5965–5987

https://doi.org/10.1007/s00521-020-05374-9 (0123456789().,-volV)(0123456789().
,- volV)

ORIGINAL ARTICLE

Assess deep learning models for Egyptian exchange prediction using


nonlinear artificial neural networks
Essam H. Houssein1 • Mahmoud Dirar1 • Kashif Hussain2 • Waleed M. Mohamed1

Received: 6 April 2020 / Accepted: 18 September 2020 / Published online: 26 September 2020
Ó Springer-Verlag London Ltd., part of Springer Nature 2020

Abstract
Financial analysis of the stock market using the historical data is the exigent demand in business and academia. This work
explores the efficiency of three deep learning (Dl) techniques, namely Bayesian regularization (BE), Levenberg–Marquardt
(lM), and scaled conjugate gradient (SCG), for training nonlinear autoregressive artificial neural networks (NARX) for
predicting specifically the closing price of the Egyptian Stock Exchange indices (EGX-30, EGX-30-Capped, EGX-50-
EWI, EGX-70, EGX-100, and NIlE). An empirical comparison is established among the experimented prediction models
considering all techniques for the time horizon of 1 day, 3 days, 5 days, 7 days, 5 days and 30 days in advance, applying on
all the datasets used in this study. For performance evaluation, statistical measures such as mean squared error (MSE) and
correlation R are used. From the simulation result, it can be clearly suggested that BR outperforms other models for short-
term prediction especially for 3 days ahead. On the other hand, lM generates better prediction accuracy than BR- and SCG-
based models for long-term prediction, especially for 7-day prediction.

Keywords Artificial neural networks  Autoregressive  Bayesian regularization  Deep learning  Egyptian stock market 
Levenberg–Marquardt  Stock price prediction

1 Introduction political situations, and inflation combine to put several


stacks at risk. This demands efficient stock price prediction
Financial projections and business predictions are of sig- tools, in order for decision-makers to form the basis for
nificant importance for capital investment industry, but due profitable and well-informed investment decisions.
to several tangible and intangible factors, highly fluctuating Recently, stock price prediction has been an important
trends are observed in stock markets, making the prediction research area where researchers have exploited the enticing
a challenging task. These volatile economic and noneco- benefits of machine learning methods [1], because the
nomic factors including random exchange rates, changing traditional statistical methods (regression, autoregressive
integrated moving average, exponential average, etc.) often
fail to produce accurate predictions when involved multiple
& Essam H. Houssein nonlinear characteristics [2]. Moreover, these methods are
essam.halim@mu.edu.eg
limited to stationary time-series data, which is not the case
Mahmoud Dirar with stock market prices. Potential random changes in
mahmoddirar@mu.edu.eg
stock prices manifest random and highly dynamic behavior
Kashif Hussain which is hard to predict [3]. In machine learning paradigm,
k.hussain@uestc.edu.cn
stock price prediction models have been developed using
Waleed M. Mohamed support vector machines (SVM) [4], neural networks (NN)
waleedmakram@minia.edu.eg
[5], fuzzy logic networks [6], metaheuristic algorithms [7],
1
Faculty of Computers and Information, Minia University, etc. Additionally, deep learning, being the latest trend in
Minia, Egypt machine learning with the ability to effectively map input–
2
Institute of Fundamental and Frontier Sciences, University of output relationships, has reshaped the predictive modeling
Electronic Science and Technology of China, Chengdu, by enabling trading systems to predict stock prices more
Sichuan, China

123
5966 Neural Computing and Applications (2021) 33:5965–5987

accurately [8]. This is because, in business applications, – R and mean square error (MSE) are used to measure
deep learning methods do not heavily rely on sizable past model performance.
data related to economic and behavioral assumptions, but – The accuracy rates varying depending on the type of
deduce high-level features automatically. algorithm and the type of data on which the model was
Therefore, there is growing interest in applying deep trained lM and BR have equal number of times when
learning methods in finance domain, and literature shows the error is minimum, whereas lM performs well on
varying degrees of success in this regard. Since perfor- EGX-30, EGX-50-EWI, EGX-70 indices when time
mance of the deep learning network is largely dependent on period is equal to 5, 5, 3 day(s), respectively. BR
the training methods, an appropriate training mechanism is achieves minimum error on EGX-30-Capped, EGX-
important to be adopted [9]. In this regard, unlike con- 100,NIlE indices when time period is equal to 3, 1, 1
ventional neural network models, nonlinear autoregressive day(s), respectively.
with exogenous (NARX) multivariate input is more suit- – Simulation study with new real data from the Egypt
able for nonlinear systems or time-series data like stock Exchange (EGX-30, EGX-30-Capped, EGX-50-EWI,
market prices, because of exogenous inputs generated EGX-70, EGX-100, and NIlE) indices exhibits that the
externally using network feedback as in recurrent neural proposed NARX model offers superior performance for
networks (RNN). This ability of NARX makes learning both short- and long-term predictions.
better than other feed-forward neural networks and enables The paper is set out as follows: Sect. 2 reviews previous
it converge comparatively faster with better generalization research in the similar domain. Section 3 deals with basic
[10]. principles of NARX, BR, lM, and SCG algorithms. The
An array of practical applications found in the literature proposed model framework and configurations are
suggests that NARX has demonstrated potential approxi- explained in Sect. 4. Section 5 includes data description,
mation ability for highly nonlinear systems in prediction evaluation criteria used to measure accuracy and results
domain. For instance, groundwater prediction [11], photo- analysis and discussion. Finally, the conclusion is drawn in
voltaic power production prediction [12], indoor tempera- Sect. 6.
ture prediction [13], driver fatigue prediction [14],
riverbank erosion rate prediction [15], cloud datacenter
workload forecasting [16] are few promising applications 2 Literature review
to be listed. Specifically, NARX-based models for stock
markets are also put forward by Yu and Yan [17], Das et al. Neural networks (NNs) are the promising technology used
[18], Matkovskyy and Bouraoui [19], etc. Though, until by numerous researchers for developing multiple predic-
recently, there is a considerable gap, or in other words, tion models, particularly in the field of financial analysis.
demand for building more efficient NARX-based predict- For future stock price prediction, backpropagation neural
ing models for stock price prediction, specially focusing on networks (BPNN), recurrent neural networks (RNN), long
training methodologies, is realized. In the existing research, shorter-term memory (lSTM), etc., have been effectively
the academic researchers have proposed different algo- used by research community with the provision for the next
rithms such as Bayesian regularization (BR), Levenberg– day to be forecasted from a day to a month. In this section,
Marquardt (lM), and scaled conjugate gradient (SCG) for some of the important works related to stock market pre-
NARX training. diction presented recently are reported.
The sufficient ability of NARX in prediction problems While considering deep learning methods, there is still
in the existing research motivates this study to implement significant gap in the domain of stock market prediction,
the network for predicting stock prices for The Egyptian even though there has been resurgence of interest in this
Exchange (EGX). The learning efficiency of the training area. A brief literature outlook suggests that not much work
algorithms BR, lM, and SCG is evaluated on real-world has been performed by the relevant research community in
dataset. The contributions of this study to the existing lit- this field, and only a few works can be found. For example,
erature are summarized as follows: Yu and Yan [17] addressed the stock price prediction
– Nonlinear autoregressive neural network with exoge- problem keeping in view several stock indices around the
nous (NARX) inputs trained by three different algo- world, including S&P 500, Nikkei 225, and ChiNext
rithms, namely Bayesian regularization (BR), obtained from the relevant sources. The researchers used
Levenberg–Marquardt (lM), and scaled conjugate gra- deep NN with lSTM which demonstrated better overall
dient (SCG), is proposed to predict close price, for both prediction accuracy, MSE, MAPE, and correlation coeffi-
short-term (1, 3, and 5) day(s) and long-term (7, 15, and cients as compared to ARIMA, deep multilayer percep-
30 ) day(s) prediction. tions, and others. In a separate study, Araújo at al. [20]

123
Neural Computing and Applications (2021) 33:5965–5987 5967

Table 1 Summary of some literature studies for stock price prediction


References Year Data Period Target Measure Technique

[17] 2019 S&P 500, DJIA, N225, 2008–2017 Close price DA%, MRSE, MAPE, DNN, lSTM
ChiNext, HIS, CSI300 2010–2017 R
[20] 2019 CAC, DAX, DJIA, HS, IBOV 2013–2017 Close price AVR, MAPE, MSE, DIDlP
MER, NASDAQ, NK, NYSE POCID, THEIl
[24] 2019 EREGl, ECIlC, AFYON 2013–2015 Stock price MAPE, MAE, RMSE, HS-NN, HS-JRNN, HS-ElM
TheilU, DS HS-RElM, HS-GlM, HS-RT, HS-
GPR
[25] 2019 Reliance Private limited 2017–2018 Stock price MSE, MAPE ANN
[32] 2019 S&P 500, AAPl, TSlA, Close price MSE RNN-lSTM
GOOG
[33] 2019 Dhaka stock exchange (DSE) Close price MSE, RMSE, MACD RNN, lSTM, GRU, ARIMA
[34] 2019 SPDR S&P 500 ETF Trust 2016–2017 Stock price RMSE, RMAE, MAPE lSTM, CNN
(SPY)
[35] 2019 Guangdong enterprises- 2014–2016 Stock price MSE BPNN
Shenzhen
[36] 2019 NSE, India 2009–2018 Open price MAE, RMSE RNN-lSTM
[19] 2018 Tunisia Stock 2000–2014 IFS MSE, R NARX
[27] 2018 Casablanca Stock Close price MSE RNN-PCA, RNN
[37] 2018 BSE, NSE Open price MSE ANN
[38] 2018 KOSPI200, S&P 500 2000–2017 Close price MSE, MAPE, MAE lSTM
[39] 2018 Crystal Technology, Ming 2006–2016 Close price MSE, DA ElSTM, AElSTM
Shares
[40] 2018 S&P 500, DJIA 2010–2017 Open price Hit ratio ISCA-BPNN
[41] 2018 NSE 1996–2017 Close price MAPE MlP, RNN, lSTM, CNN
NYSE 2011–2016
[42] 2018 HIS, DAX, S&P 500 1991–2017 Close price Accuracy GRU
[43] 2018 S&P BSEBANKEX 2005–2017 Close price RMSE, DA, MdAPE lSTM, GRU, CNN, ElM
[21] 2017 Korean stock 2010–2014 Stock price NMSE, RMSE, MAE, DNN, ANN, AR, AR-DNN, DNN-
MI AR
[22] 2017 BSE, DJIA, NASDAQ, FTSE 2000–2014 Close price Average, STD ACRNN
TAIEX, S&P 500, lSE Min, Max, POCID
[23] 2017 USD to (JPY, GBP, EUR, Volatility MSE, Dstat PSO-QRNN
INR),
S&P 500 and NSE TheilU
[28] 2017 S&P 500 Index ETF (SPY) 2003–2013 Closing MSE, confusion matrix ANN-PCA, ANN-FRPCA, ANN-
price KPCA
[26] 2016 NASDAQ 1 : 6–2015 Stock price MSE, RSquare BPNN
[44] 2016 The Nikkei 225—Tokyo 1993–2013 Stock price MSE BPNN
Stock

argued that traditional NN techniques fail to produce effi- learning NN turned out to be promising tool for predicting
cient financial prediction results due to limitations when Korean KOSPI stock market.
applied on daily frequency forecast. To address the issue, Apart from deep learning approach, the researchers in
the authors presented a deep NN with each layer composed the area of stock market have utilized ANN methods
of increasing–decreasing–linear processing neurons. The trained or optimized by metaheuristic algorithms. In this
efficacy of the presented model was validated on 12 dif- context, Nayak et al. [22] trained NN by artificial chemical
ferent stock market datasets, against some of the recently reaction optimization (ACRO), hence named ACRNN, and
introduced predictive techniques reported in the literature. applied it on seven different stock indices inclusive of
In another comprehensive study by Chong et al. [21], deep NASDAQ and S&P with three difference prediction

123
5968 Neural Computing and Applications (2021) 33:5965–5987

Fig. 1 NARX general architecture [47]

scenarios of short term, medium term, and long term. The prediction model design, and conditions affect prediction
closing price prediction accuracy of the designed ACRNN accuracy.
was found better than multilayer perceptions, because the There is evidenced limited research where lM, SCG, or
integration of ACRO for weight and bias optimization BR algorithms have been utilized for the training of ANN-
instead of gradient-based learning proved to be promising based models; for example, Selvamuthu et al. [25] pro-
training approach. In a different work, a quantile regression posed such methodology for predicting Indian stock mar-
NN (QRNN) was trained by particle swarm optimization ket. The model performances were measured using use
(PSO), so-called PSOQRNN, by Dadabada and Vadlamani MSE, mean absolute percentage error (MAPE). The study
[23] for closing prices of S&P 500 and NSE Indian Stock contended to have achieved accuracy up to 99.9% using
Index. According to the findings, the authors claimed that tick data. Moghaddam et al. [26] also managed to train
the proposed method outperformed statistical and NN- ANN with lM for improved prediction results of daily
based methods like MlP and QRNN. likewise, [24] stock exchange rates of NASDAQ index.
deployed a variety of NN models, tuned by harmony search A combination of principal component analysis (PCA)
(HS) algorithm, for finding the most suitable model and ANN has also been duly formulated in the existing
architecture while predicting stock price for 1, 2, 3, 5, 7, research where the prior method is used for feature
and 10 day(s) ahead. The study was conducted by devel- reduction and the latter for prediction. For example, Ber-
oping different prediction systems including HS-NN, HS- radi and lazaar [27] applied this said synthesis on Total
RNN, HS-ElM (extreme learning machine), and others. Maroc from Casablanca stock exchange, and Zhong and
The researchers claimed usefulness of the study in terms of Enke [28] used the approach for daily market prediction
multiple important factors like comprehension on with 36 datasets. An effective integration of different

123
Neural Computing and Applications (2021) 33:5965–5987 5969

machine learning algorithms was also found by Patel et al. in the case of predicting time series or nonlinear problems
[29] who developed a fusion of SVM, ANN, and random [46]. The architecture of NARX provides limited feedback
forest (RF) for predicting stock prices for the indices of from the output layers instead of hidden layers. Figure 1
CNX Nifty and S&P Bombay Stock Exchange (BSE) illustrates NARX architecture. The RNN is useful because
Sensex from Indian stock markets. maintains reasoning about previous events in a task for
Hushani [30] compared the performance of statistical informing latter. Because it is a network with inbuilt loops
and NN-based methods and found that NARX provided within its layers, it allows to retain the information.
more accurate results than ARIMA, VAR (vector autore- Specifically, NARX is designed to build time-series pre-
gression), and lSTM while predicting NASDAQ closing diction models with better predictions capability than the
prices. A similar approach is found in [31] where NARX general NN models with fuðnÞ; uðn  1Þ; . . .g as inputs to
trained by lM was used to predict closing stock prices. For get fyðn þ 1Þ; yðnÞ; . . .g as outputs, as it employs the
effective training, the authors used three inputs: stock additional information contained in the series of interest
price, its highest, and the lowest price. fyðn þ 1Þ; yðnÞ; . . .g that has already been output at time
From limited literature survey, it seems that NARX with step n, and both the basic and unrolled structures of a
applications related to stock price prediction has not been general NARX as an update and improvement to a general
much witnessed in profound publishing venues. Therefore, RNN. Since a general NARX nonlinearly predicts future
it can be assumed that there is a need for finding more values fyðn þ 1Þg of a time series fyðn þ 1Þ; yðnÞ; . . .g
authentic results using NARX methodology in the sub- from not only past values of that time series but also past
jected domain. In this context, Table 1 shows summary of values of a second time series fuðn  1Þ; uðn  2Þ; . . .g. It
some recent studies for stock price prediction, to verify the then also considers updating and improving the classic
argument put forward. The first column refers to authors, autoregressive (AR) model which specifies that the output
the second column is the year of publication, the third variable fyðn þ 1Þg depends linearly on its own previous
column shows datasets used in the experiments, the forth values fyðn þ 1Þ; yðnÞ; . . .g and on a stochastic term (an
column shows the duration for data, the fifth column shows imperfectly predictable term). This justifies why this form
reports target from modeling, and the six column shows of prediction is called nonlinear autoregressive with
measures and metric used to evaluate model performance, exogenous (external) input or NARX.
whereas the last column refers to the proposed techniques. Let us assume an RNN with single input and output,
The studies are group based on the proposed model. From described by Eqs. (1) and (2). It can be equivalently
Table 1, we can see that the prediction of close price is the modeled with a representation of the neural network as:
most common target and MSE is the most common eval- xðn þ 1Þ ¼ /½Wa xðnÞ þ wb uðnÞ ð1Þ
uation metric. Therefore, in our study, we focus on pre-
T
dicting close price, and using MSE, and R as evaluation y ð nÞ ¼ c x ð nÞ ð2Þ
metric. Moreover, a NARX model trained by means of
Levenberg–Marquardt algorithm was chosen, as the exist- Using Eqs. (1) and (2), it can be easily said that the output
ing studies reveal that the NARX models are suitable for yðn þ qÞ is expressed in terms of the state xðnÞ and the
performing short time-series composite indexes prediction. input vector uq ðnÞ as:
 
yðn þ qÞ ¼ U xðnÞ; uq ðnÞ ð3Þ

3 Materials and methods where q is the dimensional form of the model and
U : Rq ! R. Since the recurrent network is observable,
This section provides an explanation of nonlinear autore- the local observability theorem can be written as:
gressive neural network with exogenous (NARX) input  
xðnÞ ¼ W yp ðnÞ; uq1 ðnÞ ð4Þ
model architecture, and its training algorithms such as
Bayesian regularization (BR), Levenberg–Marquardt (lM), where W : Rq ! R: Hence, substituting Eq. (3) in
and scaled conjugate gradient (SCCG), as these algorithms Eq. (4), it is obtained as:
are able to generate lower mean squared error than the    
yðn þ qÞ ¼ U W yp ðnÞ; uq1 ðnÞ ; uq ðnÞ
gradient-based learning methods.   ð5Þ
¼ F yq ðnÞ; uq ðnÞ
3.1 Nonlinear autoregressive neural network where uq1 ðnÞ is contained in uq ðnÞ as its first elements
with exogenous (NARX) input ðq  1Þ, and the nonlinear mapping F : Rq ! R takes care
of both / and W.
NARX is a type of recurrent neural network (RNN) with
one or more feedback loops [45], and it outperforms RNN

123
5970 Neural Computing and Applications (2021) 33:5965–5987

Fig. 2 Framework of the proposed model

Table 2 Parameter settings  


yðnÞ; . . .; yðn  q þ 1Þ;
Parameter Setting
y ð n þ 1Þ ¼ F ð9Þ
uðnÞ; . . .; uðn  q þ 1Þ
Number of input neuron(s) Six Note that some nonlinear mapping F : Rq ! R exists
Number of output neuron(s) One whereby the present output yðn þ 1Þ is defined in past
Delays 1, 3, 5, 7, 15, and 30 values yðnÞ; . . .; yðn  q þ 1Þ and the present and past input
Proportion of training, 70%:15%:15% uðnÞ;    ; uðn  q þ 1Þ. This input–output representation is
validation and test dataset equivalent to the model via Eqs. (1) and (2).
Training algorithm BR, lM, and SCG The function f ðÞ is a nonlinear vector function also for
Error function(s) MSE NARX model with one time series, represented as Eq. (10)
Accuracy Correlation coefficient R "
XNh Xdu
Type of learning rule Supervised learning rule yðn þ 1Þ ¼ f0 b0 þ who fh ðbh þ wih uðn  iÞ
h¼1 i¼0
dy
!#
X
uq1 ðnÞ ¼ ½uðnÞ; uðn þ 1Þ;    ; uðn þ q  2ÞT ð6Þ þ wjh yðn  jÞ
T j¼0
yp ðnÞ ¼ ½yðnÞ; yðn þ 1Þ;    ; yðn þ q  1Þ ð7Þ
ð10Þ
Using the definitions of yp ðnÞ and uq ðnÞ given in Eqs. (6)
where wih represents weights from the input layer to the
and (7), we may rewrite Eq. (5) in the expanded form: hidden layer, who weights from hidden layer to output
 
yðn þ q  1Þ; . . .; yðnÞ; layer, and wjh weights from output feedback layer to the
y ð n þ qÞ ¼ F ð8Þ
uðn þ q  1Þ; . . .; uðnÞ hidden layer. b0 and bh are the biases. fh is a function of the
hidden layer, and f0 is a function of the output layer.
and replace n with n  q þ 1; then,

123
Neural Computing and Applications (2021) 33:5965–5987 5971

3.2 Levenberg–Marquardt descent method developed by [52] in 1992. The purpose is


to reduce the objective function error f using:
Levenberg–Marquardt (lM) is a modified version of f ¼ bhd þ ahr ð12Þ
Gauss–Newton method [48], but is a easy-to-implement
and useful training method for neural networks. As against where hd is the sum of squared errors, whereas hr repre-
backpropagation training, solutions in Hessian-based sents squared sum of network weights. Here, a and b
algorithms are generated by learning subtle features; hence, denote objective function parameters.
convergence is achieved in a faster manner. BR is considered an efficient training algorithm for
The approach for updating NN weights is expressed as ANN because it omits the need for exhaustive cross-vali-
follows: dation process. It converts a nonlinear problem into sta-
tistical problem by considering it in a probabilistic
Dw ¼ ðH þ lIÞ1 g ð11Þ
characteristic of NN weights in relation to dataset in hand.
where g denotes to gradient vector, H the approximated A greater detail about BR can be found in [53], as we keep
Hessian matrix, I identity matrix, and l adjustable learning it short for curbing the paper length.
rate or parameter. Based on evaluation matrix, such as
squared error, this parameter is updated during learning
steps. In the case of decreased error rate, l ¼ l  b; 4 The proposed NARX model
otherwise, l ¼ lb ; ð0\b\1Þ.
The lM algorithm approximates the initial parameters The NARX network can be employed in multiple-input and
values to the desirable optimum values, based on the multiple-output time-series applications [54]. However,
training set. The validation set is then used to validate this study considers open price, low price, and high price as
whether the network performance is suitable. On the other inputs, and close price as target output. Therefore, the
hand, the test further verifies the generalization ability of general NARX with three inputs and one output can be
the network, but it does not have any influence on training. mathematically expressed as Eq. (13) [47]:
"
The process of parameter optimization terminates as soon XN
as the maximum number of iterations is met, or the per- yðn þ 1Þ ¼ f0 b0 þ who  fh bh
h¼1
formance evaluation metric falls below desirable value
[49]. X
du1 X
du2
þ wi1h u1 ðn  i1Þ þ wi2h u2 ðn  i2Þ
i1¼0 i2¼0
!#
3.3 Scaled conjugate gradient X
du3 dy
X
þ wi3h u3 ðn  i3Þ þ wjh yðn  jÞ
i3¼0 j¼0
Scaled conjugate gradient (SCG) is a supervised learning
algorithm that Møller developed in 1993 [50], which is ð13Þ
used to optimize neural network weights and biases based where wi1h is the weight between input and the hidden
on conjugate directions and then evaluate error by ana- neurons, wi2h is the weight between second input and the
lyzing forecast and actual values. The main goal is to make hidden neurons, whereas wi3h is the weight between third
prediction so close to the real values as much as possible; input and the hidden neurons.
in other words, the calculated error should be close to 0 Figure 2 illustrates the proposed framework to predict
[51]. close price of Egyptian exchange. It has five main steps.
SCG was founded according to conjugate directions but The first step is to normalize the stock data as in Eq. (14),
does not execute a line search for each iteration except for in order to enhance the prediction results, before data are
majority of the conjugate gradient algorithms. As with line divided into three sets: training set coded by orange color,
search network, responses are often calculated for all validation set coded by blue color, and test set coded by
training inputs to any search, which is computationally green color. The second step is defining NARX architec-
expensive. Its training process also works in similar fashion ture by setting the number of neurons and delay.
as lM, discussed earlier. As mentioned in the study [55], it is suitable to develop
the simplest network architecture for carrying out the stock
3.4 Bayesian regularization forecasting task. Accordingly, we start with six hidden
neurons and gradually add the hidden neurons until limited
Bayesian regularization (BR) is another learning mecha- improvement in mean square error (MSE) is witnessed.
nism for ANN, which serves as an alternative to gradient The results with the number of neurons from 6 to 25 affirm

123
5972 Neural Computing and Applications (2021) 33:5965–5987

Table 3 Description of data samples and data range


Datasets Time duration Total samples Training samples Validation samples Test samples

EGX-30-Capped February 03, 2019–August 27, 2019 135 94 20 20


EGX-50-EWI August 02, 2015–August 27, 2019 990 693 148 148
NIlE February 02, 2014–August 27, 2019 1356 949 203 203
EGX-70 November 27, 2009–August 27, 2019 2527 1768 379 379
EGX-100 August 02, 2009–August 27, 2019 2422 1695 363 363
EGX-30 March 01, 2008–August 27, 2019 2587 1810 388 388

5 Experimental results
Table 4 Description of used parameters
Parameter Description 5.1 Data description
Open price The price in the beginning of daily dealing
This study is based on the historical data for some of the
High price The highest price reached by the end of daily dealing
indicators on the Egyptian Stock Exchange (EGX), in order
low price The lowest price reached by the end of daily dealing to build a prediction model with high accuracy. Data used
Close price The price in the end of daily dealing in this study are purchased from Egypt for Information
Dissemination (EGID)1 which is a Governmental organi-
zation that provides data for EGX. The data contain six
that from 6–14, 16–19, and 21–25 neurons generate similar stock market indices; for example, EGX-30 index local
accuracy. In the mentioned study, when they used 15 currency is used for interest estimates and denominated in
neurons, the accuracy decreased; in the case of 19–23, US dollars. It measures top 30 firms in liquidity and
accuracy slightly increased. Hence, the architecture with activity. The second index used in this study is EGX-30-
3–6–1 with three inputs, a hidden layer with six neurons Capped which is designed to track performance of the most
including bias, and an output reduces the training and traded companies in accordance with the rules set for
model approximation cost. For delay, we carried out dif- mutual funds. The third index is EGX-70 which aims at
ferent prediction time horizons such as 1 day, 3 days, 5 providing wider tools for investors to monitor market
days, 7 days, 15 days, and 30 days performance. EGX-100 index as a forth dataset evaluates
The third step is selection of the training algorithm. In performance of the 100 active firms, including 30 of EGX-
this study, Bayesian regularization (BR), Levenberg–Mar- 30 index as well as 70 of EGX-70 index. NIlE index avoids
quardt (lM), and scaled conjugate gradient (SCG) are used concentration on one industry and therefore has a good
to train the NARX network. The orange dashed line pre- representation of various industries/sectors in the economy,
sents training data, and the blue dashed line represents and the index is weighted by market capitalization and
validation data. BR uses validation data with training data adjusted by free float. The last index is EGX-50-EWI
to train the model. The fourth step is to test model by which tracks top 50 companies in terms of liquidity and
performing prediction on the test set and evaluate model activity. The index is designed to balance the impact of
accuracy using MSE and correlation coefficient R. In order price changes among the constituents of the index as they
to ensure model accuracy, training and validation data are will have a fixed weight of 2% at each quarterly review.
used with test data in order to test and evaluate the model. The historical period of data in the study starts from
The green line in Fig. 1 presents test data, the orange line EGID registration of these data to date August 27, 20192 as
presents training data, and the blue line denotes validation shown in Table 3. The data contain eight features: code,
data. The last step is to compare prediction results if it is date, open price, high price, low price, close price, volume,
acceptable so the task ends; otherwise, return to step 2 and and value. This study uses open price, high price, and low
modify the NARX architecture. The parameter settings of price as input features, and close price as target feature, as
used techniques are reported in Table 2. shown in Table 4.

1
www.egidegypt.com.
2
www.egx.com.eg.

123
Neural Computing and Applications (2021) 33:5965–5987 5973

100
99.96

99.94 98

99.92
96
99.9
Accuracy

Accuracy
99.88 94

99.86
92
99.84

99.82 90

99.8
88
99.78

BR LM SCG BR LM SCG
Algorithms Algorithms
(a) Boxplot on EGX-30. (b) Boxplot on EGX-30-Capped.

99.9
99.94

99.92 99.8

99.9
99.7
99.88
Accuracy

Accuracy

99.6
99.86

99.84 99.5

99.82
99.4
99.8

99.3
99.78

BR LM SCG BR LM SCG
Algorithms Algorithms
(c) Boxplot on EGX-50-EWI. (d) Boxplot on EGX-70.

99.98

99.96 99.9

99.94
99.85
99.92

99.9 99.8
Accuracy

Accuracy

99.88
99.75
99.86
99.7
99.84

99.82
99.65
99.8
99.6
99.78
BR LM SCG BR LM SCG
Algorithms Algorithms
(e) Boxplot on EGX-100. (f) Boxplot on NIlE.

Fig. 3 Boxplot for 1-, 3-, 5-, 7-, 15-, 30-day-ahead prediction based on data and training algorithms

123
5974 Neural Computing and Applications (2021) 33:5965–5987

BR LM SCG BR LM SCG – Mean squared error (MSE) measures the average of


1 day
0.00030
1 day
0.00250
squared errors. An squared error is the squared
0.00025
0.00020
0.00200 difference between the estimated values and the actual
0.00150
30 days 0.00015 3 days 30 days
0.00100
3 days value. The objective of the learning algorithm is to
0.00010
0.00005 0.00050 minimize MSE. Mathematically, MSE is measured as
0.00000 0.00000
Eq. (15):
15 days 5 days 15 days 5 days 1 n 2
MSE ¼ R yi  yi ð15Þ
n i¼1
7 days 7 days

(a) MSE on EGX-30. (b) MSE on EGX-30-Capped. where y is the actual value and y is the predicted value.
– Regression R value (Pearson correlation coefficient)
BR LM SCG BR LM SCG measures the correlation between actual and the
1 day 1 day
0.00035 0.00100 predicted prices as expressed in Eq. (16):
0.00030
0.00025
0.00080 Pn
30 days 0.00020 3 days 30 days
0.00060
3 days t¼1 ðyt  yt Þðyt  yt Þ
0.00015 0.00040 R ¼ qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
Pn ffi ð16Þ
0.00010 2 2
0.00005
0.00000
0.00020
0.00000
ð
t¼1 t 
y  y t Þ ðyt  y t Þ

15 days 5 days 15 days 5 days where yt is the actual price and yt is the predicted price
[17].
7 days 7 days It is important to note that the lower the MSE and the
(c) MSE on EGX-50-EWI. (d) MSE on EGX-70. closer to 1 is R, the more reliable are the prediction results.
BR LM SCG BR LM SCG
1 day 1 day 5.4 Results analysis
0.00030 0.00035
0.00025 0.00030
0.00020 0.00025
30 days 0.00015 3 days 30 days 0.00020
0.00015
3 days Analyzing the stock market is one of the important tasks,
0.00010
0.00005
0.00010
0.00005
where many methods have been proposed by the
0.00000 0.00000
researchers to predict stock price with the expectations of
15 days 5 days 15 days 5 days
getting predicted results closer to the actual value. The
experimental design includes two main factors: forecast
7 days 7 days
time horizon and the training algorithm. We obtained 108
(e) MSE on EGX-100. (f) MSE on NIlE. individual prediction results: across six financial markets
(EGX-30, EGX-30-Capped, EGX-50-EWI, EGX-70, EGX-
Fig. 4 MSE Comparison for 1-, 3-, 5-, 7-, 15-, 30-day-ahead 100, and NIlE)  6 forecast time horizons  3 model
prediction based on data and training algorithms using radar chart specifications (BR, lM, and SCG). Each dataset was divi-
ded into training, validation, and testing sets with the ratio
5.2 Data preprocessing of 70:15:15. The results enabled us to compare the fore-
casting accuracy across different time intervals. The
According to Demuth et al. [56], it is often helpful for the experiments were carried out on a PC with Intel Core i7-
training algorithms to perform well when the inputs and the 7500 CPU 2.70 GHz, 12 GB RAM, Windows 10, and
target values are scaled in the range of ½1; 1. Following MATLAB 2016b. This section is divided into two sub-
the argument for the enhanced prediction results, we nor- sections: first, we report short-term predictions (1 day, 3
malized our data using minimum scale function [57], as days, and 5-days) followed by the long-term predictions (7
Eq. (14): days, 15 days, and 30 days). In order to curb paper length,
we report only the best results with fair comparison.
xi  minðxÞ
x^i ¼ ; i 2 ½1; 2; . . .; n ð14Þ Figure 3 displays the distribution of model accuracy,
maxðxÞ  minðxÞ
using the box plots, across all time horizons among dif-
where x^i is a normalized value at index i in total n samples. ferent model specifications. For EGX-30 and EGX-30-
Capped, the experimental findings reveal that BR outper-
5.3 Evaluation metrics formed lM and SCG (Fig. 3a), while lM gave best results
on rest of the datasets. The results show that BR outper-
The following measures are used to validate and evaluate formed other models by average accuracy of 99.96% and
the proposed approach: 99.32% for EGX-30 and EGX-30-Capped, respectively. On
the other hand, the average accuracy produced by lM

123
Neural Computing and Applications (2021) 33:5965–5987 5975

Fig. 5 Accuracy R for 1-, 3-, 5-, BR LM SCG


7-, 15-, 30-day-ahead prediction 100.00%
for EGX-30 and EGX-30- 99.95570%
Capped, where blue curve 99.95730% 99.96010% 99.96030%
99.97% 99.95690% 99.95450%
represents BR, the orange curve
is lM, and the gray curve is SCG
99.95620%
(color figure online) 99.94%
99.94980% 99.95000%99.95380%
99.94490%
99.94630% 99.93710%
99.91%
99.93630% 99.88580%

ACCURACY
99.91200% 99.91680%
99.88%

99.85%

99.82%

99.79%

99.76%
99.74760%

99.73%
1 3 5 7 15 30
DAYS
(a) Accuracy R on EGX-30.

BR LM SCG
100.00%
98.59620% 99.09490% 98.65720% 98.72820%
97.85480% 98.30510%
98.00% 98.80510%
97.66170% 97.34790%
97.20340%
96.00% 97.85850% 97.89390%
96.62380% 96.76850%
ACCURACY

94.00%
94.64870%
95.06190%
90.32050%
92.00%

90.00%

88.00% 87.25750%

86.00%
1 3 5 7 15 30
DAYS
(b) Accuracy R on EGX-30-Capped.

remained 99.92%, 99.85%, 99.95% and 99.89% for EGX- From Fig. 5a and b, we can see that the short-term accu-
50-EWI, EGX-70, EGX-100 and NIlE, respectively. It can racy increased by increasing the prediction period and
be inferred from the findings that the lM algorithm was decreased by increasing the prediction time period for the
more accurate as compared to BR. Overall, lM and BR long term. Figure 7b reveals that, in general, accuracy
were able to obtain lower mean squared errors than SCG. decreased by increasing prediction period for the two long-
For prediction accuracy, Figs. 5, 6, and 7 show accuracy and short-term predictions.
distribution based on datasets, where y-axis refers to In addition, we use radar charts representing MSE across
accuracy and the x-axis is the prediction time horizon. all time horizons among different models, using Fig. 4

123
5976 Neural Computing and Applications (2021) 33:5965–5987

Fig. 6 Accuracy R for 1-, 3-, 5-, BR LM SCG


7-, 15-, 30-day-ahead prediction 100.00%
for EGX-50-EWI and EGX-70,
where blue curve represents BR,
99.97%
the orange curve is lM, and the
gray curve is SCG (color 99.93980%
99.93600% 99.93630%
figure online) 99.94% 99.92900%
99.91650%
99.91%
99.89930% 99.90070%

ACCURACY
99.91540% 99.90610% 99.91370%
99.91450%
99.88%
99.91310% 99.86260%
99.87180% 99.87450% 99.88760%
99.85%

99.82%

99.79% 99.79420%
99.77790%

99.76%
1 3 5 7 15 30
DAYS

(a) Accuracy R on EGX-50-EWI.

BR LM SCG
100.00%

99.88050%
99.86260% 99.86340%
99.90% 99.83070% 99.86040% 99.82340%
99.87080% 99.80640%
99.80%
99.84100% 99.80780% 99.73910%
99.82040%
99.80010%
99.70% 99.74290% 99.74940%
ACCURACY

99.72050%
99.71410%
99.60%

99.50%

99.40%

99.30%
99.27050%

99.20%
1 3 5 7 15 30
DAYS

(b) Accuracy R on EGX-70.

where the errors of all the selected models for each dataset when compared with other methods for most of the time
are summarized. Here, it is easy to infer that SCG produced horizons.
worst results for all time horizons, as the radar lines of the
counterparts are surrounded by the SCG line for most of 5.4.1 Short-term prediction
the radar. In this context, BR and lM performed better on
almost all the datasets. From these analyses, it is obvious The proposed models have been adjusted to perform a
that the radar line pertaining to SCG is near the edges of short-term prediction, and most of the previous studies
the chart, indicating that SCG generated maximum value mainly focus on one-day-ahead prediction. The statistical

123
Neural Computing and Applications (2021) 33:5965–5987 5977

Fig. 7 Accuracy R for 1-, 3-, 5-, BR LM SCG


7-, 15-, 30-day-ahead prediction
for EGX-100 and NIlE. Blue
curve denotes BR, orange curve 99.96040% 99.96330% 99.95040%
99.97%
99.95710%
is lM, and gray curve is SCG 99.95290% 99.94840%
(color figure online)
99.95170% 99.95800% 99.95150% 99.94980%
99.94210% 99.94560%
99.92%
99.93250%
99.93000%

ACCURACY
99.92150%
99.87880%

99.87%

99.81150%

99.82%
99.78350%

99.77%
1 3 5 7 15 30
DAYS
(a) Accuracy R on EGX-100.

BR LM SCG

99.98%

99.92880%
99.88940% 99.89970%
99.93%
99.89450%
99.92670% 99.88070%
99.88% 99.86530%
99.85120%
99.88930%
99.88570% 99.83190%
ACCURACY

99.83% 99.81010%
99.88860%
99.76900%
99.78%
99.75600% 99.74170%
99.70700%
99.73%

99.68%

99.63% 99.59380%

99.58%
1 3 5 7 15 30
DAYS

(b) Accuracy R on NIlE.

measures reported in this section show that efficient results efficient results, we calculated total error on all datasets for
have been achieved by all the training algorithms, see the time period of 3 days which are 5:19924  104 and
Figs. 5, 6, and 7. As can be seen in Figs. 5a and 6a, lM 5:4693  104 for BR and lM, respectively. Conclusively,
with time period of 5 days outperformed other algorithms. BR obtained minimum total error.
Also, lM achieved better results according for time period From the analysis performed in this section, it can be
of 3-days, see Fig. 6b. BR also performed better as clearly suggested that the performance of BR algorithm in
observed in Figs. 5b and 7a with time period 3 days and for predicting the above-mentioned stock indices outperformed
1 day (Fig. 7b). Since BR and lM generated equally SCG and lM. The simulated graph of EGX-30, EGX-30-

123
5978 Neural Computing and Applications (2021) 33:5965–5987

Table 5 Short-term MSE results for test data based on index and prediction periods
Prediction period Algorithm MSE 104 on test set
EGX-30 EGX-30-Capped EGX-50-EWI EGX-70 EGX-100 NIlE

1 day BR 0.54842 0.71273 1.11751 1.80849 0.56986 0.62553


lM 0.66800 0.94439 1.04599 1.52655 0.48452 0.64369
SCG 2.87361 1.52133 3.22175 2.93866 0.72864 0.95174
3 days BR 0.60867 0.42055 1.09449 1.49053 0.46220 1.12280
lM 0.55154 0.90823 1.11126 1.34774 0.48892 1.06161
SCG 0.74680 1.97664 1.31188 2.09976 0.79379 2.22202
5 days BR 0.52088 0.66429 1.32792 2.01257 0.53589 1.33632
lM 0.49149 0.42424 0.86309 1.72149 0.54763 0.88071
SCG 0.77430 2.37904 1.83459 2.81253 0.83477 2.28183

Table 6 Short-term accuracy (R) for test data based on index and prediction periods
Prediction period Algorithm Accuracy R (in %)
EGX-30 EGX-30-Capped EGX-50-EWI EGX-70 EGX-100 NIlE

1 day BR 99.95730 97.85480 99.91450 99.84100 99.95170 99.92670


lM 99.94630 97.20340 99.92900 99.86260 99.96040 99.92880
SCG 99.74760 96.62380 99.77790 99.74290 99.93250 99.88860
3 days BR 99.94980 98.59620 99.91540 99.87080 99.96330 99.88930
lM 99.95690 97.66170 99.91650 99.88050 99.95800 99.88940
SCG 99.93630 95.06190 99.91310 99.80010 99.92150 99.70700
5 days BR 99.95620 98.80510 99.89930 99.80780 99.95150 99.85120
lM 99.96010 99.09490 99.93600 99.83070 99.95710 99.89970
SCG 99.93710 97.85850 99.87180 99.72050 99.93000 99.76900

Capped, EGX-50-EWI, EGX-70, EGX-100 and NIlE data from the results, BR attained considerably better results
considers 3 days ahead to be predicted, as depicted in Fig. than all the comparison models associated with the three
8 where BR technique was set for training NARX and used methods. As shown in Table 6, the best regression value
stock data as input to the prediction model. In the experi- R of NARX model is grater or equal to 99.9% for testing
mental outcome, some of the simulated graphs of actual datasets, which is about 100%.
versus the predicted are shown in this paper to limit the The actual versus predicted graph of all the experi-
paper length; though, a comprehensive understanding can mented datasets using BR algorithm for 3-day-ahead
be achieved from Tables 5 and 6 showing MSE and pre- closing price is depicted in Fig. 8 showing the prediction
diction accuracy. These findings can be supported by the curves generated. The curve of predicted values is located
research performed in Orimoloye et al. [58] which suggests closest to the actual curve in all the six figures, suggesting
that the ANN network trained by BR is relatively expected that the proposed method attained more outstanding overall
to produce efficient prediction results as compared to the performances. Overall, these results illustrate the efficiency
one trained by lM. of BR as a viable mechanism for prediction.
Tables 5 and 6 summarize MSE and accuracy R in The regression plot shows actual versus predicted graph
percentage (%) for three proposed models on test data of of all the experimented datasets using BR algorithm for
different datasets. The tables show the experimental results 3-day-ahead closing price in Fig. 9 which measures cor-
for BR, lM and SCG methods for all time periods. The first relation between prediction and actual values. The blue
column shows prediction period and the second column rings refer to predicted, red to actual value and dashed line
refers to the training algorithm used, while the rest of the to fit. As shown is high coloration between predicted and
columns refer to datasets. Table 5 presents normalized the actual on all the six figures. It is important to note from
values of actual MSE ¼ Presented  104 . As can be seen these results that regression value R is close to 100%.

123
Neural Computing and Applications (2021) 33:5965–5987 5979

Close Price Prediction of EGX 30 using BR Close Price Prediction of EGX 30 Capped using BR
1.2 1.2
Actual Predicted Actual Predicted
1 1.15

0.8 1.1
Close Price

Close Price
1.05
0.6
1
0.4
0.95
0.2
0.9

0 0.85
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400
0 2 4 6 8 10 12 14 16 18 20
Days Days
(a) Predictionon EGX-30. (b) Predictionon EGX-30-Capped.
Close Price Prediction of EGX 70 using BR
1.2
Close Price Prediction of EGX 50 EWI using BR 1.2
Actual Predicted
Actual Predicted
1 1
Close Price

0.8
Close Price
0.8

0.6 0.6

0.4 0.4

0.2 0.2

0 0
0 20 40 60 80 100 120 140 150 0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400

Days Days

(c) Predictionon EGX-50-EWI. (d) Predictionon EGX-70.


Close Price Prediction of NILE using BR
Close Price Prediction of EGX 100 using BR
1.2 1.2

Actual Predicted
1 1 Actual Predicted
Close Price

0.8
Close Price

0.8

0.6 0.6

0.4 0.4

0.2 0.2

0 0
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400 0 20 40 60 80 100 120 140 160 180 200 220 240 250

Days Days
(e) Predictionon EGX-100. (f) Predictionon NIlE.

Fig. 8 Three-day-ahead prediction for all datasets using BR training algorithm; blue curve represents predicted values, whereas red curve
represents the actual values. The curves show that the model gives predicted values close to the actual ones for all datasets (color figure online)

5.4.2 Long-term prediction depicted for all the models in Figs. 5a and 6a. Here, BR
with the time period of 7 days outperformed other algo-
The proposed model was also adjusted to perform a long- rithms and SCG achieved better results according to
term prediction, as it has the same importance for investors. Fig. 5b for the time period of 30 days. lM performed well
The statistical measures show the efficient results, as as seen in Figs. 6b and 7a with the time period of 7 days,

123
5980 Neural Computing and Applications (2021) 33:5965–5987

R=0.9995 R=0.98596
1 1
Actual Fit Predicted
Predicted ~= 1*Actual + 0.00055
Actual Fit Predicted

Predicted ~= 0.93*Actual + 0.063


0.9

0.8

0.7
0.95
0.6

0.5

0.4
0.9
0.3

0.2

0.1

0 0.85
0 0.2 0.4 0.6 0.8 1 0.85 0.9 0.95 1
Actual Actual
(a) Correlation Coefficient R on EGX-30. (b) Correlation Coefficient R on EGX-30-Capped.
R=0.99915 R=0.99871
Predicted ~= 0.99*Actual + 0.0031

Actual Fit Predicted

Predicted ~= 1*Actual + 0.00085


Actual Fit Predicted
0.9 0.9

0.8 0.8

0.7 0.7

0.6 0.6

0.5 0.5

0.4 0.4

0.3 0.3

0.2 0.2

0.1 0.1

0
0 0.2 0.4 0.6 0.8 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Actual Actual
(c) Correlation Coefficient R on EGX-50-EWI. (d) Correlation Coefficient R on EGX-70.
R=0.99963 R=0.99889

Actual Fit Predicted Actual Fit Predicted


Predicted ~= 1*Actual + 0.0011

0.9 0.9
Predicted ~= 1*Actual + -0.001

0.8 0.8

0.7 0.7

0.6 0.6

0.5 0.5

0.4 0.4

0.3 0.3

0.2 0.2

0.1 0.1

0
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 0 0.2 0.4 0.6 0.8

Actual Actual
(e) Correlation Coefficient R on EGX-100. (f) Correlation Coefficient R on NIlE.

123
Neural Computing and Applications (2021) 33:5965–5987 5981

b Fig. 9 Three-day-ahead correlation coefficient (R); regression plots results, the regression values shown here are also close to
provide a clear vision about model accuracy R and how prediction is 100%.
close to actual. Figure shows that the fit is very good for all datasets.
Most of the R values are equal to 0.99 or above, except for EGX-30-
Capped, which gives R value equal to 0.98; therefore, prediction
accuracy is high
5.5 Comparison with state of the art

When considering comparison with previous studies per-


and for 15-days as seen in Fig. 7b. According to the results, taining to deep learning and NARX, there are witnessed
7-day prediction is the common time period BR and lM certain inconsistency issues such as (a) the scarcity of using
perform well equal times, so the second step was to cal- NARX technology in the stock market domain, despite
culate total error for these two algorithms on all datasets for commonly used in time-series problems [61] and many
the time period of 7 days which are 6:3559  104 and other areas [62] like NARX-Laguerre model [63], pattern
classifier [64], convergence bound in the frequency domain
6:30204  104 for BR and lM, respectively. From these
[65], photovoltaic power [12], (b) we use a novel datasets
results presented here, it is obvious that the performance of
that was not previously used before. Yet, we present a brief
lM algorithm in predicting the above-mentioned stock
comparison with previous research efforts in terms of the
value outperformed BR. Therefore, in this section results of
applied dataset, measure, techniques and accuracy(%) as
prediction on time period of 7 days for NARX model
shown in Table 9. Only nearby methods using ANN are
trained by lM algorithm are discussed.
incorporated for realistic results comparison. Conse-
From these results, it can be clearly suggested that the
quently, it is seen that the proposed approach provides at
performance of lM algorithm in predicting the above-
least 99% overall regression measures which indicates
mentioned stock indices outperformed BR and SCG. The
providing the best performance in comparison with the
simulated graphs for EGX-30, EGX-30-Capped, EGX-50-
recent approaches.
EWI, EGX-70, EGX-100, and NIlE data considering 7
days ahead to be predicted are depicted in Fig. 10. Here,
lM technique was set for training NARX and used stock
5.6 Discussion
data as input to the prediction model. In the experimental
The purpose of this study is to propose a prediction model
outcome, some of the simulated graphs of actual versus the
with high accuracy based on Governmental datasets for the
predicted are shown in this paper to limit paper length;
Egyptian Stock Exchange (EGX). Using the NARX neural
though, a comprehensive understanding can be achieved
network, the study proposed NARX model with three input
from Tables 7 and 8 showing MSE and prediction accu-
and one output layer, and we use three training algorithms
racy. These findings support the argument put forward in
as we mentioned in Sect. 3. Generally, the comparative
[59, 60] that lM is widely used training algorithm for ANN-
study shows the merits and limitations of neural network
based prediction models.
methods when compared horizontally for stock price pre-
For long-term prediction results, Tables 7 and 8 sum-
diction. More importantly, model accuracy, speed of model
marize MSE and accuracy R in percentage (%) for test data
approximation, handling binary and continuous features,
of three proposed models on different datasets. The results
and incremental learning are some of the merits of most
show the experimental outcome for BR, lM, and SCG
neural network methods. However, relatively low learning
methods for all time periods. Table 7 presents the nor-
speed, intolerance to missing values and noisy data, issues
malized values of actual MSE ¼ Presented  104 . As can
with redundant features, tendency of overfitting, and black
be seen from the tables, lM has attained considerably better
box are some of the difficulties faced with these models. In
results than all the comparison models associated with the
particular, the experimental analysis performed in this
three methods. Table 8 shows the best regression value of
study suggests that the proposed methodology proved its
NARX model equal to 99.9% for testing datasets. From
efficacy.
Fig. 10 which depicts actual and the predicted prices as a
The proposed NARX model presents certain pros: (1)
time series, it can be said that 7 days ahead with lM pre-
Among all kinds of neural networks, the NARX usually has
diction performance is better. The regression plot shows
a higher level of accuracy, superior generality, and prac-
actual versus predicted graph of all the experimented
ticability for time-series prediction because of various
datasets using lM algorithm for 7-day-ahead closing price
advantages such as the ability to keep a memory of past
is depicted in Fig. 11 which measures correlation between
events to predict future trends [70]. (2) It has the capacity
prediction and actual. Similar to short-term prediction
to provide better forecasting accuracy than traditional time-
series analysis [61], especially in the multistep-ahead short-

123
5982 Neural Computing and Applications (2021) 33:5965–5987

Close Price Prediction of EGX 30 using LM Close Price Prediction of EGX 30 Capped using LM
1.2
1.2

Actual Predicted 1.15


1
Actual Predicted

1.1

Close Price
0.8
Close Price

1.05

0.6
1

0.4
0.95

0.2 0.9

0.85
0 0 2 4 6 8 10 12 14 16 18 20
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400

Days Days
(a) Prediction on EGX-30. (b) Prediction on EGX-30-Capped.

1.2
Close Price Prediction of EGX 50 EWI using LM Close Price Prediction of EGX 70 using LM
1.2

Actual Predicted Actual Predicted


1
1
Close Price

0.8
Close Price 0.8

0.6
0.6

0.4
0.4

0.2
0.2

0
0 20 40 60 80 100 120 140 150 0
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400
Days
Days
(c) Prediction on EGX-50-EWI.
(d) Prediction on EGX-70.

Close Price Prediction of EGX 100 using LM Close Price Prediction of NILE using LM
1.2
1.2

1 Actual Predicted 1 Actual Predicted

0.8
0.8
Close Price

Close Price

0.6
0.6

0.4
0.4

0.2
0.2

0
0 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400 0
0 20 40 60 80 100 120 140 160 180 200 220 240 250
Days Days
(e) Prediction on EGX-100. (f) Prediction on NIlE.

Fig. 10 Seven-day-ahead prediction for all datasets using lM training algorithm; blue curve represents predicted values, whereas red curve is
actual values. Figure shows that the proposed model gives predicted values close to actual values for all datasets (color figure online)

term forecast [71]. (3) NARX structure allows the learning Besides benefits, the proposed NARX also poses some
algorithm to efficiently approximate and fine-tune the limitations as discussed below: (1) The application of the
model parameters [72, 73]. (4) It has been successfully NARX is still immature under some scenarios due to the
applied to many areas as we mentioned before in Sect. 5.5. fact that there are no such general decision criteria for

123
Neural Computing and Applications (2021) 33:5965–5987 5983

Table 7 Long-term MSE for test data based on index and prediction periods
Prediction period Algorithm MSE x104 on test set
EGX-30 EGX-30-Capped EGX-50-EWI EGX-70 EGX-100 NIlE

7 days BR 0.51431 0.79345 0.88377 2.60004 0.65028 0.91405


lM 0.63959 1.42038 1.38016 1.39738 0.49863 0.96590
SCG 1.04321 2.15505 1.99064 2.06757 2.05920 2.25517
15 day BR 0.57256 21.56370 1.18038 3.01820 0.54460 1.26124
lM 0.66534 3.16887 0.99626 1.68767 0.53343 0.86049
SCG 1.06136 1.39570 1.81869 2.82684 2.56814 2.00173
30 day BR 0.59568 1.50082 1.23708 1.88133 0.57825 1.50248
lM 0.57135 1.44127 1.48321 1.46672 0.66151 1.09680
SCG 1.40531 0.51019 2.47412 8.23814 1.24153 3.00411

Table 8 Long-term accuracy R for test data based on index and prediction periods
Prediction period Algorithm Accuracy R (in %)
EGX-30 EGX-30-Capped EGX-50-EWI EGX-70 EGX-100 NIlE

7 days BR 99.96030 98.65720 99.93980 99.74940 99.94210 99.89450


lM 99.94490 98.30510 99.90610 99.86040 99.95290 99.88570
SCG 99.91200 94.64870 99.87450 99.80640 99.81150 99.75600
15 day BR 99.95570 87.25750 99.91370 99.71410 99.94980 99.83190
lM 99.95000 90.32050 99.93630 99.82340 99.95040 99.88070
SCG 99.91680 97.89390 99.86260 99.73910 99.78350 99.74170
30 day BR 99.95450 96.76850 99.90070 99.82040 99.94560 99.81010
lM 99.95380 97.34790 99.88760 99.86340 99.94840 99.86530
SCG 99.88580 98.72820 99.79420 99.27050 99.87880 99.59380

architecture setting for the training algorithm. (2) The most configurations in the field of stock price prediction.
favorable behavior of a specially constructed NARX model Therefore, authors recommend the proposed results to be
is dependent upon the exogenously designated time delay tested and applied to other similar nonlinear systems that
that is especially important for the initial prediction, the model other type of similar networks in the field of stock
selection of time points for training, validation, or testing price prediction which is previously mentioned in Table 9,
that may lead to either different fitting performance for the and in other different fields such as photovoltaic power
known objects during training or different prediction per- [12], social contagion [74], gas flow equation [75], and
formance for unknown objects outside of training. (3) In elasticity [76] which could provide and improve solutions
the case of too small number of neurons in the hidden for those systems.
layer, NARX may result in inappropriate generalization
ability or the chances of overfitting when dealing with
highly nonlinear dynamic mapping. This may not produce 6 Conclusion
better forecasts and perform false fitting of the known
instances in the training process. (4) In the absence of The high nonlinearity and volatility of financial time series,
specific criteria and scenario-based selection, the optimal including stock market, make prediction a paramount
determination of NARX architectural elements is a critical problem in machine learning paradigm. In this study, we
and difficult task. examined methods like BR, lM, and SCG to train the
The results of this study suggest that there is significant NARX network for predicting the return of the Egyptian
predictive accuracy which can be achieved when employ- Stock Exchange (EGX) indices (EGX-30, EGX-30-Cap-
ing the proposed NARX model with the predefined ped, EGX-50-EWI, EGX-70, EGX-100, and NIlE). We

123
5984 Neural Computing and Applications (2021) 33:5965–5987

R=0.99945 R=0.98305
1
Actual Fit Predicted Actual Fit Predicted

Predicted ~= 1*Actual + -0.00098


0.9 0.98

Predicted ~= 1.1*Actual + -0.1


0.8
0.96

0.7
0.94
0.6

0.92
0.5

0.4 0.9

0.3
0.88

0.2
0.86
0.1

0.84
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.84 0.86 0.88 0.9 0.92 0.94 0.96 0.98
Actual Actual

(a) Correlation Coefficient R on EGX-30. (b) Correlation Coefficient R on EGX-30-Capped.


R=0.99906 R=0.9986
1 1
Actual Fit Predicted
Actual Fit Predicted
0.9 0.9
Predicted ~= 1*Actual + -0.0013

Predicted ~= 1*Actual + 0.00072


0.8 0.8

0.7 0.7

0.6 0.6

0.5 0.5

0.4 0.4

0.3 0.3

0.2 0.2

0.1 0.1

0.2 0.4 0.6 0.8 1 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Actual Actual

(c) Correlation Coefficient R on EGX-50-EWI. (d) Correlation Coefficient R on EGX-70.


R=0.99953 R=0.99886
1
Actual Fit Predicted Actual Fit Predicted
0.9
0.9
Predicted ~= 1*Actual + 0.0014
Predicted ~= 0.99*Actual + 0.001

0.8
0.8

0.7 0.7

0.6 0.6

0.5 0.5

0.4 0.4

0.3 0.3

0.2 0.2

0.1 0.1

0
0 0. 2 0. 4 0. 6 0.8 0. 2 0. 4 0. 6 0. 8 1
Actual Actual

(e) Correlation Coefficient R on EGX-100. (f) Correlation Coefficient R on NIlE.

Fig. 11 Seven-day-ahead correlation coefficient (R) regression plots Most of the subfigures show R value equal to 0.99 or above, except
provide a clear vision about the model accuracy and how prediction is EGX-30-Capped, which gives R value equal to 0.98; therefore,
close to actual. Figure shows that the fit is very good for all datasets. prediction accuracy is high

123
Neural Computing and Applications (2021) 33:5965–5987 5985

Table 9 Comparative study with the state-of-the-art methods based on accuracy in average
Reference Data Technique Measure Accuracy (%) in Average

[19] Tunisia Stock NARX MSE, R 95%


[22] BSE, DJIA, NASDAQ, ACRNN Average, BSE = 81.6% , DJIA = 76.8% , NASDAQ = 73.6%
FTSE, TAIEX, STD, FTSE =81.2%, TAIEX = 88.36%,
S&P 500, lSE POCID S&P 500 = 85.33% , lSE = 84.6%
[25] Reliance Private limited ANN MSE, MAPE Tick data = 99.9% 15-min = 97.36%
[26] NASDAQ BPNN MSE, RSquare 96.22%
[28] S&P 500 Index ETF (SPY) ANN MSE, confusion 78%
matrix
[35] Guangdong enterprises, BPNN MSE BP-MGD = 84%, BP-CGC = 83.6%, BP-BR =
Shenzhen 85.20%
[38] KOSPI200, S&P 500 RNN MSE, MAPE, MAE KOSPI200 = 98.64%, S&P 500 = 98.05%
[41] NSE, NYSE RNN MAPE NSE = 91.44%, NYSE = 92.84%
[66] NYSE and Relational Stock MSE, MRR NYSE = 98%,
NASDAQ Ranking (RSR) , IRR NASDAQ = 71%
[67] Yahoo! Finance State Frequency Average Square N/A
Memory (SFM)- Error
RN
[68] Istanbul Stock Exchange (ISE) ANN Accuracy 75.74%
[69] CNX Nifty and S&P Bombay ANN Accuracy 86.69%
Stock Exchange (BSE) Sensex
EGX-70, EGX-30, NARX MSE, R EGX-70 = 99.78%, EGX-30 = 99.93%
Current EGX-50-EWI , NIlE, EGX-50-EWI = 99.89%, NIlE = 99.83%
Study EGX-100,EGX-30-Capped EGX-100 = 99.93%, EGX-30-Capped = 96.59%

compared the prediction performance of the different Compliance with ethical standards
models developed according to the training algorithms
individually. The empirical results showed that the pro- Conflict of interest The authors declare that they have no conflict of
interest.
posed models could successfully predict the stock market
returns with slight difference in accuracy for most of the
time periods. For the BR, lM, and SCG training algorithms, References
we conducted an experiment with all datasets. We then
adjusted the parameter settings to compare with other 1. Das SR, Mishra D, Rout M (2019) Stock market prediction using
prediction models. Considering the accuracy level of BR firefly algorithm with evolutionary framework optimized feature
model, BR outperformed lM and SCG in short-term pre- reduction for oselm method. Expert Syst Appl X 4:100016
2. Jin Z, Yang Y, Liu Y (2019) Stock closing price prediction based
diction for 3-days ahead. In addition, lM achieved better on sentiment analysis and LSTM. Neural Comput Appl p 1–17
results than BR and SCG in long-term prediction for 7-days 3. Armano G, Marchesi M, Murru A (2005) A hybrid genetic-neural
ahead. In our future work, we will try to add some technical architecture for stock indexes forecasting. Inf Sci 170(1):3–33
indicators to the proposed data in order to measure the 4. Mishra S, Padhy S (2019) An efficient portfolio construction
model using stock price predicted by support vector regression.
efficiency of using technical indicators in the prediction In: The North American Journal of Economics and Finance,
process and developed model will be a hybrid approach p 101027
using recent metaheuristic algorithms for NARX network 5. Tkáč M, Verner R (2016) Artificial neural networks in business:
parameters training. two decades of research. Appl Soft Comput 38:788–804
6. Esfahanipour A, Aghamiri W (2010) Adapted neuro-fuzzy
inference system on indirect approach tsk fuzzy rule base for
Acknowledgements The authors would like to thank Minia Univer-
stock market analysis. Expert Syst Appl 37(7):4742–4748
sity for supporting this research. This research is also partially sup-
7. Sadaei HJ, Enayatifar R, lee MH, Mahmud M (2016) A hybrid
ported by University of Electronic Science and Technology of China
model based on differential fuzzy logic relationships and impe-
(UESTC) and National Natural Science Foundation of China (NSFC)
rialist competitive algorithm for stock market forecasting. Appl
under the Grant No. 61772120.
Soft Comput 40:132–149

123
5986 Neural Computing and Applications (2021) 33:5965–5987

8. Shi L, Teng Z, Wang L, Zhang Y, Binder A (2018) Deepclue: 27. Zahra B, Lazaar M (2019) Integration of principal component
visual interpretation of text-based deep stock prediction. IEEE analysis and recurrent neural network to forecast the stock price
Trans Knowl Data Eng 31(6):1094–1108 of casablanca stock exchange. Procedia Comput Sci 148:55–61
9. Bai Y, Jin X, Wang X, Su T, Kong J, Lu Y (2019) Compound 28. Zhong X, Enke D (2017) Forecasting daily stock market return
autoregressive network for prediction of multivariate time series. using dimensionality reduction. Expert Syst Appl 67:126–139
Complexity, 2019 29. Patel J, Shah S, Thakkar P, Kotecha K (2015) Predicting stock
10. Sheremetov I, Cosultchi A, Martı́nez-Muñoz J, Gonzalez-Sán- market index using fusion of machine learning techniques. Expert
chez A, Jiménez-Aquino MA (2014) Data-driven forecasting of Syst Appl 42(4):2162–2172
naturally fractured reservoirs based on nonlinear autoregressive 30. Hushani P (2019) Using autoregressive modelling and machine
neural networks with exogenous input. J Petrol Sci Eng learning for stock market prediction and trading. In: Third
123:106–119 International Congress on Information and Communication
11. Wunsch A, liesch T, Broda S (2018) Forecasting groundwater Technology, pp 767–774. Springer
levels using nonlinear autoregressive networks with exogenous 31. labde S, Patel S, Shukla M (2017) Time series regression model
input (NARX). J Hydrol 567:743–758 for prediction of closing values of the stock using an adaptive
12. louzazni M, Mosalam H, Khouya A (2020) A non-linear auto- narx neural network. Int J Comput Appl 158(10):29–35
regressive exogenous method to forecast the photovoltaic power 32. Pawar K, Jalem RS, Tiwari V (2019) Stock market price pre-
output. Sustain Energy Technol Assess 38:100670 diction using LSTM RNN. In: Emerging Trends in Expert
13. Delcroix B, le Ny J, Bernier M, Azam M, Qu B, Venne J-S Applications and Security, pp 493–503. Springer
(2020) Autoregressive neural networks with exogenous variables 33. Bhowmick A, Rahman A, Rahman RM (2019) Performance
for indoor temperature prediction in buildings. In: Building analysis of different recurrent neural network architectures and
Simulation, pp 1–14. Springer classical statistical model for financial forecasting: A case study
14. Zhou F, Alsaid A, Blommer M, Curry R, Swaminathan R, on dhaka stock exchange. In: Computer Science On-line Con-
Kochhar D, Talamonti W, Tijerina L, Lei B (2020) Driver fatigue ference, pp 277–286. Springer
transition prediction in highly automated driving using physio- 34. Kim T, Kim HY (2019) Forecasting stock prices with a feature
logical features. In: Expert Systems with Applications, p 113204 fusion lstm-cnn model using different representations of the same
15. Saadon A, Abdullah J, Muhammad NS, Ariffin J (2020) Devel- data. PloS ONE 14(2):e0212320
opment of riverbank erosion rate predictor for natural channels 35. Cao J, Wang J (2019) Exploration of stock index change pre-
using NARX-QR factorization model: a case study of Sg. Ber- diction model based on the combination of principal component
nam, Selangor, Malaysia. Neural Comput Appl pp. 1–11 analysis and artificial neural network. Soft Comput, pp 1–10
16. Kumar J, Saxena D, Singh AK, Mohan A (2020) Biphase adap- 36. Naik N, Mohan BR (2019) Study of stock return predictions using
tive learning-based neural network model for cloud datacenter recurrent neural networks with LSTM. In: International confer-
workload forecasting. Soft Comput, pp 1–18 ence on engineering applications of neural networks, pp 453–459.
17. Yu P, Yan X (2019) Stock price prediction based on deep neural Springer
networks. Neural Comput Appl, pp 1–20 37. Jadhav S, Dange B, Shikalgar S (2018) Prediction of stock market
18. Das D, Sadiq AS, Mirjalili S, Noraziah A (2017) Hybrid clus- indices by artificial neural networks using forecasting algorithms.
tering-gwo-narx neural network technique in predicting stock In: International conference on intelligent computing and appli-
price. In: Journal of Physics: Conference Series, volume 892, cations, pp 455–464. Springer
page 012018. IOP Publishing, 38. Baek Y, Kim HY (2018) Modaugnet: A new forecasting frame-
19. Matkovskyy R, Bouraoui T (2019) Application of neural net- work for stock market index value with an overfitting prevention
works to short time series composite indexes: evidence from the lstm module and a prediction lstm module. Expert Syst Appl
nonlinear autoregressive with exogenous inputs (narx) model. 113:457–480
J Quant Econ 17(2):433–446 39. Pang X, Zhou Y, Wang P, Lin W, Chang V (2018) An innovative
20. Araújo RdeA, Nedjah N, Oliveira A lI, Silvio Rdel (2019) A deep neural network approach for stock market prediction. J Super-
increasing–decreasing-linear neural network for financial time comput, pp 1–21
series prediction. Neurocomputing 347:59–81 40. Hu H, Tang L, Zhang S, Wang H (2018) Predicting the direction
21. Chong E, Han C, Park FC (2017) Deep learning networks for of stock markets using optimized neural networks with google
stock market analysis and prediction: methodology, data repre- trends. Neurocomputing 285:188–195
sentations, and case studies. Expert Syst Appl 83:187–205 41. Hiransha M, Gopalakrishnan EA, Menon VK, Soman KP (2018)
22. Nayak SC, Misra BB, Behera HS (2017) Artificial chemical Nse stock market prediction using deep-learning models. Proce-
reaction optimization of neural networks for efficient prediction dia Comput Sci 132:1351–1362
of stock market indices. Ain Shams Eng J 8(3):371–390 42. Shen G, Tan Q, Zhang H, Zeng P, Jianjun X (2018) Deep learning
23. Pradeepkumar D, Ravi V (2017) Forecasting financial time series with gated recurrent unit networks for financial sequence pre-
volatility using particle swarm optimization trained quantile dictions. Procedia Comput Sci 131:895–903
regression neural network. Appl Soft Comput 58:35–52 43. Balaji AJ, Ram DSH, Nair BB (2018) Applicability of deep
24. Göçken M, Özçalıcı M, Boru A, Dosdoğru AT (2019) Stock price learning models for stock price forecasting an empirical study on
prediction using hybrid soft computing models incorporating bankex data. Procedia Comput Sci 143:947–953
parameter tuning and input variable selection. Neural Comput 44. Qiu M, Song Y, Akagi F (2016) Application of artificial neural
Appl 31(2):577–592 network for the prediction of stock market returns: the case of the
25. Selvamuthu D, Kumar V, Mishra A (2019) Indian stock market japanese stock market. Chaos Solitons Fractals 85:1–7
prediction using artificial neural networks on tick data. Financial 45. Jin L, Li S, Hu B (2017) Rnn models for dynamic matrix
Innovat 5(1):16 inversion: a control-theoretical perspective. IEEE Trans Ind Inf
26. Moghaddam AH, Moghaddam MH, Esfandyari M (2016) Stock 14(1):189–199
market index prediction using artificial neural network. J Econ 46. Lin T-N, Giles CL, Horne BG, Kung S-Y (1997) A delay damage
Finance Admin Sci 21(41):89–93 model selection algorithm for narx neural networks. IEEE Trans
Signal Process 45(11):2719–2730

123
Neural Computing and Applications (2021) 33:5965–5987 5987

47. lipu MSH, Hannan MA, Hussain A, Saad MHM, Ayob A, 63. Tong S, Sun K, Sui S (2017) Observer-based adaptive fuzzy
Blaabjerg F (2018) State of charge estimation for lithium-ion decentralized optimal control design for strict-feedback nonlinear
battery using recurrent narx neural network model based lighting large-scale systems. IEEE Trans Fuzzy Syst 26:569–584
search algorithm. IEEE Access 6:28150–28161 64. Zhang J, Yin Z, Wang R (2017) Nonlinear dynamic classification
48. Haykin S (1994) Neural networks: a comprehensive foundation. of momentary mental workload using physiological features and
Prentice Hall PTR, Upper Saddle River NARX-model-based least-squares support vector machines. IEEE
49. Buevich A, Sergeev A, Shichkin A, Baglaeva E (2020) A two- Trans Hum–Mach Syst 47:536–549
step combined algorithm based on NARX neural network and the 65. Xiao Z, Jing X, Cheng L (2013) Parameterized convergence
subsequent prediction of the residues improves prediction accu- bounds for Volterra series expansion of NARX models. IEEE
racy of the greenhouse gases concentrations. Neural Comput Trans Signal Process 61:5026–5038
Appl 1–11 66. Feng F, He X, Wang X, Luo C, Liu Y, Chua TS (2019) Temporal
50. Møller MF (1990) A scaled conjugate gradient algorithm for fast relational ranking for stock prediction. ACM Trans Inf Syst
supervised learning. Aarhus University, Computer Science (TOIS) 37:1–30
Department 67. Zhang L, Aggarwal C, Qi G-J (2017) Stock price prediction via
51. Aburaed N, Atalla S, Mukhtar H, Al-Saad M, Mansoor W (2019) discovering multi-frequency trading patterns. In: Proceedings of
Scaled conjugate gradient neural network for optimizing indoor the 23rd ACM SIGKDD international conference on knowledge
positioning system. In: 2019 International Symposium on Net- discovery and data mining: 2141–2149
works, Computers and Communications (ISNCC), pp 1–4. IEEE 68. Kara Y, Boyacioglu MA, Baykan ÖK (2011) Predicting direction
52. MacKay DJC (1992) Bayesian interpolation. Neural Comput of stock price index movement using artificial neural networks
4(3):415–447 and support vector machines: the sample of the Istanbul Stock
53. Jonathon T (2013) A bayesian regularized artificial neural net- Exchange. Expert Syst Appl 38:5311–5319
work for stock market forecasting. Expert Syst Appl 69. Patel J, Shah S, Thakkar P, Kotecha, K (2015) Predicting stock
40:5501–5506 and stock price index movement using trend deterministic data
54. Taqvi SA, Tufa LD, Zabiri H, Maulud AS, Uddin F (2018) Fault preparation and machine learning techniques. Expert Syst Appl
detection in distillation column using NARX neural network. 42:259–268
Neural Comput Appl 1–17 70. Wang J, Wang J (2016) Forecasting energy market indices with
55. Buitrago J, Asfour S (2017) Short-term forecasting of electric recurrent neural networks: case study of crude oil price fluctua-
loads using nonlinear autoregressive artificial neural networks tions. Energy 102:365–374
with exogenous vector inputs. Energies 10(1):40 71. Cheng F, Fan T, Dandan F, Shanling L (2018) The prediction of
56. Demuth H, Beale M, Hagan M (1992) Neural network toolbox. oil price turning points with log-periodic power law and multi-
For Use with MATlAB. The MathWorks Inc, 2000 population genetic algorithm. Energy Econ 72:341–355
57. liu G, Wang X (2019) A new metric for individual stock trend 72. Hatcher WG, Yu W (2018) A survey of deep learning: Platforms,
prediction. Eng Appl Artif Intell 82:1–12 applications and emerging research trends. IEEE Access
58. Orimoloye LO, Sung M-C, Ma T, Johnson JEV (2020) Com- 6:24411–24432
paring the effectiveness of deep feedforward neural networks and 73. leCun Y, Bengio Y, Hinton G (2015) Deep learning. Nature
shallow architectures for predicting stock price indices. Expert 521:436–444
Syst Appl 139:112828 74. D O’Brien J, Dassios LK, Gleeson JP (2019) Spreading of memes
59. levenberg K (1944) A method for the solution of certain non- on multiplex networks. New J Phys 21:025001
linear problems in least squares. Q Appl Math 2(2):164–168 75. Ekhtiari A, Dassios L, Liu M, Syron E (2019) A novel approach
60. Marquardt DW (1963) An algorithm for least-squares estimation to model a gas network. Appl Sci 9:1047
of nonlinear parameters. J Soc Ind Appl Math 11(2):431–441 76. Dassios L, O’Keeffe G, Jivkov AP (2018) A mathematical model
61. Box GEP, Jenkins GM, Reinsel GC, Ljung GM (2015) Time for elasticity using calculus on discrete manifolds. Math Methods
series analysis: forecasting and control. Wiley, New York Appl Sci 41:9057–9070
62. Schmidhuber J (2015) Deep learning in neural networks: an
overview. Neural Netw 61:85–117 Publisher’s Note Springer Nature remains neutral with regard to
jurisdictional claims in published maps and institutional affiliations.

123

You might also like