17

Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

Scientia Iranica E (2021) 28(1), 395{411

Sharif University of TechnologyScientia Iranica

Transactions E: Industrial Engineeringhttp://scientiairanica.sharif.edu

Development of an ensemble learning-based intelligentmodel for stock market forecasting

M.T. Faghihi Nezhada and B. Minaei Bidgolib,*

a. Department of Information Technology, Faculty of Engineering, Payame Noor University, Tehran, Iran.b. Faculty of Computer Engineering, Iran University of Science and Technology, Tehran, Iran.

Received 27 January 2018; received in revised form 28 March 2019; accepted 2 September 2019

KEYWORDSForecasting thedirection of pricemovement;Ensemble learning;Bagging;Forecasting stockprice;Evolutionarycomputing;Intelligent tradingsystem.

Abstract. The use of arti�cial intelligence-based models has shown that the market ispredictable despite its uncertainty and unstable nature. The most important challenge ofthe proposed models in the stock market is to ensure high accuracy of results and highforecasting e�ciency. Another challenge, which is a prerequisite for making decisions andusing the results of the forecast for pro�tability of transactions, is to forecast the trend ofstock price movements in forecasting price targets. To overcome the mentioned challenges,this paper employs Ensemble Learning (EL) model using intelligence-based learnersand metaheuristic optimization methods to maximize the improvement of forecastingperformance. In addition, to take into account the direction of price changes in stockprice forecasting, a two-stage structure is used. In the �rst stage, the next movementof the stock price (increase or decrease) is forecasted and its outcome is then employedto forecast the price in the second stage. In both stages, Genetic Algorithm (GA) andParticle Swarm Optimization (PSO) are used to optimize the aggregation results of thebase learners. The evaluation results of stock market dataset show that the proposedmodel has higher accuracy than other models used in the literature.

© 2021 Sharif University of Technology. All rights reserved.

1. Introduction

Accurate forecasting of stock market behavior is invalu-able for traders in this market. So, forecasting �nancialtime series is an important and challenging problem [1],in which researchers try to extract hidden patterns toforecast the future behavior of the market [2].

Improvement of forecasting performance and ac-curate results is the main challenge of the stock market[3,4]. The second challenge in forecasting models is thelack of attention to the stock price trend (the direction

*. Corresponding author.E-mail addresses: [email protected] (M.T. FaghihiNezhad); b [email protected] (B. Minaei Bidgoli)

doi: 10.24200/sci.2019.50353.1654

of stock price movement) [5]. The investor shouldaccurately forecast price changes (increase or decrease)for trading. Most of the proposed models in this areahave been developed for price forecasting. In the abovestudies, forecasting performance was evaluated basedon such criteria as Mean Absolute Percentage Error(MAPE) and Root Mean Square Error (RMSE) [6{9].These criteria facilitate the evaluation of the proximityof the forecasted price to the real price; however, theyare not able to evaluate the model ability to forecastthe stock price trends.

To illustrate the price concept and the directionof price movement, Apple stock price and the directionof its stock price movement are depicted in Figure 1 for15 consecutive days from 6/16/2017 to 7/7/2017.

To determine the importance of forecasting thedirection of price movement shown in Figure 1, consider

Page 2: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

396 M.T. Faghihi Nezhad and B. Minaei Bidgoli]/Scientia Iranica, Transactions E: Industrial Engineering 28 (2021) 395{411

Figure 1. The price and direction of the price movement.

the price on the fourth day at 145.87$. A traderpredicts the price target of 145.9$, implying that hepredicts an increment in price for the next (�fth) day.He opens a buy position while the real price on thenext day would be $145.63 (lower than predicted) andhe would face a loss in the trade. The main reasonfor such a loss in this trade is that forecasting thedirection of price movement was wrong in the �rstplace, while the price forecasting was only subject to0.18% error.

To avoid similar losses occurring again, it is nec-essary to forecast the price by forecasting the directionof the stock price movement. To overcome the twoabove-mentioned challenges, the proposed model usesan Ensemble Learning (EL) algorithm equipped withintelligent-based models and meta-heuristic techniqueto maximize the quality of the prediction results.

Moreover, a two-stage structure is used to takeinto account the direction of price movement in priceforecasting. In the �rst stage, the next direction of theprice movement (increase or decrease) is forecasted andit is used for forecasting the price in the second stage.To the best of our knowledge, this is the �rst studythat has considered both the direction of the stock pricemovement and the stock price itself simultaneously soas to forecast the stock price.

The rest of the paper is organized as follows.In Section 2, the predictability of the stock marketand various models in stock market forecasting are re-viewed. In Section 3, a two-stage procedure is proposedbased on EL using intelligence-based models. Theproposed model is evaluated and thoroughly comparedto other models in Section 4 and experimental resultsare then presented in this section. Finally, conclusionsare given in Section 5.

2. Literature review

There are two main hypotheses about forecasting stockmarket:

1. All available information is fully re ected by themarket prices, according to \e�cient market hy-pothesis" and instability in prices is then consideredbased on the results of new information. Accordingto this hypothesis, it is impossible to earn higherreturns through intelligent stock selection methodsor other forecasting techniques, and the only way todo so is selecting stocks with high risks or by chance[10]. In an e�cient market, if the expectationsand knowledge of all market participants are wellre ected in prices, price uctuations cannot beforecasted;

2. Another hypothesis that is compatible with the ef-�cient market hypothesis is \Random Walk (RW)"according to which the trend of volatilities in stockmarket prices is random and thus cannot be fore-casted. However, some recent studies have rejectedthe RW behavior of stock prices [11]. Also, theapplication of arti�cial intelligence in �nancial �eldshas reinforced the idea that the market might not bealways e�cient and one can forecast future pricesbased on historical data using various techniques[12,13]. Since the nature of the �nancial timeseries is fundamentally complex, noisy, dynamic,nonlinear, non-parametric, and chaotic [13], thestock market forecasting is a challenging issue forresearchers [1,14].

There are di�erent approaches to forecasting stockmarket using historical data. One way is to generallycategorize the approaches into \linear" and \nonlinear"techniques, while another approach considers them as\statistical" and \machine learning" [15]. Among thesecategories, intelligent and classical ones are suitable.According to the classical forecasting approach, itis assumed that the future price value follows thelinear trend of the past values. Autoregressive MovingAverage (ARIMA), Autoregressive Conditional Het-eroscedasticity (GARCH), and regression belong to theclassical class. Arti�cial Neural Networks (ANNs),

Page 3: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

M.T. Faghihi Nezhad and B. Minaei Bidgoli]/Scientia Iranica, Transactions E: Industrial Engineering 28 (2021) 395{411 397

fuzzy logic, Support Vector Machines (SVMs), EL,and meta-heuristic algorithms all belong to intelligenttechniques [9,15]. These methods, unlike the classicones, are capable of obtaining a nonlinear relationshipbetween input variables without having informationabout the statistical distribution of these inputs.

2.1. Intelligent modelsThe intelligent models used for time series forecastinghave some advantages and disadvantages [16]. Theconducted comparisons show that intelligent modelscan overcome the limitations of linear models, in whichthey can extract a pattern better from data with higherforecasting accuracy [9,17]. In recent years, most ofthe studies conducted over forecasting stock markethave focused on intelligent models [18]. These modelsfor stock market forecasting can be divided into threegroups: single models, hybrid models, and EL models,as shown in Figure 2.

The �rst group in Figure 2 uses a single model forforecasting and it is of two types:

1. The models that employ one technique;2. The models that use multiple techniques to forecast.

According to the studies conducted by Atsalakis andValavanis [43] Tk�a�c and Verner [18] among di�erentintelligent models, ANN techniques have been appliedmore than other techniques due to their better perfor-mance [18]. The ANNs were used in these researchesto forecast the stock price [23] or the direction of stockprice movement [2]. Despite the complexity of stockmarket forecasting, it is shown that ANNs with onlya hidden layer can model such a complex system withacceptable accuracy.

Although the application of ANNs has promoted

the forecasting accuracy more than the classical mod-els, there are some obstacles in this regard such asgetting stuck in local optimum and over-�tting, whichmake the forecasting accuracy challengeable [15]. Oneof the suitable approaches to improving forecastingaccuracy is using multi-technique models. For example,the ANNs combined with meta-heuristic algorithmsare ordinarily employed to overcome the mentionedproblems and improve Neural Network (NN) training[21,22,29]. Another approach is applying Neuro-fuzzytechniques equipped with meta-heuristic algorithms[24,28].

The second group in Figure 2 is called hybridforecasting models that combine di�erent single modelsfor attaining results with higher accuracy. By integrat-ing the ANN as a nonlinear technique with ARIMAas a linear method, one can enjoy their advantages[31]. Also, a hybrid model comprising RW for exploringlinear patterns and two NN models for uncoveringnon-linear patterns were proposed in [34]. Tsai andChiou [33] achieved higher forecasting accuracy with acombination of ANN and Decision Tree (DT) models.Wang et al. [14] proposed a hybrid model combiningExponential Simple Model (ESM), ARIMA, and Back-Propagation Neural Network (BPNN), in which theweight of each single model was determined by theGenetic Algorithm (GA). Andrawis et al. [37] combinedcomputational intelligence and linear models with suchmethods as mean, trimmed mean, and winsorizedmean. In these types of research, hybrid modelswere compared with the existing single models in theliterature and the obtained results demonstrated thatsuch combined models could outperform single modelsin forecasting accuracy [6,9,32,36].

The third group in Figure 2 comprises the models

Figure 2. Classi�cation of intelligent models.

Page 4: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

398 M.T. Faghihi Nezhad and B. Minaei Bidgoli]/Scientia Iranica, Transactions E: Industrial Engineering 28 (2021) 395{411

based on the EL algorithm. These algorithms belong tothe computational intelligence approach that integratesa set of base learners into a single model [44]. It is alsoshown that the necessary and suitable conditions foran ensemble learner to achieve higher accuracy thanbase learners depend on the accuracy and diversityof categorizing the members. Here, \accuracy" im-plies \better than random prediction" and \diversity"means that the learners make uncorrelated errors.

Tsai et al. [12] examined two types of ensem-bles, i.e., `homogeneous' and `heterogeneous' classi�erensembles, for prediction accuracy of stock returns.The results indicated that the homogeneous multipleclassi�ers using NNs outperformed single classi�ers.Lin et al. [16] proposed the RF-based Extreme LearningMachine (ELM) ensemble model to achieve accuracy,stability, and e�ciency simultaneously in time seriesforecasting. Ballings et al. [41] investigated the perfor-mance of ensemble methods against single models inthe stock forecasting and suggested that novel studiesin this domain should include ensemble algorithms.

By considering the natural complexity, instability,and noisiness of the stock market forecasting problem,it is required that several computing techniques beintegrated synergistically rather than exclusively [45].By exploring the literature, one can obviously �nd thatEL algorithms have better performance than singlemodels for a wide range of applications and di�erentscenarios. Their results are more accurate, reliable,and stable [12,16,37,38].

2.2. Problem de�nitionBy introducing various methods, researchers attemptto demonstrate the ability of the proposed models toincrease the accuracy of stock market forecasting. Ac-cording to the results of the conducted literature reviewin this research, the ensemble learning algorithms aremore accurate, reliable, and stable in forecasting thestock market. Therefore, the proposed forecastingmodel should use EL algorithms to maximize theperformance of the predictive result. In addition, to usethe results of a stock market forecasting model in a realenvironment and generate pro�t, the direction of pricemovement in price forecasting should be considered(Figure 3).

In Figure 3, Apple's stock price is displayed alongwith the two-price forecast. The calculated MAPE forthe �rst forecast is 0.46%. The price on the secondday is 146.34 and the forecasted price for the thirdday is 146.6. Since the price is forecasted to increase,the trader takes the buying position, while the realprice on the third day will be 145.01, which leads toa loss of $1.3. According to this forecast, a loss of$5.9 in 14 days will eventually occur based on dailytrading. The calculated MAPE for the second forecastis 0.87, which is almost 90% more than that of the �rstforecast; however, a pro�t of $2.3 in 14 days will takeplace through daily trade based on this forecast. Thereason for such pro�tability is accurate forecasting ofthe direction of stock price movement and the priceforecast itself. While in the �rst forecast, as it can be

Figure 3. The real price besides two forecasted price tags.

Page 5: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

M.T. Faghihi Nezhad and B. Minaei Bidgoli]/Scientia Iranica, Transactions E: Industrial Engineering 28 (2021) 395{411 399

observed in Figure 3, the view is to follow a sequenceof the previous movements.

The proposed model in this research comprises atwo-stage structure to solve the mentioned problem. Inthe �rst stage, the direction of the stock price move-ment (increase or decrease) is forecasted and its resultwill be used so as to forecast the price in the secondstage. The model also employs EL through intelligent-based models as well as meta-heuristic algorithms inboth stages that can maximize the performance of theforecasted results.

3. Development of an intelligentensemble-based model for stock priceforecasting

Various studies that have applied training methodsshow that no speci�c, ideal training algorithm canbe awless in all predictions. To overcome such anobstacle, EL algorithms have been developed to a largeextent so as to reduce the error, which is the mainmotivation for their development.

The basic assumption about this methodology isthat in EL, the probability of prediction error in an un-known sample is much lower than that in an individualmodel. In comparison with common machine learningmethods that try to learn a hypothesis from trainingdata, in EL models, several learners are trained toattain the greatest possible accuracy and also, they tryto construct a set of hypotheses and compositions [46].The learners used in EL are called base learners. TheEL algorithm, which is a combination of base learners,has better accuracy than the individual models [38].The general rule in EL systems is that the results ofthe base learners are di�erent from each other as muchas possible. This diversity can be obtained in di�erentways. In this regard, one can mention the four followingproposed methods:

1. Using di�erent training datasets for training thebase learner by resampling methods in which thesub-set of the original training data is selectedrandomly and will be replaced by the originaltraining dataset;

2. To ensure that the boundaries are di�erent whileusing di�erent training data, unstable models areused as base models because they can make di�erentdecision boundaries, even with fewer changes intheir training parameters [47];

3. Another way to ensure diversity in parameters isto use di�erent models. For example, a set ofmulti-layer perceptron NNs can be trained withinitial weights, a number of layers and nodes,di�erent error criteria, and so on. Consideringsuch parameters can control the instability of theindividual models and ultimately, diversify them.

The ability to control unstable ANNs has becomethe ideal feature of EL algorithms;

4. By using di�erent features, the input space isdivided into di�erent subsets of original featuresthat might overlap and each subset is given to amodel as an input. By using this method, everybase learner explores some part of knowledge andalso, the diversity of features makes EL algorithmsyield better results.

Bagging as one of the simplest EL algorithms is o�eredto improve the performance of prediction models, whilethe combinative strategy of base learners in them is themajority vote. Diversity in bagging is made throughthe bootstraps that are randomly selected and replacedby the original training data. Each bootstrap is used totrain a learner of the same type. Failure to use unstablepredictors could lead to almost identical predictorsthat no longer make improvements in e�ciency of theindividual predictor. For the same reason, in bagging,unstable learning models like DT and ANNs are verye�cient and e�ectively used because small changes indata can cause large changes to the prediction result[47]. After training di�erent base learners, to achieve�nal prediction, the obtained results of all learners arecombined to predict an instance with di�erent meth-ods. In the simple weighted mean method, the weightsof all learners are the same for producing the �nalresult of an instance. The weight of each learner in theweighted mean method for �nal forecast is determinedbased on the accuracy of the training step and then, itis compared to other learners. The e�ect of each learneron the result of the �nal forecast can be consideredas an optimization problem. The objective of thisoptimization problem is to determine the best weightsfor each learner such that the prediction accuracy ofthe test data is maximized. In this research, two well-known meta-heuristic algorithms, i.e., Particle SwarmOptimization (PSO) and GA, are employed to tacklethis optimization problem.

3.1. The proposed modelThe existing challenge of models, as presented in theprevious sections, was their failure to pay attentionto stock price and direction of the price movement,simultaneously. To tackle such di�culty, in thissubsection, a new stock price forecasting model isintroduced by considering the price and direction ofprice movement, concurrently. The proposed modelincludes two interdependent stages. First, the di-rection of price change is forecasted and added toother features as a new characteristic and this newdataset is then used for the forecast later on. Tomaximize the classi�cation accuracy (forecasting thedirection of price movement) in the �rst stage, thebagging algorithm, as a kind of EL algorithms, is

Page 6: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

400 M.T. Faghihi Nezhad and B. Minaei Bidgoli]/Scientia Iranica, Transactions E: Industrial Engineering 28 (2021) 395{411

used, while this algorithm is employed in the secondstage to maximize the regression accuracy (the priceforecasting). The results of the base models should beas much diverse as possible so as to achieve appropriateaccuracy. The diversity is attained using di�erenttraining datasets for each model. Diverse datasets areobtained by resampling the subset of the training datarandomly through replacement. In addition, the NNthat can create di�erent decision boundaries, even withlow deviations in training parameters, is used as thebase models. The aggregation of the results is carriedout in four ways: optimization with GA, optimizationwith PSO, weighted aggregation based on the weightof each model obtained by the accuracy of the trainingdata, and aggregation result with equal weights for eachmodel. The best way to aggregate the base model isopted based on the accuracy.

3.1.1. The �rst stage (forecasting the direction ofprice movement)

In the �rst stage, the direction of the next stock pricemovements is forecasted. Most of the time series datain the stock market are non-stationary and trendy,which reduces the accuracy of forecasting stock market.The data must be as much de-trended and stationaryas possible so that the hidden pattern in the series canbe extracted more accurately [48]. Di�erentiation andlogarithmic conversion can discover much knowledgefrom the data. The �rst di�erence in the time seriescreates a new time series whose values are di�erentfrom the two successive values of the initial time seriesincluding the series of changes from one period to thenext:

rxt = xt � xt�1; (1)

where xt denotes the value of the time series xt inperiod t and the �rst di�erence of xt in period t isxt � xt�1. By di�erencing the initial series, a newtime series is obtained. The elements of the initial timeseries are stock prices, while the elements of the newtime series are price changes.

The value of x in period t is auto-correlated withrespect to its value in earlier periods, where the nthelement of the series with k lag is added to the modelas input and the (n + 1)th element is then predicted.This value is considered as the price change in thenext period. In the proposed model, the price dataclose to the values of the previous days are assignedas the initial inputs and with their di�erentiation, thenew series is created. The output of the model is thedi�erence between the \closed" price of today and thatof the previous day.

Data preparation and formation of new time seriesare performed, in which the value of the new timeseries is obtained by a one-time di�erence betweentwo successive elements of the initial series and the

number of k lagged of that. Then, the new dataset isdivided into \training" and \test" data groups. If therecords contained in the dataset N are assumed, theN bootstraps are created through N times of samplingwith replacement in training data. One NN is createdand is trained N times through N bootstraps untilN base models are obtained. In the following, thetraining data are added to each of the trained basemodels and the output is compared with the targetoutput to determine the forecasting accuracy of thebase model. If the forecasting accuracy is betterthan random forecasting (greater than 0.5), then theoutput of this model is maintained and the results (theforecasted direction of price movement) are added tothe matrix result. After applying the training data toall trained models and completing the matrix of results,this matrix is aggregated using four methods and thebest weight vector for the combination of the trainedmodels is then obtained.

The results are aggregated using four methods:Simple Average Aggregation (SAV), Weighted AverageAggregation (WAV), GA, and PSO. Then, the methodsthat could determine the weights with highest accuracyare �nally selected.

By considering the importance weight of thelearner for the �nal performance, as already explained,obtaining the weights is de�ned as an optimizationproblem. In the following, the weight of each modelis attained using PSO explained. Every particle in thisalgorithm is de�ned as a weight vector for combiningthe learners to compute the �nal output. Therefore,every particle of a vector equals the dimensions of anumber of learners obtained in the previous steps. Theweights and initial velocities are determined randomlyfor each particle. In the following, the performance(accuracy) of each particle (weights of the base learn-ers) is calculated. The performance of each particleimplies the performance of the learner in teamworkto reach the least possible error for all the trainingdata obtained by particle-related weight combination.For example, for a particle with 0.5, 0.3, and 0.2weights, the learner for a speci�c sample yields 59, 65,and 62 as outputs; therefore, the �nal output will be61:4 = 0:5�59 + 0:3�65 + 0:2�62. A complete updateof the group of particles is made based on the bestpersonal and group experiences with a certain numberof iterations. Finally, the best particle in the lastiteration is used as the �nal weight for the combinationof the base models.

In addition to PSO algorithm, GA is employedfor obtaining the optimal weights of the base models.In this algorithm, each chromosome is considered asone weight vector. The number of genes concernedwith each chromosome is equal to that of base modelsobtained in the previous steps. The initial weightsare randomly generated in each chromosome. Then,

Page 7: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

M.T. Faghihi Nezhad and B. Minaei Bidgoli]/Scientia Iranica, Transactions E: Industrial Engineering 28 (2021) 395{411 401

Figure 4. The implementation process of the �rst stage of the proposed model.

chromosomes are arranged based on their performance(exactly similar to PSO). To generate the next genera-tion, the selection is conducted through the roulettewheel mechanism. Besides, the canonical two-pointcrossover and two-point mutation are applied over theselected parents. In the last iteration, after sorting thechromosomes based on their accuracy in determiningthe direction of price movement (their �tness) for alltraining data, the best one is selected as the �nal weightfor the base learner combination.

WAV is another method for training the outputmatrix aggregation. Firstly, the accuracy level of eachmatrix column (forecast a base model) is calculated toforecast the target vector of training. The accuracyof each base model is divided by total accuracy, whilethe coe�cient of each matrix column is obtained in theoptimal combination vector. SAV is the simple averageof the base models' output for aggregation of the resultswith equal weights.

The implementation process of the �rst stage ofthe proposed model is shown in Figure 4.

3.1.2. The second stage (price forecasting)Following the termination of the model's �rst stage, itsoutput, i.e., the direction of price upward/downwardmovement in the stock market, is obtained. In thesecond stage, by adding this feature to the existing ones(new dataset), a model is trained with a new datasetand the best combination of the lags is chosen throughtrial and error and it is then used as the input of thesecond stage.

The applied techniques in this stage are to someextent conceptually similar to the �rst stage and, yet,di�erent in usage. The evaluation criteria for base

models and aggregation methods in this stage aredi�erent, where instead of evaluating the accuracy ofthe results in correctly forecasting the direction of pricemovement, the accuracy evaluation in forecasting priceis carried out through MAPE criterion. In this stage,the base models are trained using bootstraps and thenext-time price is then forecasted. Also, to improvethe accuracy and further assurance, the results of thebase models are aggregated using di�erent methodsand the method with the highest accuracy is �nallyselected.

In the second stage, initially, a new dataset iscreated by adding the feature taken from the previousstage; then, the (near) optimal lag is selected by trialand error. Then, the new dataset is divided into\training" and \test" data and after that, N bootstrapsare created from the training dataset.

One NN is created and later, it is trained withN bootstraps until N trained base models are learned.Training data are applied to all trained models andtheir output is added to the training output matrix.According to the EL algorithm mentioned in the pre-vious section, the results are aggregated through fourmethods, where the best vector is ultimately chosen.

The aggregation methods of results in this stageare the same as those in the previous stage. Theonly di�erence is the criterion used for evaluating andselecting the optimal weight of the vectors in thematrix, which is MAPE. The same issue holds forthe algorithms used in this stage, where based on theresults of aggregation with PSO, each particle will beevaluated by MAPE criterion.

The process of implementing the second stage ofthe proposed model is depicted in Figure 5.

Page 8: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

402 M.T. Faghihi Nezhad and B. Minaei Bidgoli]/Scientia Iranica, Transactions E: Industrial Engineering 28 (2021) 395{411

Figure 5. The implementation process of the second stage of the proposed model.

Table 1. Descriptions of stock indices.

Stock index name From To Average Standarddeviation

Dow Jones Industrial Average Index (DJIA) March 7, 2001 August 26, 2003 9345.324 925.15

Taiwan Stock Exchange index (TSE) July 18, 2003 December 31, 2005 6070.557 1910.45

Tehran Prices Index (TEPIX) April 10, 2006 January 30, 2009 9991.631 973.63

Tehran Index of Top 50 Companies (TIT50C) April 10, 2006 January 30, 2009 16562.49 3715.06

Tehran Industry Index (TII) April 10, 2006 January 30, 2009 7869.937 834.69

Tehran Index of Financial Group (TIFG) April 3, 2006 January 30, 2009 20584.07 2383.53

4. Experimental results

In this section, the performance of the proposed modelis evaluated through several datasets including theintroduction of datasets, evaluation criteria, implemen-tation of the proposed model, and comparison resultsof the proposed model and other researches.

4.1. DatasetsIn order to compare the results of the proposed modeland the accredited papers, the same datasets in theliterature are used [22,24,27]. These data includedi�erent indices of the world's validated stock ex-changes, showing general price changes in the market.In this paper, Dow Jones Industrial Average (DJIA),Taiwan Stock Exchange (TSE), and Tehran Price Index(TEPIX) together with three other Tehran's indicesare investigated. Tehran Industry Index (TII) shows

the average changes in the stock price of operatingcompanies in the industrial sector; Tehran Index ofFinancial Group (TIFG) expresses the average changesin the stock price of operating companies in the �nan-cial sector; and the Tehran Index of Top 50 Companies(TIT50C) demonstrates the liquidity. The informationof di�erent indices is shown in Table 1.

4.2. Evaluation criteriaSince the objective of this paper is to improve the pre-diction of the direction of price movement and the priceitself simultaneously, the criteria used for evaluatingthe outcomes should measure these two standards. The�rst criterion used to compare the models is MAPE[6{8]. Accordingly, at �rst, the absolute di�erencebetween the real and predicted values is divided bythe real amount. Then, the outcome is divided by thenumber of total data. Eq. (2) shows how MAPE works,

Page 9: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

M.T. Faghihi Nezhad and B. Minaei Bidgoli]/Scientia Iranica, Transactions E: Industrial Engineering 28 (2021) 395{411 403

where yi and pi are the real and predicted amounts,respectively, and N is the number of data.

MAPE = 100� 1N

XN

i=1

yi � piyi

: (2)

The Prediction On Change In Direction (POCID)presented in Eqs. (3) and (4) shows the calculationof the direction change prediction. The accuracy ofthe model in the direction prediction of the pricemovement besides the proper prediction of the priceplays a leading role in gaining the pro�t. The POCIDcriterion ranges at the interval [0, 100]. The closerthe value of POCID to 100, the higher the predictionaccuracy [49].

POICD = 100� 1N

NXi=0

Di; (3)

Di =

(1; if (yi � yi�1)(pi � pi�1) > 00; otherwise

(4)

The third criterion is Theil's U statistic (Eq. 5), whichcompares the model performance with RW model. IfTheil's U is equal to 1, the model performance isequivalent to RW; however, if it is larger than 1, theperformance is worse than RW. Obviously, if it is lessthan 1, the performance of the proposed model is betterthan RW [9].

Di = U of Tail =PNi=1 (yi � pi)2PNi=1 (yi � yi+1)2 : (5)

The fourth used criterion in this study is AverageRelative Variance (ARV) shown in Eq. (6). If theaverage of the time series is used instead of theforecasted values, the accuracy does not change. Thevalue of this criterion, which is lower than 1 and closeto 0, indicates better forecasting accuracy [50].

ARV =PNi=1 (yi � pi)2PNi=1 (�y � pi)2 : (6)

4.3. Evaluation of the proposed modelResearches show that the input variables of stock priceare used in predictive models including price, technical,fundamental, and macroeconomic variables that can becategorized into di�erent groups [51]. One commoncategorization for input variables of stock forecastingmodels divides them into two types: the �rst type is theprice variables such as open, close, low, and high pricesas well as the volume and the number of trading in aperiod. The second type is the technical variables thatare derived from the price data using di�erent formulas.Some researchers have used the price variables [9], whilesome others have employed technical variables [2,6].

In the proposed model in this paper, the pricevariable is used. Each time series in Table 1 contains620 records, divided into two \training" and \test"data, of which 80% (500 records) are assigned totraining and the rest of 20% (120 records) to testing.Several papers have divided the data into the sametraining and testing and also compared their resultswith the results of this model [22].

The �nal output of the proposed model is thenext price forecasting owing to the price change ina trend. In the �rst stage that is responsible forspecifying the direction of the next price changes,the data added to the �rst stage of the model isdi�erentiated, in which the new data include pricechanges in two consecutive times.

In the proposed model, the base learners arecomposed of a three-layer feedforward NN, while thenumber of inputs is equal to that of used lags. Severalfactors in the model setting can a�ect the accuracyof the results, each of which has di�erent levels. Thesettings for training data include use/non-use of log-arithmic transformation, determining the percentageof validation dataset, the number of bootstraps, andamount of data used in each bootstrap as well as thenumber of inputs, the number of neurons, the trainingmethod, and the aggregation method of the results ofthe base learners. In this regard, combining all possiblescenarios and testing them require a long time. Tosolve this problem and reduce the number of tests,the Taguchi optimization method is employed [52].To do so, 32 di�erent modes are selected using theMinitab software and the model is then implementedto achieve the highest possible accuracy among thesecombinations. The models with the highest accuracy inthe training data are shown in Table 2 for each datasetand model settings.

The prediction output vector obtained from the�rst stage is added to other price variables to create anew input dataset for the second stage. In this stage,the learning model is repeated by changing its settings(similar to the �rst stage) to achieve the best results.

After training each individual model and their ag-gregation, the combination that has the best evaluationresult of the training data is selected. The test datawill then be added to the model and the model will beevaluated next. The evaluation results of the test dataalong with the settings that produced these results areshown in Table 3.

As shown in Table 3, using Dow Jones datasetyields an (near) optimal MAPE value, i.e., 1.126, when3 lags are used. Also, 9 neurons in base modelsand %0.05 of data from each bootstrap are used forvalidation. The number of bootstraps is 100 and WAVis used as the aggregation method of base models.Figure 6 shows a comparison between the real andforecasted values using the proposed model.

Page 10: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

404 M.T. Faghihi Nezhad and B. Minaei Bidgoli]/Scientia Iranica, Transactions E: Industrial Engineering 28 (2021) 395{411

Figure 6. Comparison of real and forecasted values in the proposed model.

Table 2. Results of the �rst implementation stage for the training data in the proposed model.

Data name DIJA TSE TEPIX TIT50C TII TIFG

Using logarithmic transformationp

{p

{ {p

The number of lag used 7 11 7 9 7 7Percentage of validation data 0.03% 0.05% 0.05% 0.03% 0.05% 0.03%The use amount of trainingdata in each bootstrap

90% 100% 100% 95% 95% 95%

The number of bootstraps 300 400 200 100 200 300The training method Traingdm Trainlm Trainlm Traingdm Trainlm TrainlmThe number of neurons 5 6 5 4 5 6The aggregation method PSO GA PSO PSO PSO PSOPercentage of correct forecasts ofthe price direction movement

73.1% 75.3% 76.4% 70.6% 80.7% 79.50%

Table 3. Results of the second implementation stage for the test data in the proposed model.

Data name DIJA TSE TEPIX TIT50C TII TIFGThe number of used lag 3 3 1 2 3 1Percentage of validation data 0.05% 0.03% 0.03% 0.03% 0.05% 0.05%Number of neurons in the neural network 9 9 7 9 7 5The use amount of data from each bootstrap 100% 95% 100% 100% 95% 100%The number of bootstraps 100 300 100 300 300 100The aggregation method WAV PSO GA WAV PSO PSOMAPE 1.126 0.659 0.37 0.368 0.286 0.31POCID 61.15 81 60.202 58.491 74.3 69.182U of Theil 0.518 0.494 0.552 0.483 0.588 0.672ARV 0.068 0.068 0.003 0.086 0.04 0.013

In this paper, for aggregation of the results in bothstages, two well-known meta-heuristic optimizationalgorithms are used, GA and PSO. Among di�erentsettings obtained through trial and error, the bestparameters are selected for each dataset, as shown inTable 4.

4.4. Comparison between the proposed modeland other models

The results of the proposed model are comparedwith the validated models reported in the literature[22,24,27], which have used the same datasets in the�eld of stock price forecasting with MAPE criterion.

Page 11: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

M.T. Faghihi Nezhad and B. Minaei Bidgoli]/Scientia Iranica, Transactions E: Industrial Engineering 28 (2021) 395{411 405

Table 4. The values of used parameters in employed meta-heuristic algorithms for each dataset.

Data DJIA TSE TEPIX Top 50companies

Industryindex

Financialgroup

Stage StageI

StageII

StageI

StageII

StageI

StageII

StageI

StageII

StageI

StageII

StageI

StageII

GA parameters

Population Size 150 150 200 200 200 200 200 150 150 200 200 200Crossover Rate 0.75 0.75 0.80 0.80 0.75 85.00 0.75 0.75 0.75 85.00 0.75 0.75Mutation Rate 0.15 0.15 0.08 0.08 0.10 0.13 0.10 0.10 0.10 0.13 0.15 0.15Number ofiterations

1500 1500 1000 1000 1500 2000 1500 1000 1000 2000 1500 1500

PSO parameters

C1 = C2 2 2 2 2 2 2 2 2 2 2 2 2

Number of particles 200 200 200 200 150 150 150 200 200 150 100 100

Number of iterations 1200 1000 700 700 800 700 800 700 600 500 600 500

Figure 7. Comparison of two models considering Mean Absolute Percentage Error (MAPE) criterion.

Table 5 shows the MAPE value of the proposed modeland the results of other models as well as their improve-ment percentage by the proposed model. According toTable 5, one can imply the superiority of the proposedmodel to other models in most cases.

Considering the price forecasting criteria and thedirection of price movement in stock market is one ofthe main advantages of the proposed model in thispaper. The obtained results are compared to thoseof Asadi's model [22], in which POICD criterion wasused to predict the changes in the same datasets.The comparison shown in Table 6 indicates that theproposed model outperforms Asadi's model in terms ofaccuracy.

The results of Theil's U evaluation show thatthe proposed model outperforms RW model in termsof ARV criterion in all datasets. By taking MAPEand POICD into account, the proposed model, inmost cases, has better forecasting accuracy than othermodels. The improved amount is shown in the imp%column of Table 6. For example, for Dow Jones dataset,MAPE values obtained from Asadi's model and the

proposed model in this research are 1.41 and 1.126,respectively, showing an 18% improvement in priceforecasting. However, the proposed model has madea 5% improvement in terms of the direction of pricemovement than this model.

Figures 7 and 8 show comparisons of six indicesbetween the proposed model and Asadi's model interms of MAPE and POCID criteria.

4.5. DiscussionAs mentioned earlier, forecasting models have beendivided into two groups: (a) price forecasting and(b) forecasting of the direction of price movement.In addition, it was clari�ed that the use of modelsforecasting the price regardless of price trends mightcause a loss in real trading despite having less error insome important criteria. This is also true for modelsconcerned only with forecasting the direction of pricemovement. Considerable e�ort has been made in thisresearch to propose a model for forecasting the pricewith emphasis on price trend, which is better than

Page 12: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

406 M.T. Faghihi Nezhad and B. Minaei Bidgoli]/Scientia Iranica, Transactions E: Industrial Engineering 28 (2021) 395{411

Table 5. Comparison of the results of the proposed model and other models

Dataset Model MAPE Improvement

Dow

Jones

Indust

rial

Ave

rage

index

(DJI

A)

ARIMA 10.23 88.99%

ANN (LM) 3.9 71.13%

TAEF [50] 1.13 0.00%

ANN trained with Back-Propagation Neural Network (BPNN) [22] 3.5 67.83%

Pre-processing Evolutionary Neural Networks (PENN) [22] 2.4 53.08%

Pre-processing Evolutionary Neural Networks back propagation (PEBPNN) [22] 2 43.70%

Pre-processed Evolutionary LM Neural Networks (PELMNN) [22] 1.4 19.57%

Proposed model 1.126 {

Tai

wan

Sto

ckE

xchan

gein

dex

(TSE

)

Hybrid of fuzzy clustering and TSK fuzzy system [27] 1.3 49.31%

TSK-type fuzzy rule-based system [24] 2.4 72.54%

ANN trained with Back-Propagation Neural Network (BPNN) [22] 0.78 15.51%

Pre-processing Evolutionary Neural Networks (PENN) [22] 0.67 1.64%

Pre-processing Evolutionary Neural Networks back propagation (PEBPNN) [22] 0.52 {

Pre-processed Evolutionary LM Neural Networks (PELMNN) [22] 0.51 {

Proposed model 0.659 {

Teh

ran

Pri

ces

Index

(TE

PIX

)

Hybrid of fuzzy clustering and TSK fuzzy system [27] 2.4 84.58%

ANN trained with back-propagation (BPNN) [22] 0.97 61.86%

Pre-processing Evolutionary Neural Networks (PENN) [22] 0.64 42.19%

Pre-processing Evolutionary Neural Networks back propagation (PEBPNN) [22] 0.61 39.34%

Pre-processed Evolutionary LM Neural Networks (PELMNN) [22] 0.5 26.00%

Proposed model 0.37 {

Teh

ran

Index

ofT

op50

Com

pan

ies

(TIT

50C

)

Hybrid of fuzzy clustering and TSK fuzzy system [27] 1.85 80.11%

ANN trained with back-propagation (BPNN) [22] 1.4 73.71%

Pre-processing Evolutionary Neural Networks (PENN) [22] 1.12 67.14%

Pre-processing Evolutionary Neural Networks back propagation (PEBPNN) [22] 0.83 55.66%

Pre-processed Evolutionary LM Neural Networks (PELMNN) [22] 0.76 51.58%

Proposed model 0.368 {

Teh

ran

Indust

ryIn

dex

(TII

)

Hybrid of fuzzy clustering and TSK fuzzy system [27] 2.02 85.84%

ANN trained with back-propagation (BPNN) [22] 1.73 83.47%

Pre-processing Evolutionary Neural Networks (PENN) [22] 1.3 78.00%

Pre-processing Evolutionary Neural Networks back propagation (PEBPNN) [22] 0.98 70.82%

Pre-processed Evolutionary LM Neural Networks (PELMNN) [22] 0.89 67.87%

Proposed model 0.286 {

Teh

ran

Index

ofF

inan

cial

Gro

up

(TIF

G)

Hybrid of fuzzy clustering and TSK fuzzy system [27] 1.03 69.90%

ANN trained with back-propagation (BPNN) [22] 0.94 67.02%

Pre-processing Evolutionary Neural Networks (PENN) [22] 0.79 60.76%

Pre-processing Evolutionary Neural Networks back propagation (PEBPNN) [22] 0.69 55.07%

Pre-processed Evolutionary LM Neural Networks (PELMNN) [22] 0.66 53.03%

Proposed model 0.31 {

Page 13: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

M.T. Faghihi Nezhad and B. Minaei Bidgoli]/Scientia Iranica, Transactions E: Industrial Engineering 28 (2021) 395{411 407

Table 6. Comparison of the results of the proposed model and Asadi's model.

Criteria MAPE { POICD { U of Theil ARV

Stock name Asadi'smodel

Prop.�

modelImp.% Asadi's

modelProp.model

Imp.% Prop. model

Tehran Index of Financial Group (TIFG) 0.66 0.31 0.53 66.6 69.182 0.039 0.67 0.013Tehran Industry Index (TII) 0.89 0.286 0.68 71.5 74.3 0.039 0.59 0.04Tehran Index of top 50 Companies (TIT50C) 0.76 0.368 0.52 57.5 58.491 0.017 0.48 0.086Tehran Stock Exchange Prices Index (TEPIX) 0.5 0.37 0.26 60 60.202 0.003 0.55 0.003Taiwan Stock Exchange index (TSE) 0.51 0.659 { 85 81 { 0.49 0.068Dow Jones Industrial Average Index (DJIA) 1.41 1.126 0.18 58.3 61.15 0.049 0.52 0.068�Prop.: Proposed

Figure 8. Comparison of two models considering Prediction On Change In Direction (POICD) criterion.

Figure 9. \Real values", \forecasted prices", and \forecasted prices considering price direction" for Dow Jones IndustrialAverage (DIJA) dataset.

random forecast of other models in the real-worldsituation.

Three categories of models with di�erent datasetsare implemented in this research including \price fore-casting", \forecasting of the direction of price move-ment", and \price forecasting regarding the direction ofprice movement" (the proposed model). The obtainedresults are then compared to those of various tradingstrategies and pro�ts. For example, DIJA test data

(Table 4) are used to be tested through each of thethree models. The real and forecasted prices are givenin Figure 9.

Also, the results of forecasting the direction ofprice movement model are shown in Figure 10, in whichvalues `1' and `�1' denote price increment and pricereduction, respectively.

These forecasts are evaluated through the follow-ing trading strategies. Considering that the output of

Page 14: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

408 M.T. Faghihi Nezhad and B. Minaei Bidgoli]/Scientia Iranica, Transactions E: Industrial Engineering 28 (2021) 395{411

Figure 10. The real and forecasted direction of the stockprice movement for Dow Jones Industrial Average (DIJA)dataset.

the forecasting model is `price', one can buy new stocksas much as the prediction says if the next forecastedprice increases. Otherwise, if the forecasting showsa price reduction, one can sell the existing stocks asmuch as the prediction forecasts. If the model outputis `the direction of price movement', buying and sellingare done according to the forecasted direction. Inother words, if the forecasting points to the ascendingtrend, one should buy the stocks, and vice versa. Thisstrategy is applied to the forecasted results of the threeapplied models.

For instance, all the three models are employed forforecasting the trend of a deal with an initial capital of$10,000,000. The obtained results depicted in Figure 11show that the \price forecasting" model gained 8%pro�t owing to the correct forecasting of the directionof price movement, while the initial capital of the othertwo models decreased during this period.

5. Conclusions and future studies

Highly accurate forecasting of stock price for tradingis highly important in this market and it ensures thepreservation and increasing of the capital. Althoughsome of the classical �nancial theories �nd the marketunpredictable with unstable nature, in this paper, thebehavior of the stock markets was forecasted usingarti�cial intelligence models. The proposed model tookinto account the direction of price movement (increase

or decrease) and correct stock price simultaneously toforecast the stock price and market behavior. Themodels in the literature mainly underscored the priceforecasting and paid no attention to the next directionof the price movement. This attenuated the practicalityof the models and their application to trading instock market, which led to �nancial loss. To solvethis obstacle, a two-stage model was proposed in thisresearch so as to forecast the stock price consideringthe next direction of the price movement. In the �rststage, the direction of price change was forecasted andin the second stage, this forecasted direction was addedto input variables for price forecasting. EnsembleLearning (EL) was employed in the proposed model toincrease forecasting accuracy. In addition, higher-levelcriteria were presented for evaluation and simultaneousconsideration of `price' and its `direction' than otherone-dimensional models.

The proposed model can be applied to a real-trading system, in which forecasting the direction ofprice movement (the �rst phase) is used for buyingor selling, while the price forecasting (the secondphase) is utilized for determining the volume of suchbuy/sell orders. The proposed model was implementedover several datasets and the results showed that ithad a more desirable performance than other models.According to the results, it was also shown that theproposed model could be utilized as a backup system ofcertain decision-making in real-trading stock markets.It would be interesting to consider the following issuesas future streams:

1. Using technical data for input variables in themodel;

2. Employing other powerful meta-heuristic methodssuch as Ant Colony Optimization (ACO) to aggre-gate the results of the base models;

Figure 11. Results of trading with three forecasting models and strategies expressed over 120 days.

Page 15: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

M.T. Faghihi Nezhad and B. Minaei Bidgoli]/Scientia Iranica, Transactions E: Industrial Engineering 28 (2021) 395{411 409

3. Simulating the results of the models in a practicalway considering transaction costs.

References

1. Li, X., Yang, L., Xue, F., and Zhou, H. \Time seriesprediction of stock price using deep belief networkswith intrinsic plasticity", In: 29th Chinese Control andDecision Conference (CCDC), 2 IEEE, pp. 1237{1242(2017).

2. Kara, Y., Acar Boyacioglu, M., and Baykan, �OK.\Predicting direction of stock price index movementusing arti�cial neural networks and support vectormachines: The sample of the Istanbul stock exchange",Expert Systems with Applications, 38(5), pp. 5311{5319 (2011).

3. Guresen, E., Kayakutlu, G., and Daim, T.U. \Usingarti�cial neural network models in stock market indexprediction", Expert Systems with Applications, 38(8),pp. 10389{10397 (2011).

4. Zhang, X., Zhang, Y., Wang, S., Yao, Y., Fang,B., and Yu, P.S. \Improving stock market predictionvia heterogeneous information fusion", arXiv PreprintarXiv: 1801.00588 (2018).

5. Zhang, J., Cui, S., Xu, Y., Li, Q., and Li, T. \Anovel data-driven stock price trend prediction system",Expert Systems with Applications, 97(1) pp. 60{69(2018).

6. Patel, J., Shah, S., Thakkar, P., and Kotecha, K.\Predicting stock market index using fusion of machinelearning techniques", Expert Systems with Applica-tions, 42(4), pp. 2162{2172 (2015).

7. Yu, L., Dai, W., and Tang, L. \A novel decomposi-tion ensemble model with extended extreme learningmachine for crude oil price forecasting", EngineeringApplications of Arti�cial Intelligence, 47, pp. 110{121(2016).

8. Niu, M., Hu, Y., Sun, S., and Liu, Y. \A novel hybriddecomposition-ensemble model based on VMD andHGWO for container throughput forecasting", AppliedMathematical Modelling, 57, pp. 163{178 (2018).

9. Ravi, V., Pradeepkumar, D., and Deb, K. \Financialtime series prediction using hybrids of chaos theory,multi-layer perceptron and multi-objective evolution-ary algorithms", Swarm and Evolutionary Computa-tion, 36, pp. 136{149 (2017).

10. Fama, E.F. and Malkiel, B.G. \E�cient capital mar-kets: A review of theory and empirical work", TheJournal of Finance, 25(2), pp. 383{417 (1970).

11. Lo, A.W. and MacKinlay, A.C. \Stock market pricesdo not follow random walks: Evidence from a simplespeci�cation test", The Review of Financial Studies,1(1), pp. 41{66 (1988).

12. Tsai, C-F., Lin, Y-C., Yen, D.C., and Chen, Y-M. \Predicting stock returns by classi�er ensembles",Applied Soft Computing, 11(2), pp. 2452{2459 (2011).

13. Zhong, X. and Enke, D. \Forecasting daily stockmarket return using dimensionality reduction", ExpertSystems with Applications, 67, pp. 126{139 (2017).

14. Wang, J-J., Wang, J-Z., Zhang, Z-G., and Guo, S-P.\Stock index forecasting based on a hybrid model",Omega, 40(6), pp. 758{766 (2012).

15. Cavalcante, R.C., Brasileiro, R.C., Souza, V.L., No-brega, J.P., and Oliveira, A.L. \Computational intel-ligence and �nancial markets: A survey and futuredirections", Expert Systems with Applications, 55, pp.194{211 (2016).

16. Lin, L., Wang, F., Xie, X., and Zhong, S. \Randomforests-based extreme learning machine ensemble formulti-regime time series prediction", Expert Systemswith Applications, 83, pp. 164{176 (2017).

17. Adebiyi, A.A., Adewumi, A.O., and Ayo, C.K. \Com-parison of ARIMA and arti�cial neural networks mod-els for stock price prediction", Journal of AppliedMathematics, 2014, pp. 1{7 (2014).

18. Tk�a�c, M. and Verner, R. \Arti�cial neural networksin business: Two decades of research", Applied SoftComputing, 38(1), pp. 788{804 (2016).

19. Ar�evalo, A., Ni~no, J., Hern�andez, G., and Sandoval, J.\High-frequency trading strategy based on deep neuralnetworks", In: International Conference on IntelligentComputing, Springer, pp. 424{436 (2016).

20. Chong, E., Han, C., and Park, F.C. \Deep learningnetworks for stock market analysis and prediction:Methodology, data representations, and case studies",Expert Systems with Applications, 83, pp. 187{205(2017).

21. Hassan, M.R., Nath, B., and Kirley, M. \A fusionmodel of HMM, ANN and GA for stock marketforecasting", Expert Systems with Applications, 33(1),pp. 171{180 (2007).

22. Asadi, S., Hadavandi, E., Mehmanpazir, F., andNakhostin, M.M. \Hybridization of evolutionary Lev-enberg Marquardt neural networks and data pre-processing for stock market prediction", Knowledge-Based Systems, 35, pp. 245{258 (2012).

23. G�o�cken, M., �Oz�cal�c�, M., Boru, A., and Dosdo�gru,A.T. \Integrating metaheuristics and arti�cial neuralnetworks for improved stock price prediction", ExpertSystems with Applications, 44, pp. 320{331 (2016).

24. Chang, P-C. and Liu, C-H. \A TSK type fuzzyrule based system for stock price prediction", ExpertSystems with Applications, 34(1), pp. 135{144 (2008).

25. Yu, L., Chen, H., Wang, S., and Lai, K.K. \Evolvingleast squares support vector machines for stock mar-ket trend mining", Evolutionary Computation, IEEETransactions on 2009, 13(1), pp. 87{102 (2009).

26. Huang, C., Yang, F., and Lee, C. \The strategy ofinvestment in the stock market using modi�ed supportvector regression model", Scientia Iranica, Transac-tion E, Industrial Engineering, 25(3), pp. 1629{1640(2018).

Page 16: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

410 M.T. Faghihi Nezhad and B. Minaei Bidgoli]/Scientia Iranica, Transactions E: Industrial Engineering 28 (2021) 395{411

27. Esfahanipour, A. and Aghamiri, W. \Adapted neuro-fuzzy inference system on indirect approach TSK fuzzyrule base for stock market analysis", Expert Systemswith Applications, 37(7), pp. 4742{4748 (2010).

28. Chen, Y-S., Cheng, C-H., Chiu, C-L., and Huang, S-T.\A study of ANFIS-based multi-factor time series mod-els for forecasting stock index", Applied Intelligence,45(2), pp. 277{292 (2016).

29. Shen, W., Guo, X., Wu, C., and Wu, D. \Forecastingstock indices using radial basis function neural net-works optimized by arti�cial �sh swarm algorithm",Knowledge-Based Systems, 24(3), pp. 378{385 (2011).

30. Enke, D. and Mehdiyev, N. \Stock market predictionusing a combination of stepwise regression analysis, dif-ferential evolution-based fuzzy clustering, and a fuzzyinference neural network", Intelligent Automation &Soft Computing, 19(4), pp. 636{648 (2013).

31. Khashei, M., Bijari, M., and Ardali, GAR. \Improve-ment of auto-regressive integrated moving averagemodels using fuzzy logic and arti�cial neural networks(ANNs)", Neurocomputing, 72{128(4), pp. 956{967(2009).

32. Babu, C.N., Reddy, B.E., and Babu, C.N. \A moving-average �lter based hybrid ARIMA-ANN model forforecasting time series data", Applied Soft Computing,23, pp. 27{38 (2014).

33. Tsai, C-F. and Chiou, Y-J. \Earnings managementprediction: A pilot study of combining neural networksand decision trees", Expert Systems with Applications,36(3), pp. 7183{7191 (2009).

34. Adhikari, R., and Agrawal, R. \A combination ofarti�cial neural network and random walk models for�nancial time series forecasting", Neural Computingand Applications, 24(6), pp. 1441{1449 (2014).

35. Freitas, P.S. and Rodrigues, A.J. \Model combinationin neural-based forecasting", European Journal of Op-erational Research, 173(3), pp. 801{814 (2006).

36. Rather, A.M., Agarwal, A., and Sastry, V. \Recurrentneural network and a hybrid model for predictionof stock returns", Expert Systems with Applications,42(6), pp. 3234{3241 (2015).

37. Andrawis, R.R., Atiya, A.F., and El-Shishiny, H.\Forecast combinations of computational intelligenceand linear models for the NN5 time series forecastingcompetition", International Journal of Forecasting,27(3), pp. 672{688 (2011).

38. Dietterich, T.G. \Ensemble methods in machine learn-ing", In: International Workshop on Multiple Classi-�er Systems, Springer, pp. 1{15 (2000).

39. Yu, L., Lai, K.K., and Wang, S. \Multistage RBFneural network ensemble learning for exchange ratesforecasting", Neurocomputing, 71(16{18), pp. 3295{3302 (2008).

40. Xiao, Y., Xiao, J., Lu, F., and Wang, S. \Ensem-ble ANNs-PSO-GA approach for day-ahead stock E-exchange prices forecasting", International Journal ofComputational Intelligence Systems, 7(2), pp. 272{290(2013).

41. Ballings, M., Van den Poel, D., Hespeels, N., andGryp, R. \Evaluating multiple classi�ers for stock pricedirection prediction", Expert Systems with Applica-tions, 42(20), pp. 7046{7056 (2015).

42. Maknickien_e, N. \Prediction capabilities of evolinoRNN ensembles", In: Computational Intelligence,Edn., Springer, pp. 473{485 (2016).

43. Atsalakis, G.S. and Valavanis, K.P. \Surveying stockmarket forecasting techniques-Part II: Soft computingmethods", Expert Systems with Applications, 36(3),pp. 5932{5941 (2009).

44. Cheng, C., Xu, W., and Wang, J. \A comparisonof ensemble methods in �nancial market prediction",In: Computational Sciences and Optimization (CSO),2012 Fifth International Joint Conference on, IEEE,pp. 755{759 (2012).

45. Atsalakis, G.S. and Valavanis, K.P. \Forecastingstock market short-term trends using a neuro-fuzzybased methodology", Expert Systems with Applica-tions, 36(7), pp. 10696{10707 (2009).

46. Wang, G., Hao, J., Ma, J., and Jiang, H. \A com-parative assessment of ensemble learning for creditscoring", Expert Systems with Applications, 38(1), pp.223{230 (2011).

47. Cubiles-De-La-Vega, M-D., Blanco-Oliver, A., Pino-Mej��as, R., and Lara-Rubio, J. \Improving the man-agement of micro�nance institutions by using creditscoring models based on statistical learning tech-niques", Expert Systems with Applications, 40(17), pp.6910{6917 (2013).

48. Kantelhardt, J.W., Zschiegner, S.A., Koscielny-Bunde,E., Havlin, S., Bunde, A., and Stanley, H.E. \Multi-fractal detrended uctuation analysis of nonstationarytime series", Physica A: Statistical Mechanics and itsApplications, 316(1), pp. 87{114 (2002).

49. Lei, L. \Wavelet neural network prediction methodof stock price trend based on rough set attributereduction", Applied Soft Computing, 62, pp. 923{932(2018).

50. Ferreira, T.A., Vasconcelos, G.C., and Adeodato, P.J.\A new intelligent system methodology for time seriesforecasting with arti�cial neural networks", NeuralProcessing Letters, 28(2), pp. 113{129 (2008).

51. De Oliveira, F.A., Nobre, C.N., and Z�arate, L.E.\Applying arti�cial neural networks to prediction ofstock price and improvement of the directional predic-tion index-Case study of PETR4, Petrobras, Brazil",Expert Systems with Applications, 40(18), pp. 7596{7606 (2013).

52. Yazdani, M., Zandieh, M., Tavakkoli-Moghaddam, R.,and Jolai, F. \Two meta-heuristic algorithms for thedual-resource constrained exible job-shop schedulingproblem", Scientia Iranica, Transactions E, IndustrialEngineering, 22(3), p. 1242 (2015).

Page 17: Development of an ensemble learning-based intelligent model ...scientiairanica.sharif.edu/article_21540_80fd2bc050be30f...for stock market forecasting can be divided into three groups:

M.T. Faghihi Nezhad and B. Minaei Bidgoli]/Scientia Iranica, Transactions E: Industrial Engineering 28 (2021) 395{411 411

Biographies

Mohammad Taghi Faghihi Nezhad is an AssistantProfessor at the Department of Information Technol-ogy, Faculty of Engineering, Payame Noor University,Iran. He received a PhD in Information TechnologyEngineering. His research interests focus on intelligenttrading systems and stock prediction.

Behrouz Minaei Bidgoli is an Associate Professorat the School of Computer Engineering at Iran Uni-versity of Science and Technology. He leads the DataMining Lab that researches various areas in arti�cialintelligence and data mining, including text mining,web information extraction, and natural language pro-cessing.