15
Fuzzy Clustering Rule-Based Expert System for Stock Price Movement Prediction Behnoush Shakeri, M.H. Fazel Zarandi, Mosahar Tarimoradi, I.B. Turksen Redmond, Washington, USA, August 17-19, 2015 AmirKabir University of Technology (Tehran Polytechnic)

Fuzzy Clustering Rule-Based Expert System for Stock Price Movement Prediction

Embed Size (px)

Citation preview

Fuzzy Clustering Rule-Based Expert System for Stock Price Movement Prediction

Behnoush Shakeri, M.H. Fazel Zarandi, Mosahar Tarimoradi, I.B. Turksen

Redmond, Washington, USA,

August 17-19, 2015

AmirKabir University of Technology (Tehran Polytechnic)

Objectives of the Proposed Expert System

Literature Review

Procedure of the Proposed Model

Implemental Results

Conclusion

Main references

Table of Content

To Predict stock prices is considered as a vital financial problem

The development of effective strategies for stock exchanges’ transactions and

investment decision making

To use Fuzzy logic expert system for dealing with uncertain and ill-defined

environmental parameters and extracting valuable information from numerical

data

Objectives of the Proposed Expert System

Literature Review

Contributor Tool Case Study

Chang and el. SOM, NN and Fuzzy Rule Sale of a company

Chang & Liu. TSK Fuzzy Rule Stock price

Fazel Zarandi et al. Four Layer Fuzzy Multi-agent System

Stock price

Soto, J et al.Optimized Type 2 Interval

ensemble of ANFIS Stock index

B. Sun et al. Multivariate Fuzzy Time Series Index Futures prices

TABLE 1. Review on previous studies

Procedure of the Proposed Model

Decision Making

Output Clustering

Input Selection

Projection

Rule Extraction

Data gathering and preparation

Knowledge base

User Interface

Inference Engine

Fig. 1. Developed Fuzzy Expert System

Variable DescriptionHigh Maximum price of stock in a trading dayLow Minimum price of stock in a trading day

Volume Transaction is made

Change Difference between today's and the previous day’s close price

MACDThe difference between a fast and slow exponential moving average (EMA) of closing prices. Fast means a short-period average, and slow means a long period one

MAMoving averages are used to emphasize the direction of a trend and smooth out price and volume fluctuations that can confuse interpretation

BIASThe difference between the closing value and moving average line, which uses the stock price nature of returning back to the average price to analyze the stock

RSIThe magnitude of recent gains to recent losses in an attempt to determine overbought and oversold conditions of an asset

William %R Determine overbought and oversold conditions of an asset

TABLE 2. Input Variable Description

Data Gathering and Data Preparation

The database can be normalized in order to provide a limited range of values within a norm and have an integrated data set. In this study, the commonplace method is used. The advantage of this approach is that data distribution remains approximately constant.

Output Clustering and Validity Indexes

Development of an effective fuzzy logic system using the indirect approach highly depends on clustering quality of the output space. Cluster analysis aims at identifying groups of similar objects; therefore, it helps to discover the distribution of patterns and interesting correlations in large data sets. The applied approach are FCM and GK.

The problem for finding an optimal number of clusters is usually called cluster validity. Once the partition is obtained by a clustering method, the validity function can help us to validate whether this number of clusters accurately presents the structure of the data set or not. As a result, an appropriate tool is essential to figure out the optimal number of clusters which can efficiently represent the behavior of our data set. Applied validity indexes are including Partition Coefficient, Sugenu Index and Kwon Index.

Input Selection and Projection

Based on managing the large-scale datasets point of view, selecting the most pertinent and effective input variables among various variables in the system modeling plays an important role in classification. In this paper Sugeno’s combinatorial approach is applied in which al1 possible combinations of input candidates are considered.

During the structure identification phase, the fuzzy membership values can be determined on the basis of three different strategies with respect to how fuzzy clustering is utilized. Clustering the output space and obtaining the fuzzy membership functions based upon the projections of the output clusters to the input space is the applied projection approach for constructing the rule base in this paper.

Rule Extraction

In this paper, the fuzzy rule base has been identified as “IF-THEN” rule, each of which is represented as:

Rule number i (Li):

IF xl isr Ail , x2 isr Ai

2 , . . . , xm isr Aim ,

THEN yi isr Gi

Decision Making Criterion

A criterion is defined by Chang to advise users regarding the trend of stock price movements. This decision making criterion is as follow.  

Where:: Closing price of an individual stock in the tth period.

: Closing price of an individual stock in the (t-1)th period.

If y is greater than +0.5%, the decision is to sell the stock (Decreasing trend in stock price). On the other hand, if y is less than -0.5%, the decision is to buy the stock (Increasing trend in stock price). Otherwise, the decision is to hold the stock.

User Interface

In order to turn our expert system into a more user-friendly and easy-to-use system, a frame was defined for entering the needed input variables. A person can also easily enter the value of input variables and choose his desirable inference engine. Hence, the proposed expert system predicts the next-day close price of the stock according to its knowledge base and assists the user with his investment decision based upon the predicted stock trend.

Class: Technical IndexesAttribute Value

Volume [N]Change [N]MACD [N]

MA [N]BIAS [N]

TABLE 3. Frame for Technical Indexes

• The proposed system uses a forward-chaining approach. In other words, the

initial information about the technical variables is asked and asserted into

working memory.

• The user can connect to the rule-based system and decide about the investment

through a graphical user interface designed with Graphical User Interface (GUI)

in MATLAB.

Architecture of the Proposed Expert System

Fig. 2. Proposed fuzzy expert system user-interface

Implemental results

Fig. 3. Mamdani’s approach FLS Fig. 4. Logical’s approach FLSFig. 5. Unified approach FLS

In this paper, a fuzzy rule-based expert system for stock price movement prediction was

presented. Regarding to have an efficient expert system, an interface was designed by the

Matlab Graphical User Interface (GUI). The following results depicts that our proposed

fuzzy expert system has considerable performance with less than 3% error which enables

us to recognize data patterns efficiently.

Following studies will concentrate on clustering algorithm such as PCM-based clustering

algorithms and presenting a new validity index.

The fuzzy rule-base would transform into an interval type-2 fuzzy rule-base.

Conclusion and Future Studies

Main references

Alizadeh, M., et al., An adaptive neuro‐fuzzy system for stock portfolio analysis.

International Journal of Intelligent Systems, 2011. 26(2): p. 99-114.

Chang, P.-C., C.-Y. Fan, and J.-L. Lin, Trend discovery in financial time series data using a

case based fuzzy decision tree. Expert Systems with Applications, 2011. 38(5): p. 6070-6080

Zarandi, M.F., I. Turksen, and B. Rezaee. A systematic approach to fuzzy modeling for rule

generation from numerical data. in Fuzzy Information, 2004. Processing NAFIPS'04. IEEE

Annual Meeting of the. 2004. IEEE.

Sugeno, M. and T. Yasukawa, A fuzzy-logic-based approach to qualitative modeling. IEEE

Transactions on fuzzy systems, 1993. 1(1): p. 7-31.