An integrated framework of genetic network programming and multi-layer perceptron neural network for prediction of daily stock return: An application in Tehran stock exchange market
Introduction
Forecasting stock price and return is one of the most complicated and disputable issues in financial markets. However, various methods are commonly applied in this regard, such as auto regressive moving average, technical analysis, and fundamental analysis. Concerning auto regressive moving average and technical analysis, the future is forecasted using historical data and past relationships among the data, while fundamental analysis forecast is based on the financial statements, economic situation, international relations and other macro-economic factors. Fundamental analysis is incapable of instant or short-term forecasting. Moreover, econometric models cannot provide a precise relationship for stock returns [1], [2] because of their relatively low coefficient of determination (R2) including Auto Regressive (AR) and Moving Average (MA) regarding highly volatile markets, or markets therein the acts of selling and buying are done excitedly [3]. Taking into consideration that investors’ excitements and perspectives play a crucial role in financial markets, the necessity of proposing better methods that provide investors with a return forecast for a shorter period (daily) is obvious. Technical analysis can predict the future price using the record of stock price, turnover, trade volume and its past trend [4]. In doing so, different methods are proposed by using technical analysis indicators in constructing models and automated trading systems. One such critical approach is the category of machine learning algorithms, namely Genetic Algorithm (GA) [5], Genetic Programming (GP) [6], [7], and Artificial Neural Network (ANN) [7], [8]. These algorithms are used in conjunction with various optimization methods, time series models and vector machines, hence operated for stock prices forecast in stock exchange markets [9], portfolio optimization [10], oil price forecasts [11], and energy exchange [12]. Considering the fact that there are complexities associated with the stock price curve in different time periods, it is necessary to divide time periods into shorter intervals. Therefore, the major problem is divided into several lesser problems. By doing so, we must provide a classification for each period. There are various classification methods in the pertinent literature, introducing a range of classification methods based on ensemble learning. Bootstrap, for instance, is a classifying method which implements the classification process based on the majority of the data [13]. Adaptive boosting is another method which executes the classification by generating a new class on the basis of the preceding class [14]. Another method is Random Forest, in which the classification and data adjective are determined by engendering many decision trees [15].
In this paper, a neural network-based method named Multi-Layer Perceptron (MLP) is applied. By means of MLP, we can designate the appropriate number of technical indicators as inputs and classify the input days based on the existing similarities. In the testing phase, we choose proper rules in accordance with the classification and similarity to training course [16].
We apply Genetic Network Programming (GNP) to achieve initial rules for the classification process in MLP. This is an advanced method of the GP that has a Graph Structure instead of Tree Structures. The components of this graph structure are start nodes, judgement nodes, and process nodes. By aggregating these components, we can achieve the rules to reach the goal, which here is the expected return.
GNP is applicable in miscellaneous fields such as portfolio optimization [17], data mining [18], and assessment and prediction of many real world applications in the literature, including estimation of suspended sediment concentration [19], prediction of surface finish of the turning process [20], assessment of soil-fiber composite [21], etc. Consequently, the present paper aims to forecast daily stock return by aggregating technical indicators, using GNP programming and MLP. The selling and buying opportunity can be recognized as signals by dint of the integrated approach of the aforementioned combination. This significantly contributes to optimizing the portfolio and maximizing the return [16], [22]. In this paper, we predict the future return of shares using existing technical tools and indicators beside evolutionary algorithms (GNP) and MLP as well as adopting an econometric model (ARMA) as the second part of our proposed model. The contribution of this study is in forecasting daily stock returns through evolutionary algorithms in correspondence with econometric models. Adopting a model like ARMA facilitates the decision making process, particularly when we confront unfavorable conditions, and in case of a lack of technical pattern identification. Furthermore, strict selection of the extracted rules from GNP, as well as determining the return by MLP improve the certainty of future return forecast, which has been considered in the present paper. The proposed model of this study is referred to as GNP–ARMA.
Considering the previous studies’ aim of forecasting future return using various models, researchers reached the idea of predicting future trends of the stock price, by means of specific indicators, formed with reference to previous price and trading volume. These attempts gave rise to the advent of technical analysis which has been constituted based on three important principles [4]: (1) All circumstances eventually affect the price, (2) The price of a stock or commodity follows a trend, (3) The history repeats.
There are both pros and cons to technical analysis. Lo and MacKinlay [23] demonstrate that the price movement trend can be predicted with an acceptable accuracy by using numerous technical indicators. They also reject random walk hypothesis.
Many researches have been conducted to forecast the return, to optimize the portfolio and to present buy and sell that have applied various methods. Recent advancements in technology and the use of computers in finance have attracted investors, practitioners, and researchers to use these facilities in order to design smart systems, which are able to forecast returns or optimize a portfolio. The common way to forecast the return and price is by applying autoregressive methods and econometrics models. Smooth transition regression (STR) model is capable of a satisfactory performance in forecasting In-sample dynamics, while failing to outperform linear models [24]. Investigating non-linear and linear models such as AR, LSTAR, ESTAR, and TAR, which take into account the impact of trading volume on the return forecasting shows that a low trading volume causes a positive auto-correlation or momentum behavior in the return, and a high trading volume prompts the random behavior. However, the LSTAR model outperforms the other models, emphasizing the effect of technical indicators on the price prediction [25]. Moreover, applying Markov switching autoregressive model (MSAR) alongside Bayesian Regularized Radial Basis Function Neural Network (BR-RBFN) indicates a proper performance in the process of forecasting the return and trading signals [26].
Apart from econometric models, other methods including artificial intelligence or training algorithms have been applied to the forecasting procedure. For instance, such algorithms could be categorized into linear (AR, MA, ARIMA, ARMA) and non-linear models (ARCH, GARCH, Neural Network). deep learning architectures i.e Multilayer Perceptron (MLP), Recurrent Neural Networks (RNN), Long Short-Term Memory (LSTM) and Convolutional Neural Network (CNN) can be used for prediction. Regarding certain researches, the neural networks have been observed to be outperforming the existing linear model (ARIMA) [27].
Refenes et al. [28] demonstrate that the neural network can be considered as an alternative for traditional statistical methods to forecast the stocks of large companies. They report that using stock indices like market index, trading volume, and daily stock price accompanied by applying neural networks can be effective in forecasting future returns based on precedent data with an acceptable amount of error. They reject the assumption that the return changes randomly. Alimoradi and Husseinzadeh [29] utilized league championship algorithm (LCA) equipped with a network structure for stock trading rule extraction process. LCA is able to extract and save various stock trading rules. Each individual in LCA plays the role of a sports team which could learn from weakness of others to enhance the model’s performance. Reinforcement learning helps to strengthen the searching power and to extract better rules for each individual. The Backward Q-Learning (BQL), as a combination of Sarsa learning and Q-learning algorithms, is also hybridized with LCA to increase the learning speed, leading to extraction of better rules. Their model marks more profit and less losses compared to GNP or Buy & Hold strategies.
There are also other studies dealing with increasing return and optimizing investment portfolio through the utilization of technical indicators. Wagman [30] and Yan et al. [31] optimize investment portfolio using genetic algorithm and some technical and fundamental indicators. To forecast stock price and market behavior, Chen et al. [32] use a flexible neural tree, thereof parameters are determined by genetic programming. They choose Local weighted polynomial regression (LWPR) as their forecasting model. Their results confirm that the market behavior forecast is of a sound accuracy. Using the pattern recognition procedure and flag pattern, Cervello-Royo et al. [33], Arevalo et al. [34], and Zhang et al. [35] report appropriate trading signals that outperform the buying and holding strategy. Salehpoor and Zavardehi [36], employing certain risk measures like mean–variance, mean absolute deviation, semi variance and variance with skewness in conjunction with learning algorithms such as GP, GNP, GA, PSO and simulated annealing (SA) hybridized by diversification mechanism, revealed in their study, the capability of the hybrid models compared with each model separately.
Table 1 presents a summary of previous studies associated with price and return forecasting and portfolio optimization.
According to the literature review presented, neural networks and genetic algorithms have been applied in most of the studies conducted to forecast the price, buy and sell signals [37]. Sezar et al. [38] proposed a stock trading system based on technical analysis for creating buy–sell points using GA, Optimizing the technical parameters determined by deep MLP neural network for buy–sell–hold predictions. Their results showed that optimizing the technical indicator parameters enhances performance of system, while correspondingly providing a model that can be used as an alternative to Buy and Hold and other standard technical analysis models.
Zhang et al. [39] proposed a novel architecture of Generative Adversarial Network (GAN) with the Multi-Layer Perceptron (MLP) as the discriminator, and the Long Short-Term Memory (LSTM) as the generator for forecasting the closing price of stocks. They showed that GAN can get a better performance compared with other models in machine learning and deep learning. There are also numerous researches using time series models based on auto-regressive moving average to predict the return or price of stocks. The main issue able to pose a research gap might be the simultaneous application of time series and evolutionary algorithms. Therefore, instead of optimizing portfolio and proposing buy and sell signals, which do not present a prediction of the future profit or loss, we try to forecast the future return through a hybrid model. This is the core of the present paper; thus, we apply the GNP and the ARMA time series to predict the stock return. We also use the MLP for data classification and producing a set of similarity rules.
The structure of this paper is organized as follows; Section 2 describes the GNP and the way we construct our graph network and train it. This is followed by Section 3 where we explain our method for data classification via MLP. Section 4 presents the econometric model ARMA–GARCH and its relationship with MLP and how we determine the future return. In Section 5, we implement the proposed algorithm and present the results of 9 shares listed in Tehran Stock Exchange and discuss the results obtained. Finally, we conclude and address future research directions in Section 6.
Section snippets
Genetic network programming
Genetic network programming is a new method in graph-based evolutionary algorithms [56]. GNP finds solutions based on the graph network, which has been exclusively designed for it. By having a network to find solutions, this model, in fact, is of a memory to continue its path. Another fact is that the presence of the graph network, instead of neural tree, prevents the excessive extension of the network. The opposing method is PADO that uses the neural tree to achieve the result [57] (Teller and
Data classification
The state of the financial market is not always identical. Therefore, we can divide a long-time period into smaller intervals. This facilitates finding rules relevant to a particular sub-period. What is more, we can constitute several rule pools to select the best rules based on the similarity of a data to a class. In this paper, we apply MLP network to classify the data and recognize the similarity. Following, MLP structure and Similarity conditions are described.
Return prediction
After the completion of stated steps for data classification and rules extraction in Sections 2 Genetic network programming, 3 Data classification, we determine the return through ARMA–GARCH model and the identified return by MLP based on the extracted rules. In so doing, we define more provisions in order to gain a higher trust level in the selected return as follows.
- 1.
There are at least 5 rules for the proposed return in the sub-period.
- 2.
The similarity to the existing rules for each return is at
Market data
The data used in this paper includes daily Final price, the maximum price, minimum price, and trading Volume collected from Tehran Stock Exchange website.2 9 out of 50 companies, which have high trading volumes and at least 200 trading days, have been selected amongst companies listed in Tehran Stock Exchange. Taking into consideration the different trading days of each stock, the time window of this study is from March 2013 to February 2017. We divide the data into two main
Conclusions
In this paper, a model based on evolutionary algorithm and ARMA time series model is introduced to forecast the next day return. In the training phase, the GNP extracts a set of rules using technical indices and keeps those rules in a rule pool, and then Ensemble learning mechanism using the MLP classifies data. By doing so, the MLP compares the similarity of the next day return (the input) with the previous data. Based on the produced weights (the output) the similarity to rule pools is
Declaration of Competing Interest
No author associated with this paper has disclosed any potential or pertinent conflicts which may be perceived to have impending conflict with this work. For full disclosure statements refer to https://doi.org/10.1016/j.asoc.2019.105551.
References (61)
- et al.
Portfolio algorithm based on portfolio beta using genetic algorithm
Expert Syst. Appl.
(2006) - et al.
Generating trading rules on the stock markets with genetic programming
Comput. Oper. Res.
(2004) - et al.
Assessment of artificial neural network and genetic programming as predictive tools
Adv. Eng. Softw.
(2015) - et al.
Genetic algorithms approach to feature discrimination in artificial neural networks for the prediction of stock price index
Expert Syst. Appl.
(2000) - et al.
Ensemble learning of rule-based evolutionary algorithm using multi-layer perceptron for supporting decisions in stock trading problems
Appl. Soft Comput.
(2015) - et al.
A hybrid stock trading system using genetic network programming and mean conditional value-at-risk
European J. Oper. Res.
(2015) - et al.
A machine code-based genetic programming for suspended sediment concentration estimation
Adv. Eng. Softw.
(2010) - et al.
Stepwise approach for the evolution of generalized genetic programming model in prediction of surface finish of the turning process
Adv. Eng. Softw.
(2014) - et al.
Genetic programming for soil-fiber composite assessment
Adv. Eng. Softw.
(2018) - et al.
Enhanced decision-making mechanism of rule-based genetic network programming for creating stock trading signals
Expert Syst. Appl.
(2013)
Nonlinear forecasting of stock returns: Does volume help
Int. J. Forecast.
Hybrid multiple structural break model for stock price trend prediction
Spanish Rev. Fin. Econ.
A league championship algorithm equipped with network structureand backward Q-learning for extracting stock trading rules
Appl. Soft Comput.
Flexible neural trees ensemble for stock index modeling
Neurocomputing
Stock market trading rule based on pattern recognition and technical analysis: Forecasting the DJIA index with intraday data
Expert Syst. Appl.
A dynamic trading rule based on filtered flag pattern recognition for stock market price forecasting
Expert Syst. Appl.
A novel data-driven stock price trend prediction system
Expert Syst. Appl.
A semi parametric approach to short-term oil price forecasting
Energ. Econo.
The use of data mining and neural networks for forecasting stock market returns
Expert Syst. Appl.
Forecasting stock market short-term trends using a neuro-fuzzy based methodology
Expert Syst. Appl.
A genetic programming model to generate risk-adjusted technical trading rules in stock markets
Expert Syst. Appl.
A hybrid evolutionary dynamic neural network for stock market trend analysis and prediction using unscented Kalman filter
Appl. Soft Comput.
Robust technical trading strategies using GP for algorithmic portfolio selection
Expert Syst. Appl.
Heuristic based trading system on Forex data using technical indicator rules
Appl. Soft Comput.
New efficient hybrid candlestick technical analysis model for stock market timing on the basis of the support vector machine and heuristic algorithms of imperialist competition and genetic
Expert Syst. Appl.
Machine learning in sentiment reconstruction of the simulated stock market
Physica A
Niching genetic network programming with rule accumulation for decision making: An evolutionary rule-based approach
Expert Syst. Appl.
Detecting earnings management with neural networks
Expert Syst. Appl.
Neural Networks in Business Forecasting
Predicting the oil prices: Do technical indicators help
Energ. Econo.
Cited by (45)
A multi-model approach to the development of algorithmic trading systems for the Forex market
2024, Expert Systems with ApplicationsA novel discrete learning-based intelligent methodology for breast cancer classification purposes
2023, Artificial Intelligence in MedicineEvaluating the performance of ensemble classifiers in stock returns prediction using effective features
2023, Expert Systems with ApplicationsCitation Excerpt :To forecast stock returns, it is therefore necessary to apply models that can explain such intricacy. Various models (e.g., statistical approaches, neural networks) were proposed in the literature to predict stock returns based on historical stock data; out of which machine learning algorithms have shown the best performance (Huang, 2012; Barak et al., 2017; Ramezanian et al., 2019). In the context of stock market prediction, two types of machine learning algorithms are commonly used: single classifiers and ensemble classifiers (Qian and Rasheed, 2007; Tsai et al., 2011; Dash et al., 2019).
Machine learning techniques and data for stock market forecasting: A literature review
2022, Expert Systems with ApplicationsCitation Excerpt :In this model, both empirical model decomposition (EMD) and the factorization machine (FM) were operated for analyzing non-stationary data. Moreover, Ramezanian et al. (2019) applied a model including genetic network programming (GNP), reinforcement learning, and a multi-layer perceptron (MLP) neural network for the classification and prediction of stock returns. GNP was applied here to optimize the initial rules for the MLP classification process.
Jointly modeling transfer learning of industrial chain information and deep learning for stock prediction
2022, Expert Systems with ApplicationsCitation Excerpt :The most common training algorithm used for MLP is back-propagation (BP) that is an extended form of the method used to train the perceptron (Wang et al., 2017). MLP is widely used in pattern recognition, data classification (Ramezanian, Peymanfar, & Ebrahimi, 2019; Samadianfard et al., 2020), function approximation, etc. (Fath, Madanifar, & Abbasi, 2020). A RNN is an extension of a conventional feed-forward neural network, which is able to handle a variable-length sequence input.
Feature selection and deep neural networks for stock price direction forecasting using technical analysis indicators
2021, Machine Learning with Applications