A hybrid fuzzy intelligent agentbased system for stock price prediction

5 downloads 18747 Views 854KB Size Report
architecture. Nontraditional techniques from different domains can be effective in ... The results were lower error rates when compared with the seven competing.
A Hybrid Fuzzy Intelligent Agent-Based System for Stock Price Prediction M. H. Fazel Zarandi,1,∗ Esmaeil Hadavandi,1,† I. B. Turksen2,3 1 Department of Industrial Engineering, Amirkabir University of Technology, P.O. Box 15875-4413, Tehran, Iran 2 Department of Mechanical and Industrial Engineering, University of Toronto, Toronto, Ontario, Canada M5S2H8 3 Department of Industrial Engineering, TOBB University of Economics and Technology, Sogutozu, Ankara, Turkey

Stock price prediction is an important task for most investors and professional analysts. However, it is a tough problem because of the uncertainties involved in prices. This paper presents a fourlayer fuzzy multiagent system (FMAS) architecture to develop a hybrid artificial intelligence model based on the coordination of intelligent agents performing data preprocessing and function approximation tasks for next-day stock price prediction. The first layer is dedicated to metadata creation. The second layer is aimed at data preprocessing using stepwise regression analysis and self-organizing map neural network clustering for modularizing prediction problems. The third layer is aimed at model building for each cluster using genetic fuzzy systems and evaluating built models to choose the best evolved fuzzy system for each cluster. Finally, the fourth layer provides model analysis and knowledge presentation. The capability of FMAS is evaluated by applying it on stock price data gathered from IT and airline sectors and comparing the outcomes with the results of other methods. The results show that FMAS outperforms all previous methods, so it can C 2012 Wiley Periodicals, be considered as a suitable tool for stock price prediction problems.  Inc.

1. INTRODUCTION Stock price time series prediction is a very important and challenging task in the financial studies.1 This problem is characterized by high complexity and a great number of interacting and highly interrelated economic, social, political, and even psychological components, and these factors interact with each other in a very complicated manner. In modeling such a complex system, difficulties have already appeared during the creation of a robust model and selection of its architecture. Nontraditional techniques from different domains can be effective in ∗ †

Author to whom all correspondence should be addressed: e-mail: [email protected]. e-mail: [email protected].

INTERNATIONAL JOURNAL OF INTELLIGENT SYSTEMS, VOL. 00, 1–23 (2012)  C 2012 Wiley Periodicals, Inc. View this article online at wileyonlinelibrary.com. • DOI 10.1002/int.21554

2

ZARANDI, HADAVANDI, AND TURKSEN

the case of complex systems, providing novel ways to generate decisions and find solutions.2 The multiagent approach3 is a suitable method that can help reduce the complexity of a system by creating independent components, which solve private subtasks that together achieve common goals.4 Multiagent systems are intelligent distributed approaches suited for applications that are modular, changeable, and complex. They have autonomy, integration, reactivity, and flexibility capabilities.5 Every agent utilizes the most effective method for solving the subtask and does not apply a general approach, which is often acceptable for the system on the whole, but not optimal for a concrete subtask.2 Because of these characteristics, multiagent based models are attracting significant attention in the study of financial markets.6 The distributed nature of the prediction problem means that subtasks in the prediction problem are independent, and each of them performs specific functions to achieve certain targets in a prediction problem. In other words, independence means that each subtask such as metadata creation, feature selection, knowledge discovery, and function approximation performs its own tasks and necessary processes are carried out without the interference of other elements or components. Therefore, in the prediction problem, the multiagent approach seems to be an appropriate method that can help reduce the complexity of the prediction problem and increase prediction accuracy by creating autonomous agents, which can model independent subtasks that together comprise the whole goal. In recent years, some research has been published in favor of using multiagent approaches in prediction problems. Lee and Liu7 introduced a weather forecasting system that used fuzzy-neuro-based intelligent agents for automatic weather information gathering and filtering for time series weather prediction. Jumadinova and Dasgupta8 proposed a multiagent based system for analyzing the effects of different information-related aspects on prediction markets. Meshkin et al.9 proposed an agent-based system for the prediction of relative solvent accessibility of proteins. The results were lower error rates when compared with the seven competing methods, reduced computational time, and optimized prediction quality. The main function of an intelligent agent, the artificial intelligence counterpart of multiagent systems with intelligent capabilities that include data mining, intelligent pattern recognition, and function approximation, is difficult to implement.7 For example, in a stock price prediction problem, the need for artificial intelligence capabilities can be found in modeling nonlinear trends of stock price time series or data preprocessing such as feature selection. There are few papers in the literature that use an intelligent multiagent approach for stock price prediction problems. Gamil et al.10 proposed a multiagent and fuzzy logic based decision support system that can help investors of the stock market make the correct buy/sell/hold decisions. Experimental simulation using actual price data from the NASDAQ index was carried out to demonstrate the power of their proposed model. They stated that the results were satisfactory and outperformed other models. Antonello and Silveira11 proposed a method to predict the movements of the Bovespa stock index through multiagent systems. Experimental results showed that predicting the direction of the populations of agents was more efficient than predicting the direction based only on data in the index time series. International Journal of Intelligent Systems

DOI 10.1002/int

HYBRID FUZZY INTELLIGENT AGENT-BASED SYSTEM

3

Data quality is a key issue in the prediction problem. To increase the accuracy of the predictions, we may perform data preprocessing techniques such as feature selection and data clustering. Atsalakis and Valavanis12 pointed out that input data preprocessing may impact prediction performance. A choice of indicators as inputs through sensitivity analysis may help eliminate redundant inputs. In addition, one of the best ways to improve the accuracy of a model is using modular approaches. In modular models, a task or problem is decomposed into a number of subtasks and each module handles a subtask of the global task.13 There are different motivations for using modular approaches, which are to improve performance, reduce model complexity, make the problem simple, and to recombine sensory information.14 By using data clustering, the prediction problem can be modularized and accuracy of the model can be improved. The aim of this research is to develop a modularized stock price prediction model, which is capable of achieving the following advantages: • Using a multiagent approach as an appropriate method, which can help reduce the complexity of the prediction problem and increase prediction accuracy by creating autonomous agents, which models independent subtasks of the prediction problem. • Using data preprocessing agents such as feature selection for determining significant factors and clustering for reducing the complexity of the whole data space to something more homogeneous. • Using genetic fuzzy system predictor agents for automating the definition of the fuzzy rule based systems (FRBS).

This paper proposes a four-layer fuzzy multiagent system (FMAS) architecture to develop a hybrid artificial intelligence model based on the coordination of intelligent agents performing data preprocessing and prediction tasks for next-day stock price prediction. The capability of the proposed multiagent system is tested by applying it on the stock price data of International Business Machines and Dell Corporation from the IT sector, and British airways and Ryanair from airline sectors that have been used in different studies as the case study. The remainder of the paper is organized as follows: A selective review of related literature is provided in Section 2. In Section 3, the architecture of the proposed multiagent system is presented. In Section 4, the experimental results and comparison of the proposed approach and other models in the literature are presented. The last section contains some concluding remarks.

2. BACKGROUND Stock market predictors focus on developing approaches to successfully predict index values or stock prices, aiming at high profits using well defined trading strategies. The central idea to successful stock market prediction is achieving the best results by using the minimum required input data and the least complex stock market model.12 Considering this idea, an obvious complexity of the problem paves the way for the importance of intelligent prediction paradigms.15 International Journal of Intelligent Systems

DOI 10.1002/int

4

ZARANDI, HADAVANDI, AND TURKSEN

Artificial Intelligence techniques such as artificial neural networks (ANNs), fuzzy logic, and genetic algorithms (GAs) are popular research subjects, since they can deal with complex engineering problems, which are difficult to solve by classical methods.16 These techniques have been successfully used in place of the complex mathematical systems for the prediction of time series.17−19 Artificial intelligence techniques can be combined together in various ways to form hybrid techniques. Hybrid models have more flexibility and can be used to estimate the nonlinear relationship, without the limits of traditional models such as time series models. Therefore, more and more researchers tend to use hybrid prediction models to deal with prediction problems. For example, Hadavandi et al.20 proposed an integrated approach based on genetic fuzzy systems and artificial neural networks for constructing a stock price prediction expert system. Results showed that their proposed approach outperforms other methods such as ANN and ARIMA. Alizadeh et al.21 proposed an adaptive neuro-fuzzy inference system (ANFIS) for stock portfolio return prediction. They obtained that predicted portfolio returns can be improved by using ANFIS and taking as input a variety of technical and fundamental attributes about various indices of the stock market. Among intelligent models, FRBS and artificial neural network models have been popular techniques for the prediction of time series in the recent decade. Despite the advantages of ANNs, they have weaknesses, one of the most important of which is their requirement for large amount of data to yield accurate results. In addition, the training procedure of an ANN model is time consuming.22 Fuzzy prediction methods are suitable under incomplete data conditions and require fewer observations than other prediction models do.23 Considering the uncertainty and complexity in all stock markets, which is related to their short and long-term future states,24 fuzzy rule based models seem ideal candidates for stock market analysis and prediction.25 Fuzzy rule based models offer a better way to represent complicated situations in terms of simple natural language and have been applied very practically in many fields where classical models are difficult to implement for design and learning.22,26 However, as the system complexity and nonlinearity increase, obtaining a reliable and accurate knowledge base (KB) for fuzzy systems used to describe the system behavior becomes difficult. In this more complex environment, hybridizing fuzzy logic systems and other intelligent models can be very promising. One of the most popular approaches is the hybridization between fuzzy logic and GAs leading to genetic fuzzy systems (GFSs).27 A GFS is basically a fuzzy system augmented by a learning process based on evolutionary computation, which includes genetic algorithms and other evolutionary algorithms (EAs).28 In recent years, some researches are in favor of using GFS in prediction problems.29 They have all obtained satisfactory results and concluded that using GFSs is very promising for this area. Among artificial intelligence technologies, multiagent systems are an emerging subfield that is concerned with a society of agents interacting to solve a common problem. Wooldridge and Jennings30 define a computer system with the following characteristics as an agent: International Journal of Intelligent Systems

DOI 10.1002/int

HYBRID FUZZY INTELLIGENT AGENT-BASED SYSTEM

5

1. Autonomy: It signifies that a computer system should have some control over its actions and should work without human intervention. 2. Social ability: It signifies that a computer system should be able to communicate with other agents and/or with human operators via some kinds of communicative languages. 3. Reactivity: It signifies that a computer system should be able to respond to its environmental changes. 4. Proactiveness: It signifies that a computer system should be able to take initiative actions based on the pre-specified goals.

The communicative ability of agents makes it possible to work together and to solve complex and nonlinear problems that may not be dealt with by a single agent, this being the essence of multiagent systems.31 Considering the mentioned capabilities of multiagent systems and advantages of GFSs, this paper presents a four-layer FMAS architecture to develop a hybrid artificial intelligence model based on the coordination of intelligent agents performing data preprocessing and prediction tasks for next-day stock price prediction. In this work, the analysis and design of FMAS was made under Prometheus methodology through the Prometheus Design Tool.32 3. ARCHITECTURE OF THE PROPOSED FUZZY MULTIAGENT SYSTEM The architecture of FMAS consists of four layers: The first layer is dedicated to metadata creation (using expert knowledge to extract relevant data from external data sources and creating metadata). The results of the first layer (Metadata) are delivered to the second layer by the SendMD protocol. The second layer is aimed at data preprocessing (feature selection using stepwise regression analysis (SRA) and modularizing prediction problems using the self-organizing map (SOM) neural network clustering). The results of this layer (Clusters) are delivered to the third layer by the SendC protocol. The third layer is aimed at model building for each cluster using genetic fuzzy systems and evaluating built models to choose the best evolved fuzzy system for each cluster. The results of this layer (Evolved fuzzy system for each cluster) are delivered to the fourth layer by the SendEFS protocol. The fourth layer provides model analysis and knowledge presentation (sensitivity analysis of the model, prediction of stock price, and real-time generation of alternative scenarios for decision making in a what–if simulation process) by interaction with the user. The architecture of these layers is shown in Figure 1. 3.1. Goals of the System The system design process starts with identification of general goals that are divided into subgoals. The final goal is knowledge presentation and creating relevant reports and is achieved as a result of three parallel goals: “Make prediction,” “Model analysis,” and “What–if simulation.” These three goals use parts of the same knowledge. They are based on models received as a result of “Evolving Fuzzy Systems” and “Choosing best model” goals. The “Data preprocessing” goal is the initial goal International Journal of Intelligent Systems

DOI 10.1002/int

6

ZARANDI, HADAVANDI, AND TURKSEN

Figure 1. Architecture of FMAS.

for model building that consists of “Feature Selection” and “Data Clustering” goals. The relation between the goals is shown in Figure 2. 3.2. Roles of System Roles represent the agent’s functions, responsibilities, and expectations. A role enables pooling together the goals of the system in accordance with different types International Journal of Intelligent Systems

DOI 10.1002/int

HYBRID FUZZY INTELLIGENT AGENT-BASED SYSTEM

7

Figure 2. Goal tree and layers of FMAS.

of behavior that an agent assumes when archiving a goal or a series of goals. The distribution of roles for agents determines the agent’s specialization and knowledge. One of the intentions for the system design was to assign one role to each agent or agent team. That requirement is met for the roles “Data preprocessing” where the teams of “Data-preprocessing,” “SRA feature selection,” and “SOM-Clustering” agents carry out these roles. Moreover, the “Function approximation” agent manages two roles: “evolving fuzzy system” and “model evaluation.” The agent–role coupling diagram is shown in Figure 3. 3.3. Description of the Agents The agent teams coordinate and supervise task execution and utilization of resources. Agent teams synchronize the work of the system, execute plans in a concurrent mode, and strengthen the internal management by local decision making.2 There are three agent teams defined within the proposed architecture: “Data preprocessing,” “Function approximation,” and “Knowledge presentation” agent teams (shown in Figure 4.). Details of each team agent are described in the following section. International Journal of Intelligent Systems

DOI 10.1002/int

8

ZARANDI, HADAVANDI, AND TURKSEN

Figure 3. Agent–role coupling diagram.

3.3.1. Metadata Creation Agent The Metadata creation agent must achieve the following goals: 1. obtain information from the domain, 2. retrieve information from the found sources, and 3. fuse information and create metadata using experts knowledge.

The most commonly used inputs for next-day stock price prediction in the literature are the stock index opening or closing price, as well as the daily highest and lowest values, supporting the statement that soft computing methods use quite simple input data to provide predictions.12 Considering these facts, the metadata creation agent retrieves information about stocks from resources and fuse obtained information to create metadata. 3.3.2. Data-Preprocessing Agent and Its Team This agent aims to prepare the initial data for modeling. It manages a number of subordinate agents, which make up its team. Each subordinate agent specializes in different data preparation techniques such as SRA feature selection and SOMclustering agent. International Journal of Intelligent Systems

DOI 10.1002/int

HYBRID FUZZY INTELLIGENT AGENT-BASED SYSTEM

9

Figure 4. Agent acquaintance diagram for agent teams.

3.3.2.1. SRA Feature Selection Agent. Feature selection is the process of selecting an optimum subset of input variables from the set of potentially useful variables, which may be available in a given problem. Different researchers have applied a variety of feature selection methods such as genetic algorithm,33 principal component analysis,34 and stepwise regression analysis to select key factors in their prediction systems. Among them, in recent years, some researchers have used SRA for feature selection in the field of stock market prediction and they have obtained promising results.35,36 Thus, in this paper, stepwise regression is adopted to analyze and select features and as a consequence improve the prediction accuracy of the system. The stepwise regression method determines the set of independent factors that most closely determine the dependent variable. This task is carried out by means of the repetition of a variable selection. In each of these steps, a single variable is either entered or removed from the model. For each step, simple regression is performed using the previously included independent variables and one of the excluded variables. The criterion for adding or removing is determined by F -test statistic value and decreasing the sum of squared error. After the entrance of the first variable to the model, the variable number is increased step by step. Once it is removed from this model, it will never enter the model again. Before selecting the variables, the critical point, level of significance and the values of Fe (F-to-enter) and Fr (F -to-remove) have to be determined first.37 Then the partial F value of each International Journal of Intelligent Systems

DOI 10.1002/int

10

ZARANDI, HADAVANDI, AND TURKSEN

step has to be calculated and compared to Fe and Fr . If F > Fe , it is considered to add variables to the model; otherwise, if F < Fr , the variables are removed from the model. In this paper, Fe = 3.84 and Fr = 2.71 are used. 3.3.2.2. SOM-Clustering Agent. Clustering is a method for modularizing the problem solving by dividing the data into subpopulations and reducing the complexity of the whole data space to something more homogeneous. Clustering algorithms are classified into two groups: the hierarchical algorithms39 such as the centroid and Ward methods and the nonhierarchical clustering,39 such as K-means and SOM neural networks. Each of these algorithms has their own advantages and disadvantages. Depending on the application, a particular type of clustering method should be chosen. Among clustering algorithms, because of the stable and flexible architecture of SOM neural networks, it has been used in a wide range of applications. Mangiameli et al.40 made a comparison between the self-organizing map neural network clustering and the hierarchical clustering methods. A large number of data sets were used to test the performance of SOM and the hierarchical clustering methods. This research showed that SOM outperforms the hierarchical methods in clustering messy data and has better accuracy and robustness. There are also some researches in the field of prediction that have used SOM neural networks for clustering data, and they have obtained good results.22,36 Thus, in this paper, SOM neural networks are used for clustering datasets. A SOM is an unsupervised learning algorithm. This method was developed by Kohonen.41 The SOM network consists of M neurons arranged in a two-dimensional (2D) rectangular or hexagonal grid. Each neuron i is assigned a weight vector, wi ∈ R n (index i = (p, q) for a 2D map). At each training step t, training data x t ∈ R n are randomly drawn from the data set, which calculates the Euclidean distances between x t and all neurons. A winning neuron with a weight of wj can be found according to the minimum distance to x t : j = arg mini x t − wit , i ∈ {1, 2, . . . , M}

(1)

Then, the SOM adjusts the weight of the winner neuron and neighborhood neurons and moves closer to the input space according to   wit+1 = wit + α t × htj i × x t − wit

(2)

where α t and htj i are the learning rate and neighborhood kernel at time t, respectively. Both α t and htj i decrease monotonically with time and within 0 and 1. The neighborhood kernel htj i is a function of time and distance between neighbor neuron i and the winning neuron. A widely applied neighborhood kernel can be written in terms of the Gaussian function, 

htj i

rj − ri 2 = exp − 2σt2

International Journal of Intelligent Systems

 (3) DOI 10.1002/int

HYBRID FUZZY INTELLIGENT AGENT-BASED SYSTEM

11

where rj and ri are the position of the winner neuron and neighborhood neuron on the map. σt is kernel width and decreases with time. This process of weight updating will be performed for a specified number of iterations. 3.3.3. Function Approximation Agent and Its Team This agent has a hierarchical team of subordinate agents, which serve to carry out two roles: evolving (Takagi–Sugeno–Kang) fuzzy systems for each cluster using a genetic algorithm and evaluation of fuzzy systems and setting their parameters. The function approximation agent has “evolving fuzzy system” and “evaluation” agents under its control. 3.3.3.1. Evolving Fuzzy System Agent. Nowadays FRBS have been successfully applied to a wide range of real-world problems from different areas. To design an intelligent system of this kind for a concrete application, several tasks have to be performed. One of the most important and difficult ones is to derive an appropriate KB about the problem. The KB stores the available knowledge in the form of fuzzy linguistic IF–THEN rules. It is composed of the rule base (RB), constituted by a collection of rules in their symbolic forms, and the data base, which contains the linguistic term sets and the membership functions defining their meanings.42 GAs have been demonstrated to be a suitable tool for automating the definition of the KB, since adaptive control, learning, and self-organization may be considered in a number of cases as optimization or search processes. In particular, the application to the design, learning, and tuning of KBs has produced quite promising results. These approaches can be given the general name of genetic fuzzy systems.43 . The TSK-type FRBS is based on the format of fuzzy inference systems, where the final output is determined as a weighted mean of the outputs for individual rules. For a first-order TSK-type FRBS, a common rule is represented as follows: If x1 is A1 and x2 is A2 , THAN Y = b0 + b1 x1 + b2 x2

(4)

where x1 , x2 are linguistic variables and A1 , A2 are corresponding fuzzy sets and b0 , b1 , b2 are linear parameters. An efficient genetic learning algorithm is used for designing a TSK-type FRBS based on a method proposed by Juang et al.44 This algorithm incorporates symbiotic evolution into the design of a fuzzy system and represents a single fuzzy rule by an individual (i.e., a chromosome). The final fuzzy system is then formed by combining randomly selected rules from the population, with the fitness assignment performed by symbiotic evolution. In the following, the steps of genetic learning that were used in this paper are described. Step 1: Coding fuzzy rules as chromosomes. A Gaussian membership function with variables m and σ representing the center and width of the membership function are used, respectively, and the TSK-type fuzzy rule whose consequent part is a linear combination of the input variables plus a constant value. Coding of the i th fuzzy rule in a chromosome is shown in Figure 5. International Journal of Intelligent Systems

DOI 10.1002/int

12

ZARANDI, HADAVANDI, AND TURKSEN

Figure 5. Coding of ith fuzzy rule in a chromosome.

Step 2: Initialization. Nc initial chromosomes are randomly generated. If the range of thei th input variable, xi be in [mini , maxi ], then the initial values of each mj i (center of membership function) is randomly assigned to a floating point number in [mini , maxi ]. For simplicity, we allow σj i (width of membership function) to be values from {0.3ki , 0.4ki , 0.5ki , 0.6ki } that ki defines as ki = maxi − mini . Hence, the value of σj i is integer coded, with its value being “1,” “2,”“3,” or “4” representing the actual normalized value of {0.3ki , 0.4ki , 0.5ki , and 0.6ki } respectively. In addition, wij is randomly assigned in [−1,1]. Besides the population size, some other parameters need to be specified. These are the number of fuzzy systems to be formed and evaluated per generation, Nf (N1 f ≤ population size), the number of fuzzy rules that constitute a fuzzy system, Nr (N1 r < N1 f), and the probability of mutation, Pm . Step 3: Evaluation step. The evaluation step is to evaluate each chromosome in a population. The fitness value of the kth fuzzy system is defined as follows: Fitness Value(Sk ) =

1 1 + Ek (Y, P )

(5)

where   N 1 Ek (Y, P ) =  (yi − pi )2 N i=1

(6)

where yi is the actual value and pi is the predicted value of the ith training data that was calculated by the kth fuzzy system (S1 k) and N is the number of training data. The average fitness value obtained from the symbiotic evolution process represents International Journal of Intelligent Systems

DOI 10.1002/int

HYBRID FUZZY INTELLIGENT AGENT-BASED SYSTEM

13

Step 1. Randomly choose fuzzy rules from a population of rules, and form a fuzzy system from these rules.

Step 2. Evaluate the performance of the combined fuzzy system to obtain a fitness value.

Step 3. Divide the fitness value by and accumulate the divided fitness value to the fitness record of the selected rules with their fitness records set to zero initiall . Step 4. Repeat times of the above process until each rule has been selected for a sufficient number of times and record the number of fuzzy system which each individual has participated.

Step 5. Divide the accumulated fitness value of each individual by the number of times it has been selected.

Fitness value of each rule (chromosome)

Figure 6. Detailed steps for assigning the fitness value.

the performance of a rule.44 The detailed steps for assigning the fitness value are shown in Figure 6. Step 4: Reproduction. After the evaluation step, the chromosomes are sorted in the population according to decreasing fitness values. After sorting the chromosomes in the population, the top-half best-performing individuals in the population will advance to the next generation. The remaining half will be generated by performing crossover and mutation operations on individuals in the top half of the parent generation. Step 5: Genetic operators. To select the individuals for crossover, binary tournament selection is performed on the top-half best-performing individuals. The offspring are created by performing one-point crossover on the selected parents. After operation, the individuals with poor performance will be replaced by the newly produced offspring. In addition, uniform mutation will be used. Uniform mutation International Journal of Intelligent Systems

DOI 10.1002/int

14

ZARANDI, HADAVANDI, AND TURKSEN

replaces a randomly selected gene with a value chosen from a uniform random distribution between the upper and lower domain bounds for the gene. Step 6: Stopping criteria. If the number of generations equals the maximum generation number, then stop; otherwise go to step 3. 3.3.3.2. Evaluation Agent. This agent is used for evaluation of evolved fuzzy systems for each cluster received by the evolving fuzzy system agent using error comparison. Setting parameters of genetic fuzzy systems is carried out by this agent to gain minimum prediction error. 3.3.4. Knowledge Presentation Agent and Its Team This agent interacts with the user and performs a set of tasks within the prediction, model analysis, what–if simulation and creating reports roles. Its subordinate agents are “what–if simulation,” “prediction,” “model analyzer,” and “creating reports” agents. Details of each agent are described in the following. 1. Prediction agent: It is used to create predictions of next-day stock prices. The input data are first clustered, and stock price prediction is carried out by means of each cluster’s fuzzy system. 2. What–if simulation agent: It is used to get expert’s scenarios and generates the outcomes using evolved fuzzy systems in the previous layers. 3. Model analyzer: It is used to do sensitivity analysis. 4. Creating reports agent: It is used to organize the computer–user interaction and create textual, graphical, and other types of documents.

3.4. Overview of FMAS Architecture and Its Protocols The architecture of FMAS is offered in Figure 7. This view gives a sufficient understanding of the entire system design, and it provides a look on connections between agents with corresponding interactions and undertaken sets of actions. Figure 8 also details the “send fuzzy system results” interaction protocol for the prediction task. As it is observed, the interaction with the environment is carried out by the “user” actor (percepts are originated by an actor going to an agent, whereas actions go from an agent to an actor). Initially, the user actor sends “Input Data P” percept to “Prediction” agent, which contains the required information for predicting nextday stock prices. This agent sends the information perceived from the “Knowledge presentation” agent through the “Input Data M” message. To determine the cluster of perceived input data for prediction, the data are sent to the “function approximation” agent using the “Input Data M” message. After specifying the cluster of data (using “Find Cluster of Data A” action), it is sent by the function approximation agent to knowledge presentation agent using “Cluster M” message. The prediction of next-day stock prices is carried out by knowledge presentation agent using a fuzzy system of related clusters (“Prediction using related FS A” action) and is sent to the prediction agent using “Prediction M” message. Next, the prediction result is sent International Journal of Intelligent Systems

DOI 10.1002/int

15

HYBRID FUZZY INTELLIGENT AGENT-BASED SYSTEM

Figure 7. System overview of FMAS.

Creating reports

User

Prediction

Knowledge presentation

Function approximation

>Input Data_P< Input Data_M Input Data_M



Cluster_M

Prediction_M

Prediction_M

Notation

Actor

Software agent

>Percept
μFMAS μHMM,ANN,GA > μFMAS μHMM,FUZZY > μFMAS μARIMA > μFMAS μANN > μFMAS

statistic called MAPE: N 1 |Yi − Pi | MAPE = 100 × N i=1 Yi

(7)

where Yi is the actual value and Pi is the predicted value of the ith test data obtained from FMAS and N is the number of test data. A summary of FMAS evaluations in comparison with the other models is shown in Table IV. To establish statistical significance, a paired t test is carried out to comparatively evaluate the prediction accuracy between the models used in this paper. To meet this purpose, the following hypotheses are proposed: H0 : There is no difference among prediction accuracy of FMAS and other models H1 : A difference exists among the prediction accuracy of the two models.

Since data used for prediction in all models are the same, a paired t test (two samples for mean) is carried out on the prediction accuracy (MAPE) to test the hypothesis for all cases. The results of paired t tests are shown in Table V. With regard to Table IV, FMAS has improved the prediction accuracy of stock prices in all cases. Namely, FMAS outperforms the rest of the models due to MAPE evaluation and regarding Table V our proposed model is significantly better than the other models so this shows that it can be considered as a promising alternative for stock price prediction problems. International Journal of Intelligent Systems

DOI 10.1002/int

HYBRID FUZZY INTELLIGENT AGENT-BASED SYSTEM

21

Moreover, as Hassan47 mentioned, models that have the lowest MAPE values gain much more profit. Therefore, it is expected that FMAS gains much more profit than other models. 5. CONCLUSIONS AND FUTURE WORK Considering the distributed nature of prediction problems, and autonomous subtasks such as data preprocessing and function approximation, this paper presents a four-layer FMAS architecture for next-day stock price prediction. FMAS has the following characteristics: • FMAS uses the multiagent approach as an appropriate method that can help to reduce the complexity of the prediction problem and increase prediction accuracy by creating autonomous agents, which model independent subtasks of the prediction problem. • FMAS uses SOM clustering to divide data into subpopulations and reduces the complexity of the whole data space to something more homogeneous. • GA has been demonstrated to be a suitable tool for automating the definition of the FRBS. FMAS uses a genetic learning algorithm for extracting the KB of predictor fuzzy systems. • The symbiotic evolution finds solutions in diverse populations and appears to be a faster and more efficient search scheme than the normal evolutionary approaches. FMAS uses symbiotic evolution for the fitness assignment in its ‘evolving fuzzy system’ agent. • Moreover, investors are capable of handling nonlinearity, complexity, as well as uncertainty that may exist in actual data sets with respect to stock market time series due to erratic responses originated from social and economic factors. FMAS will provide investors with improved prediction and decreased error in complex and uncertain environments.

To evaluate the prediction accuracy of FMAS, it was applied on the stock price data of IBM and Dell Corporation from the IT sector British airways and Ryanair from the Airline sector, which had been used in different papers as the case study. Results showed that the prediction accuracy of FMAS outperforms the rest of the approaches regarding MAPE evaluation, and it is able to cope with the fluctuations of stock price values and also yields good prediction accuracy in short-term stock price prediction. Thus, FMAS can be used as a suitable prediction tool to deal with stock price prediction problems. Future research efforts will be devoted to (1) extensively evaluate the effectiveness of FMAS using other case studies from contexts involving social and economic systems and (2) focusing on combining predictor or committee methods by means of generating intelligent predictor team agents. The idea here is that a team may exhibit performances unobtainable by a single predictor agent, because the errors of the agents might cancel out when their outputs are combined.

References 1.

Kim Kj. Financial time series forecasting using support vector machines. Neurocomputing 2003;55:307–319. International Journal of Intelligent Systems

DOI 10.1002/int

22 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27.

ZARANDI, HADAVANDI, AND TURKSEN Sokolova MV, Fern´andez-Caballero A. Evaluation of environmental impact upon human health with DeciMaS framework. Expert Syst Appl 2012;39(3):3469–3483. Purvis M, Cranefield S, Ward R, Nowostawski M, Carter D, Bush G. A multi-agent system for the integration of distributed environmental information. Environ Model Softw 2003;18(6):565–572. Sokolova, Ferna´ndez-Caballero A. Evaluation of environmental impact upon human health with DeciMaS framework. Expert Syst Appl 2012;39(3):3469–3483. Fazel Zarandi M, Ahmadpour P. Fuzzy agent-based expert system for steel making process. Expert Syste Appl 2009;36:9539–9547. Johnson NF, Lamper D, Jefferies P, Hart M, Howison S. Application of multi-agent games to the prediction of financial time series. Physica A 2001;229:222–227. Lee R, Liu J. iJADE WeatherMAN: a weather forecasting system using intelligent multiagent-based fuzzy neuro network. IEEE Trans Syst Man Cybernet C 2004;34:369– 377. Jumadinova J, Dasgupta P. A multi-agent system for analyzing the effect of information on prediction markets. Int J Intell Syst 2011;26:383–409. Meshkin A, Aghaee NG, Sadeghi M. Modeling and implementing an agent-based system for prediction of protein relative solvent accessibility. Expert Syst Appl 2011;38:6324– 6332. Gamil AA, El-fouly RS, Darwish NM. Stock technical analysis using multi agent and fuzzy logic. In: Proc World Congress on Engineering; 2007. Antonello R, Silveira R. Multiagent systems in stock index prediction. Adv Intell Soft Comput 2010;71:563–571. Atsalakis GS, Valavanis KP. Surveying stock market forecasting techniques–Part II: soft computing methods. Expert Syst Appl 2009;36:5932–5941. Auda G, Kamel M. Modular neural networks: a survey. Int J Neural Syst 1999;9(2):129–151. Sharkey AJ. Combining artificial neural networks. Berlin: Springer; 1999. Abraham A, Nath B, Mahanti PK. Hybrid intelligent systems for stock market analysis. In Alexandrov VN, Dongarra J, Julianno BA, Renner RS, Tan CJK, editors. Computational science. Berlin, Germany: Springer-Verlag. 2001. pp 337–345. Konar A. Computational intelligence: Principles, techniques. Berlin: Springer; 2005. Fazel Zarandi M, Gamasaee R, Turksen I. A type-2 fuzzy c-regression clustering algorithm for Takagi–Sugeno system identification and its application in the steel industry. Inform Sci 2012;187:179–203. Fazel Zarandi M, Faraji M, Karbasian M. Interval type-2 fuzzy expert system for prediction of carbon monoxide concentration in mega-cities. Appl Soft Comput 2012;12(1):291–301. Acampora G, Loia V, Salerno S, Vitiello A. A hybrid evolutionary approach for solving the ontology alignment problem. Int J Intell Syst 2012;27(3):189–216. Hadavandi E, Shavandi H, Ghanbari A. Integration of genetic fuzzy systems and artificial neural networks for stock price forecasting. Knowl Based Syst 2010;23:800–808. Alizadeh M, Rada R, Jolai F, Fotoohi E. An adaptive neuro-fuzzy system for stock portfolio analysis. Int J Int Syst 2011;26:99–114. Hadavandi E, Shavandi H, Ghanbari A, Abbasian S. Developing a hybrid artificial intelligence model for outpatient visit forecasting in hospitals. Appl Soft Comput 2012;12(2):700– 711. Khashei M, Hejazi SR, Bijari M. A new hybrid artificial neural networks and fuzzy regression model for time series forecasting. Fuzzy Sets Syst 2008;159:769–786. Palmer RG, Arthur WB, Holland JH, Baron BL. An artificial stock market. Artif Life Robot 1999;3(1):27–31. Hwang H, Oh J. Fuzzy models for predicting time series stock price index. Int J Control Automation Syst 2010;8(3):702–706. Chang P, Liao T. Combining SOM and fuzzy rule base for flow time prediction in semiconductor manufacturing factory. Appl Soft Comput 2006;6(2):198–206. Cord´on O, Herrera F, Hoffmann F, Magdalena L. Genetic fuzzy systems: evolutionary tuning and learning of fuzzy knowledge bases. Singapore: World Scientific; 2001. International Journal of Intelligent Systems

DOI 10.1002/int

HYBRID FUZZY INTELLIGENT AGENT-BASED SYSTEM 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47.

23

Eiben A, Smith J. Introduction to evolutionary computation. Berlin, Germany: Springer; 2003. Hadavandi E, Shavandi H, Ghanbari A. An improved sales forecasting approach by the integration of genetic fuzzy systems and data clustering: case study of printed circuit board. Expert Syst Appl 2011;38:9392–9399. Wooldridge M, Jennings N. Intelligent agents: theory and practice. Knowl Eng Rev. 1995;10(2):115–152. Huhns MN, Stephens LM. Multiagent systems and societies of agents. In G. Weiss (Ed.), Multiagent systems. Cambridge, MA: MIT Press; 1999. Padgham L, Winikoff M. Developing intelligent agents systems: A practical guide. Hoboken, NJ: Wiley; 2004. ElAlami M. A filter model for feature subset selection based on genetic algorithm. KnowlBased Syst 2009;22(5):356–362. Zhang YX. Artificial neural networks based on principal component analysis input selection for clinical pattern recognition analysis. Talanta. 2007;73(1):68–75. Chang PC, Liu CH. A TSK type fuzzy rule based system for stock price prediction. Expert Syst Appl 2008;34:135–144. Hadavandi E, Ghanbari A, Shahanaghi K, Abbasian S. Tourist arrival forecasting by evolutionary fuzzy systems. Tourism Manage 2011;32(5):1196–1203. Burkholder TJ, Lieber RL. Stepwise regression is an alternative to splines for fitting noisy data. J Biomech 1996;29(2):235–238. Anderberg MR. Cluster analysis for applications. New York: Academic Press; 1973. Oliveira JVD, Pedrycz W. Advances in fuzzy clustering and its applications. Hoboken, NJ: Wiley; 2007. Mangiameli P, Chen S, West DA. Comparison of SOM neural network and hierarchical clustering methods. Eur J Oper Res 1996;93:402–417. Kohonen T. The self-organizing map. Neurocomputing 1998;21(1–3):1–6. Cord´on O, Jesus MJd, Herrera F, Lozano M. MOGUL: a methodology to obtain genetic fuzzy rule-based systems under the iterative rule learning approach. Int J Intell Syst 1999;14(11):1123–1153. Alcal´a R, Alcal´a-Fdez J, Casillas J, Cord´on O, Herrera F. Local identification of prototypes for genetic learning of accurate TSK fuzzy rule-based systems. Int J Intell Syst 2007;22(9):909–941. Juang CF, Lin JY, Lin CT. Genetic reinforcement learning through symbiotic evolution for fuzzy controller design. IEEE Trans Syst Man Cybernet B 2000;30(2):290–302. Hassan MR, Nath B. Stock market forecasting using hidden Markov model: a new approach. In: 5th Int Conf on intelligent system design and application; 2005; Poland. pp 192–196. Hassan MR, Nath B, Kirley M. A fusion model of HMM, ANN and GA for stock market forecasting. Expert Syst Appl 2007;33:171–180. Hassan R. A combination of hidden Markov model and fuzzy model for stock market forecasting. Neurocomputing 2009;72:3439–3446.

International Journal of Intelligent Systems

DOI 10.1002/int