A Quick Gbest Guided Artificial Bee Colony Algorithm for Stock Market Prices Prediction

The objective of this work is to present a Quick Gbest Guided artificial bee colony (ABC) learning algorithm to train the feedforward neural network (QGGABC-FFNN) model for the prediction of the trends in the stock markets. As it is quite important to know that nowadays, stock market prediction of trends is a significant financial global issue. The scientists, finance administration, companies, and leadership of a given country struggle towards developing a strong financial position. Several technical, industrial, fundamental, scientific, and statistical tools have been proposed and used with varying results. Still, predicting an exact or near-to-exact trend of the Stock Market values behavior is an open problem. In this respect, in the present manuscript, we propose an algorithm based on ABC to minimize the error in the trend and actual values by using the hybrid technique based on neural network and artificial intelligence. The presented approach has been verified and tested to predict the accurate trend of Saudi Stock Market (SSM) values. The proposed QGGABC-ANN based on bio-inspired learning algorithm with its high degree of accuracy could be used as an investment advisor for the investors and traders in the future of SSM. The proposed approach is based mainly on SSM historical data covering a large span of time. From the simulation findings, the proposed QGGABC-FFNN outperformed compared with other typical computational algorithms for prediction of SSM values.


Introduction
In the new global world, it has been a universal goal to make one's life stress-free and to prepare oneself for upcoming challenges without any pressure.A fundamental concept in society is that wealth brings comfort and luxury, so it is not surprising that there has been so much research done on ways to predict the stock market values.It is due to the global issues such as increasing of population, transportation, water problems, and business [1].Furthermore, the absence of suitable predicting tools makes it more attractive to researchers.A stock market is a community market for trading the company's shares daily at the approved stock price, which depends upon the demand and supply gap, quality, region, and global environment as well.Therefore, stock market prediction trend is a significant issue in finance for all developed countries.SSM has a key role for the economic development of many countries such as Egypt, India, Bangladesh, Pakistan, Philippines, China, Japan, America, United States, Afghanistan, and Indonesia.

Neural Networks and Saudi Stock Market
A stock market is a public market for the trading of company stock and derivatives at an agreed price, volume, and quality; these are securities listed on a stock exchange as well as those only traded privately [1].It is also called secondary market, as it involves trading between two investors, the public regulatory body and private investors [25].SSM is the economic hub of different countries especially for Asian and Gulf regions [26].Therefore, the prediction is an essential part of the economy in the KSA for shareholders and investors to estimate the stock values price and select the best trading opportunity accurately among different profitable organizations in advance.
Neural networks (NNs) are powerful soft-computing forecasting tools that predict different stock market values [27].It is the non-linear mathematical model used to map past and future values of time series datasets for the purpose of analysis of upcoming trends.The originality of the ANNs lies in their ability to determine nonlinear relationships in the input data set without a prior assumption of the knowledge of mapping between the input and the output patterns in different areas of knowledge like computer science, social studies research, engineering, biology, and mathematical sciences [23,25].ANN tools are very famous for classification and prediction tasks of financial time series datasets, especially of stock exchange market values due to their unpredictable behaviors [22].
For KSA stock exchange prediction, none of the traditional time series methods has proved to be consistently correct prediction tools investors would like to have.However, machine learning methods have been successfully used for Saudi stock exchange values prediction.For example, genetic fuzzy systems (GFS) and ANN used to construct a stock price forecasting expert system have obtained high accuracy for Airlines and IT centers [21].The three well-known feature selection methods, which are Principal Component Analysis, GA, and decision trees with BP algorithm, were used for better prediction the stock price for investors.Neuro-Fuzzy Inference System was used for stock exchange analysis.GA with feed-forward neural network (FFNN) was used to predict stock market prices [28].BPNN and GA were used for SSM to predict the direction of daily price changes, however, due to slow convergence speed and trapping in local minima [22].
Multilayer Perceptron (MLP), which is also known as an FFNN, was introduced by F. Rosenblatt for solving non-linear XOR classification problems and was then successfully applied to different science and engineering problems [29].MLP is highly used and tested with financial problems such as in stock exchange market prediction.It consists of physical components called neurons, and the connection between them [30].The basic architecture of MLP with one input, two hidden and one output layers is shown in Figure 1.
Symmetry 2018, 10, x FOR PEER REVIEW 3 of 15 public regulatory body and private investors [25].SSM is the economic hub of different countries especially for Asian and Gulf regions [26].Therefore, the prediction is an essential part of the economy in the KSA for shareholders and investors to estimate the stock values price and select the best trading opportunity accurately among different profitable organizations in advance.
Neural networks (NNs) are powerful soft-computing forecasting tools that predict different stock market values [27].It is the non-linear mathematical model used to map past and future values of time series datasets for the purpose of analysis of upcoming trends.The originality of the ANNs lies in their ability to determine nonlinear relationships in the input data set without a prior assumption of the knowledge of mapping between the input and the output patterns in different areas of knowledge like computer science, social studies research, engineering, biology, and mathematical sciences [23,25].ANN tools are very famous for classification and prediction tasks of financial time series datasets, especially of stock exchange market values due to their unpredictable behaviors [22].
For KSA stock exchange prediction, none of the traditional time series methods has proved to be consistently correct prediction tools investors would like to have.However, machine learning methods have been successfully used for Saudi stock exchange values prediction.For example, genetic fuzzy systems (GFS) and ANN used to construct a stock price forecasting expert system have obtained high accuracy for Airlines and IT centers [21].The three well-known feature selection methods, which are Principal Component Analysis, GA, and decision trees with BP algorithm, were used for better prediction the stock price for investors.Neuro-Fuzzy Inference System was used for stock exchange analysis.GA with feed-forward neural network (FFNN) was used to predict stock market prices [28].BPNN and GA were used for SSM to predict the direction of daily price changes, however, due to slow convergence speed and trapping in local minima [22].
Multilayer Perceptron (MLP), which is also known as an FFNN, was introduced by F. Rosenblatt for solving non-linear XOR classification problems and was then successfully applied to different science and engineering problems [29].MLP is highly used and tested with financial problems such as in stock exchange market prediction.It consists of physical components called neurons, and the connection between them [30].The basic architecture of MLP with one input, two hidden and one output layers is shown in Figure 1.If we assume weights vector to be w, x is the vector of inputs, b is the bias, and f is the activation function then the output through MLP neurons is computed, mathematically, as ( ) Here, the most commonly-used hidden neuron activation function is the sigmoid function which is given by Equation (2).
( ) If we assume weights vector to be w, x is the vector of inputs, b is the bias, and f is the activation function then the output through MLP neurons is computed, mathematically, as Symmetry 2018, 10, 292 Here, the most commonly-used hidden neuron activation function is the sigmoid function which is given by Equation (2).
During the process, sometimes the supervised learning problem of the MLP failed to train the ANN effectively and cannot solve the given complex problems in an efficient way.Furthermore, the conventional algorithms methods trapped in local minima due to suboptimal weight values, wrong number of parameters selection, unsuitable network structure, and the fully random method of training as well.In order to overcome it, bio-inspired learning algorithms have been proposed for MLP such as ABC, ACO, and CS.Here, in these approaches, Artificial Neural network (ANN) has the ability to adjust itself according to the given information while the evolutionary algorithm is captured to find the global or near to global solution to the problem.Thus, we have incorporated the idea of the EAs into the present study and proposed a new updated efficient method based on honeybees' intelligent behaviors, which are used to guide the ANN with enough suitable control parameters.The presented algorithm was used here to train and test MLP for SSM prices prediction of different business organizations.

Bees-Inspired Learning Algorithms
A rich source of inspiration is nature, which has motivated many researchers to develop a nature-inspired approach for solving complex problems.Therefore, from the last decade, bio-inspired algorithms have become famous due to natural behaviors and efficient results.Hybridization of these algorithms, either with typical computational or bio-inspired approaches, have become more popular.These are DE [8], HS [9], GA [10], PSO [11], ABC [12,13,24], and some hybrid algorithms [14,15,31,32].These algorithms, also called general swarm intelligence, work based on some successful characteristics of a biological system such as bees, birds, fishes, animals, etc.ABC algorithm is developed by Dervish Karaboga based on honey bees' behavior [33].Details of ABC and its different variants are given in the following sections.

Artificial Bee Colony (ABC) Algorithm
ABC is one of the most attractive bio-inspired algorithms developed for solving complex science and engineering problems [13] which simulate the foraging behavior of honey bees.It is characterized in the group of meta-heuristic algorithms.In this algorithm, the characteristics of bees are divided into three aspects namely employed, onlooker, and scout bees.During the process, exploitation process is carried out by the employed and onlooker bees while scout bees are used for the exploration process through the following strategy, as given in Equation (3).
where V ij represents the number of new solutions in the neighbourhood of x ij for the employed bees, k is a solution in the neighbourhood of i, and θ is a random number in the range [−1, 1].
Although the ABC algorithm is famous due to its robustness and high efficiency for clustering, classification, and numerical function optimization problems, due to the exploitation of the same approach, finding the optimal solution is not guaranteed; as well, sometimes it is trapped in local minima.The researchers improved the typical ABC algorithm by using different strategies such as gbest-guided and quick-within employed, onlookers, and scout bees.

Gbest Guided Artificial Bee Colony (GGABC) Algorithm
The sufficient and balanced amount of exploration and exploitation process can increase the performance of the bio-inspired algorithms, especially of the ABC approach is used.The optimal global solution can be easily archived through the strong exploration and exploitation process in a given region.GGABC algorithm is the improved version of typical ABC, which uses the PSO global best process to increase the exploitation amount similar to exploration [24].Therefore, Zhu and Kwong [24] had merged the global best approach of PSO in the typical ABC algorithm for finding and selecting the best solution in the defined population.In GGABC algorithm, Equation (3) has been modified as, where y j is the gbest solution of the population, The value of C can balance the exploitation ability.For more details, we refer to Ref. [24].

Quick Artificial Bee Colony (QABC) Algorithm
QABC algorithm [18] is an extension of the standard ABC which simulates the gbest intelligent foraging behavior of honey bees.In standard ABC algorithm, the employed and the onlooker bees both updates with the same Equation ( 3) to determine the new solutions.However, in [18] authors have updated it by modifying the onlooker bees' phase with Equation ( 6), where X best N m represents the best solution among the neighbors of X m and itself (N m ).For more details, we refer to Ref. [18].

The Proposed: Quick Gbest Guided Artificial Bee Colony Algorithm
The typical ABC is an efficient bio-inspired algorithm for solving the wide range of complex science and engineering problems [12,13,24].Although it is easy to understand and implement, sometimes it is trapped in local minima due to poor exploration and exploitation process.The ABC employed bee phase has been improved through the gbest guided approach called GGABC, as mentioned in Section 3.2; it has successfully improved the performance of employed and onlooker bees with the same exploiting strategy.However, the scout bees section still used the same ABC random selected method.Later on, Karaboga modified the typical ABC onlooker bees' selection phase though Equation ( 6); however, the employed bees section did not modify for strong exploitation process [18].Furthermore, sometimes the typically employed bee section was unable to reach global optima.Here, taking the advantages of a quick onlooker section with guided employed bees combined for strength and balance in exploration and exploitation processes.Therefore, Equation (3) will replace guided employed bees for increasing the exploitation process as: In this guided approach, the guided employed bees section refers to the exploration of the best food sources in the various unknown regions in the solution space to reach to the global optimum.This method will no longer use random ways to find new suboptimal candidate solutions, but it will use the PSO global best (gbest) solution to guide the search for best candidate solutions.Therefore, the exploitation amount will be increased through the gbest term for the new candidate solution towards the best food sources, where the amount of exploration and exploitation can be balanced through the best value of parameter C. Equation (3) of the typical ABC algorithm is also used by the onlooker bees section, which gets a candidate solution through employed bees' dancing behaviors.Onlooker bees do not have their own strategy to explore best food sources to reach global optima.Therefore, the typical onlooker bees will use the quick search strategy instead of following employed bees blindly.Equation (3) for the onlooker section will be modified as, On the other hand, the new solution is generated using Equation ( 9).
Step 2: Compute the fitness values.
Step 4: Repeat from step 2 to step 14.
Step 5: Produce new solutions V ij in the neighbourhood of x ij using Equation (7).
Step 6: Apply the Greedy Selection process.
Step 7: Calculate the probability values p i for the solutions x i using Equation (10).
where f it i is defined as, Step 8: Apply greedy selection.
Step 9: Select the solution x i based on p i and generate the new solutions V best N m,i for the quick onlookers by Equation (8).
Step 10: For an abandoned source, if it exists, and replaces it with a new solution using Equation (9).
Step 11: Memorize the best solution achieved so far.
Step 12: Cycle = cycle + 1 Step 13: Until cycle = Maximum Cycle Number (MCN) Therefore, the way to get the best generalization results for financial time series datasets set on prediction task is to apply the proposed QGGABC algorithm with enough of a number of cycles, input, and hidden nodes that can achieve the best food source position or solutions (i.e., network weights) corresponding to the best testing set performances.Also, discovering and selecting the best area and solution within the suitable size of colony can have a big effect on the simulation results.The proper selection of these parameters values can increase the effectiveness of the proposed method during training and testing phases as well.
Step 9: Select the solution xi based on pi and generate the new solutions for the quick onlookers by Equation ( 8).
Step 10: For an abandoned source, if it exists, and replaces it with a new solution using Equation (9).
Step 11: Memorize the best solution achieved so far.

Experimental Evaluation and Analysis
In this research, financial time series dataset of SSM was used for one-step-ahead prediction of the year 2015 and 2016.The financial time series are stationary which can be used in the original form for prediction tasks.Here, the SMM parameter named price, which is the average of open, low, high and closing price, will be used for prediction of the next value versus time.The financial time series datasets chosen for prediction purposes are Saudi Telecom Company (STC), Al Rajhi Bank, Zain mobile communication company, Saudi Arabian Projects Company (SAPCO), and Almarai Company.The details of the dataset are given in Table 1 as:  The stopping criterion for the above-mentioned algorithm is 2000 MCN.The best average simulation results using all learning algorithms for SSM price prediction are given from Tables 3-7 and Figures 3-8, respectively.In Table 3, the MSEs for training data set are presented by using proposed QGGABC and typical GGABC, ABC, and QABC algorithms.From the simulation results on all SSM price dataset, the QGGABC obtained minimum MSE during training phase except on Al Rajhi price.The QABC had less error than all above-mentioned algorithms.The typical algorithm QABC outperformed ABC and GGABC algorithms on all datasets in terms of MSE training as it is given in Table 3.
In terms of MSE testing, the ABC reached 1.10 × 10 −4 , 2.01 × 10 −4 , 1.99 × 10 −4 , 1.90 × 10 −5 , and 7.99 × 10 −5 for STC, Zain, Almarai, SAPCO, and Al Rajhi prices, respectively.The improved GGABC-FFNN, QABC-FFNN MSE testing reached 9.89 × 10 −5 , 1.52 × 10 −5 , 1.11 × 10 −4 , 9.30 × 10 −5 , 1.12 × 10 −6 and 9.00 × 10 −5 , 9.99 × 10 −6 , 9.20 × 10 −6 , 1.00 × 10 −7 , 9.99 × 10 −7 , respectively.Thus, we conclude that the proposed QGGABC-FFNN obtained the minimum MSE for STC, Zain, Almarai, SAPCO stock prices.On the other hand, the average SNR, NMSE, accuracy, and success rates are given in Tables 5-8, respectively.From this table, it is seen that in terms of SNR and NMSE, the best values were obtained by the proposed QGGABC for STC, Zain, Almarai, SAPCO dataset, while QABC outperformed better for Al Rajhi dataset.The GGABC and ABC obtained enough SNR and NMSE values for all dataset prices predictions.However, in term of accuracy, the proposed QGGABC got higher accuracy than other algorithms except on Al Rajhi dataset where QABC reached a high accuracy of 98.81.Through the quick and gbest guided exploitation and exploration strategies, the proposed method achieved the highest accuracy compared to QABC and GGABC algorithms.Furthermore, the average success rate of 10 runs, ABC, QABC, and QGGABC got 100% success rate for STC dataset, while QGGABC and QABC got 100% on Almarai prices prediction as given in Table 8.Finally, it has been observed from the Tables 5-8 that the proposed QGGABC offered better results than the conventional learning method for most of the financial time series signals using the MSE, NMSE, Accuracy, success rate, and the SNR measures.This clearly indicates that the FFNN structure trained by the QGGABC algorithm have provided the network with memory and hence better prediction with improvement in terms of the SNR, Accuracy, and Error.
Using the above learning techniques adjusts the weights of each connection in order to reduce the training error for the SSM prediction task.After repeating this process for a sufficiently large number of training cycles, the network will usually converge to some state where the error of the calculations is small with high prediction performance.In this case, one says that the network has learned a particular target function.The QGGABC converged faster than others during the training phase for STC price prediction as shown in Figure 4.The ABC, GGABC, and QABC did not converge quickly on STC price datasets for the prediction task.
To ensure the capability of the proposed and standard learning algorithms, the predicted data and actual data were compared to see the performance of the algorithms.Figures 4-8 show the prediction for STC, Almarai, Zain, and Al Rajhi prices time series.The ABC, GGABC, and QABC did not succeed to predict the future prices of STC, Almarai, Zain, and Al Rajhi accurately, while the proposed QGGABC obtained the efficient and close prediction level for all these datasets through different ANN structures, as shown in Figures 6, 7 and 9.
MSE, NMSE, Accuracy, success rate, and the SNR measures.This clearly indicates that the FFNN structure trained by the QGGABC algorithm have provided the network with memory and hence better prediction with improvement in terms of the SNR, Accuracy, and Error.
Using the above learning techniques adjusts the weights of each connection in order to reduce the training error for the SSM prediction task.After repeating this process for a sufficiently large number of training cycles, the network will usually converge to some state where the error of the calculations is small with high prediction performance.In this case, one says that the network has learned a particular target function.The QGGABC converged faster than others during the training phase for STC price prediction as shown in Figure 4.The ABC, GGABC, and QABC did not converge quickly on STC price datasets for the prediction task.
To ensure the capability of the proposed and standard learning algorithms, the predicted data and actual data were compared to see the performance of the algorithms.Figures 4-8 show the prediction for STC, Almarai, Zain, and Al Rajhi prices time series.The ABC, GGABC, and QABC did not succeed to predict the future prices of STC, Almarai, Zain, and Al Rajhi accurately, while the proposed QGGABC obtained the efficient and close prediction level for all these datasets through different ANN structures, as shown in Figures 6, 7, and 9.   structure trained by the QGGABC algorithm have provided the network with memory and hence better prediction with improvement in terms of the SNR, Accuracy, and Error.
Using the above learning techniques adjusts the weights of each connection in order to reduce the training error for the SSM prediction task.After repeating this process for a sufficiently large number of training cycles, the network will usually converge to some state where the error of the calculations is small with high prediction performance.In this case, one says that the network has learned a particular target function.The QGGABC converged faster than others during the training phase for STC price prediction as shown in Figure 4.The ABC, GGABC, and QABC did not converge quickly on STC price datasets for the prediction task.
To ensure the capability of the proposed and standard learning algorithms, the predicted data and actual data were compared to see the performance of the algorithms.Figures 4-8 show the prediction for STC, Almarai, Zain, and Al Rajhi prices time series.The ABC, GGABC, and QABC did not succeed to predict the future prices of STC, Almarai, Zain, and Al Rajhi accurately, while the proposed QGGABC obtained the efficient and close prediction level for all these datasets through different ANN structures, as shown in Figures 6, 7, and 9.   Figures 3 and 4 shows the learning curves where the network trained for STC prices prediction by a conventional and proposed method with the various numbers of control and learning parameters.In terms of convergence, the QGGABC quickly converged based on the optimal weight values of FFNN when compared with other algorithms on STC dataset as shown in Figure 4 and Figure 11.Figures 5-9 show the original and predicted signals for STC, Almarai, Zain, and Al Rajhi using the FFNN for stationary data using one-step-ahead prediction.rtFigures 3 and 4 shows the learning curves where the network trained for STC prices prediction by a conventional and proposed method with the various numbers of control and learning parameters.In terms of convergence, the QGGABC quickly converged based on the optimal weight values of FFNN when compared with other algorithms on STC dataset as shown in Figures 4 and 11.Figures 5-9 show the original and predicted signals for STC, Almarai, Zain, and Al Rajhi using the FFNN for stationary data using one-step-ahead prediction.The proposed method has successfully reached the global optima in the quickest best manner and sufficient exploring and exploiting processes.The trained network obtained the best food sources/weight values for the prediction task.Overall, the performance of the QGGABC algorithm is higher than conventional bio-inspired methods such as ABC, QABC, and QGGABC in time series dataset prediction.

Conclusions
The objective of this paper is to present a new hybrid algorithm to train and test the ANN for stock exchange market values prediction by using the ABC technique.Under it, we develop a Quick Gbest Guided ABC learning algorithm to train a feedforward neural network (QGGABC-FFNN) model for the prediction of the trends in the stock markets.The presented approach has been verified and tested to predict the accurate trend of Saudi Stock Market (SSM) values.In the proposed process, the effective amount of exploitation and exploration strategies are increased through gbest guided bee and quick bee strategy.From the presented study, it is observed that the performance of the proposed success is high with fast convergence, high success rate, high accuracy, and maximum SNR values as compared to the other existing algorithms.Based on these computed results and analysis, the investors or analyst can easily understand how the market would behave if the SSM price varied at different times and in different environments as well.Thus, by observing their behavior, system analysts may choose future prediction well in time with high accuracy in order to save money, risk, and time.In the future, the proposed algorithm can be extended to the different applications with the different datasets for various tasks [34][35][36].Also, some multi-objective optimization problems may be solved in the future with the presented algorithm or its variants [37][38][39].On learning phase of QGGABC algorithm converged quickly (around 70 cycles), while QABC failed to converge quickly on Al Rajhi prices, as shown in Figure 11 below.
The proposed method has successfully reached the global optima in the quickest best manner and sufficient exploring and exploiting processes.The trained network obtained the best food sources/weight values for the prediction task.Overall, the performance of the QGGABC algorithm is higher than conventional bio-inspired methods such as ABC, QABC, and QGGABC in time series dataset prediction.

Conclusions
The objective of this paper is to present a new hybrid algorithm to train and test the ANN for stock exchange market values prediction by using the ABC technique.Under it, we develop a Quick Gbest Guided ABC learning algorithm to train a feedforward neural network (QGGABC-FFNN) model for the prediction of the trends in the stock markets.The presented approach has been verified and tested to predict the accurate trend of Saudi Stock Market (SSM) values.In the proposed process, the effective amount of exploitation and exploration strategies are increased through gbest guided bee and quick bee strategy.From the presented study, it is observed that the performance of the proposed success is high with fast convergence, high success rate, high accuracy, and maximum SNR values as compared to the other existing algorithms.Based on these computed results and analysis, the investors or analyst can easily understand how the market would behave if the SSM price varied at different times and in different environments as well.Thus, by observing their behavior, system analysts may choose future prediction well in time with high accuracy in order to save money, risk, and time.In the future, the proposed algorithm can be extended to the different applications with the different datasets for various tasks [34][35][36].Also, some multi-objective optimization problems may be solved in the future with the presented algorithm or its variants [37][38][39].

Figure 2 .
Figure 2. Flowchart of the proposed QGGABC algorithm.Figure 2. Flowchart of the proposed QGGABC algorithm.

Figure 2 .
Figure 2. Flowchart of the proposed QGGABC algorithm.Figure 2. Flowchart of the proposed QGGABC algorithm.

Figure 3 .
Figure 3. Learning Curves of ABC and GGABC algorithms on STC dataset during training phase.

Figure 4 .
Figure 4. Learning Curves of QABC and QGGABC algorithms on STC dataset during training phases.

Figure
Figure Learning Curves of ABC and GGABC algorithms on STC dataset during training phase.

Figure 3 .
Figure 3. Learning Curves of ABC and GGABC algorithms on STC dataset during training phase.

Figure 4 .
Figure 4. Learning Curves of QABC and QGGABC algorithms on STC dataset during training phases.Figure 4. Learning Curves of QABC and QGGABC algorithms on STC dataset during training phases.

Figure 4 .
Figure 4. Learning Curves of QABC and QGGABC algorithms on STC dataset during training phases.Figure 4. Learning Curves of QABC and QGGABC algorithms on STC dataset during training phases.

Figure 5 .
Figure 5. Best Prediction Curves (training and testing) of ABC algorithm on STC prices.Figure 5. Best Prediction Curves (training and testing) of ABC algorithm on STC prices.

Figure 5 .
Figure 5. Best Prediction Curves (training and testing) of ABC algorithm on STC prices.Figure 5. Best Prediction Curves (training and testing) of ABC algorithm on STC prices.

Figure 5 .
Figure 5. Best Prediction Curves (training and testing) of ABC algorithm on STC prices.

Figure 6 .
Figure 6.Prediction Curves (training and testing) of ABC and GGABC algorithms on Almarai prices.

Figure 7 .
Figure 7. Best Prediction Curves (training and testing) by QGGABC algorithm for Zain stock prices.

Figure 6 .
Figure 6.Prediction Curves (training and testing) of ABC and GGABC algorithms on Almarai prices.

Figure 5 .
Figure 5. Best Prediction Curves (training and testing) of ABC algorithm on STC prices.

Figure 6 .
Figure 6.Prediction Curves (training and testing) of ABC and GGABC algorithms on Almarai prices.

Figure 7 .
Figure 7. Best Prediction Curves (training and testing) by QGGABC algorithm for Zain stock prices.Figure 7. Best Prediction Curves (training and testing) by QGGABC algorithm for Zain stock prices.

Figure 7 . 15 Figure 8 .
Figure 7. Best Prediction Curves (training and testing) by QGGABC algorithm for Zain stock prices.Figure 7. Best Prediction Curves (training and testing) by QGGABC algorithm for Zain stock prices.Symmetry 2018, 10, x FOR PEER REVIEW 12 of 15

Figure 9 .
Figure 9. Prediction Curves of ABC and QABC algorithms on Al Rajhi prices.

Figures 7 , 8 ,
Figures 7, 8, and 10 present the effect of the parameters quick and gbest-guided on Zain and Al Rajhi future values prediction, respectively.From the above tables values and figures, the performance of the proposed QGGABC algorithm successfully reached minimum training and testing prediction error, fast convergence, high success rate, high accuracy and maximum SNR values on STC, Zain, SAPCO, and Almarai stock prices.Based on the above simulation results (Figures 7, 8, 10 and 11), the proposed QGGABC algorithm has the capability to predict accurate future SSM prices.

Figure 8 . 15 Figure 8 .
Figure 8. Prediction Curves (training and testing) of ABC and QGGABC algorithms on Zain dataset.

Figure 9 .
Figure 9. Prediction Curves of ABC and QABC algorithms on Al Rajhi prices.

Figures 7 , 8 ,
Figures 7, 8, and 10 present the effect of the parameters quick and gbest-guided on Zain and Al Rajhi future values prediction, respectively.From the above tables values and figures, the performance of the proposed QGGABC algorithm successfully reached minimum training and testing prediction error, fast convergence, high success rate, high accuracy and maximum SNR values on STC, Zain, SAPCO, and Almarai stock prices.Based on the above simulation results (Figures 7, 8, 10 and 11), the proposed QGGABC algorithm has the capability to predict accurate future SSM prices.

Figure 9 .
Figure 9. Prediction Curves of ABC and QABC algorithms on Al Rajhi prices.

Figures 7 ,
Figures 7, 8 and 10 present the effect of the parameters quick and gbest-guided on Zain and Al Rajhi future values prediction, respectively.From the above tables values and figures, the performance

Figure 9 .
Figure 9. Prediction Curves of ABC and QABC algorithms on Al Rajhi prices.

Figures 7 , 8 ,
Figures 7, 8, and 10 present the effect of the parameters quick and gbest-guided on Zain and Al Rajhi future values prediction, respectively.From the above tables values and figures, the performance of the proposed QGGABC algorithm successfully reached minimum training and testing prediction error, fast convergence, high success rate, high accuracy and maximum SNR values on STC, Zain, SAPCO, and Almarai stock prices.Based on the above simulation results (Figures 7, 8, 10 and 11), the proposed QGGABC algorithm has the capability to predict accurate future SSM prices.

Figure 10 .
Figure 10.Prediction Curves (training and testing) of proposed QGGABC on Al Rajhi prices.

Figure 11 .
Figure 11.Learning Curves of QABC and QGGABC algorithms on Al Rajhi prices during training.

Table 1 .
SSM preprocessing time series dataset for prediction.different hidden and input nodes with single output node of SSM price.The network setting for all data types of different bio-inspired learning algorithms are detailed in

Table 2 .
Setting of FFNN topologies, algorithm parameters, and SSM parameter.To evaluate the performance of the proposed QGGABC algorithm, results compare ABC, Gbest Guided ABC (GGABC), and QABC algorithms by Mean Square Error (MSE), Standard Deviation of MSE, Normalized Mean Square Error (NMSE), success rate, and accuracy.

Table 3 .
Average MSE training for SSM price prediction.

Table 4 .
Average MSE out of samples for SSM price prediction.

Table 5 .
Average SNR on out of sample data for SSM price prediction.

Table 7 .
Average accuracy for SSM price prediction.

Table 8 .
Success rate of all learning algorithms for SSM price prediction.