TECHNICAL ANALYSIS OF FUZZY METAGRAPH BASED DECISION SUPPORT SYSTEM FOR CAPITAL MARKET

This study proposes a Fuzzy Metagraph based Decision Support System (DSS) for short term and long term investment in share market. This rule base decision system will help traders to make correct decision at very low risk. Relative Strength Index (RSI), Moving Average Convergence Divergence (MACD) and WILLIAM-%R are some of the Technical Indicators which are used as input to train the system which is integrated with Fuzzy Metagraph. This approach of incorporating Fuzzy Metagraph with RSI, MACD and WILLIAM-%R would be a new attempt in decision making on share market investment. Stocks listed in Bombay Stock Exchange (BSE) in India are used to evaluate the performance of the system. The results obtained from the proposed Fuzzy Metagraph based model are found to be satisfactory with very low risk. Three most used technical indicators MACD, RSI and WILLIAM-%R integrated with Fuzzy Metagraph are used to support the system. This method reduces the risk factor considerably for both short term and long term investors.


INTRODUCTION
An equity market is a public entity for the trading of company shares. The purpose of a stock exchange is to facilitate the exchange of shares between buyers and sellers. A company looking for capital to start a new venture lists their stocks in stock exchanges. Buyer or seller of stocks include individual retail investors, institutional investors like mutual funds, banks, insurance companies and hedge funds and also publicly traded corporations trading in their own shares. Involvements of institutions have reduced trading cost encouraging many small investors to enter into the market. Though big investors and institutions decides market movement, the small investors plays a vital role in daily turnover of the market. Most of the small investors are short term investor, who does not carry their positions more than a year.
A trader decides about what share to trade, when to trade, using either fundamental or technical analysis. Fundamental analysis use information about economic condition of the nation and world, financial state and management of the company's involved, current political and weather information.
Technical analysis is a method of analyzing stock price movement by using historical price information to predict future price of a stock. There are many way of analyzing stock movement. Technicians also look for relationships between price/volume indices and market indicators. Some of the important technical indicators include the Relative Strength Index (RSI) and Moving Average Convergence-Divergence (MACD), William-%R and On Balance Volume (OBV).
Fuzzy metagraph is an emerging technique used in the design of many information processing systems like transaction processing systems, decision support systems and workflow Systems. We have developed a stock Science Publications JCS market decision support system for short term investors using fuzzy metagraph technique.
The rest of the study is organized as follows. Section 2 gives the related work. Section 3 points out various technical indicators of the stock market and fuzzy metagraph technique. In section 4 the system results has been discussed. Section 5 concludes the study. Gamil et al. (2007) have proposed a multi agent and fuzzy logic model for stock market decision making based on technical analysis. They used short term to long term Moving Average indicators to develop a decision making system. The model is tuned and modified using genetic algorithms. The DSS has been integrated into an agent based frame work to enhance the stock information retrieval process and to be accessible through the Internet. Vaidehi and Monica (2008) have proposed a subtractive clustering based fuzzy system identification method to model a prediction system that can predict future movement of stock prices by taking samples of past events. When recent data are given to the trained system, it gives the possibility of a rise or a fall along with the next possible value of data. The prediction model is trained by daily market price data. It can also be used as a weekly or a monthly predictor. Kasemsan and Radeerom (2011) have proposed a decision-making model based on the application of Neuro fuzzy systems. The model has been applied in order to make a one-step forward decision, considering historical data of daily stock returns. They have used RSI, MACD and other indicators to support the trading system o formulate a trading strategy which achieves more stable results and higher profits when compared with Neural Networks and the Buy and Hold strategy. Gaur et al. (2008a;2008b;2008c) proposed a model for metagraph data structure. They have used to store data inside the computer memory either in the form of Adjacency matrix or in Adjacency list so it has been used efficiently, they have proposed metagraph based substructure pattern mining technique. They have proposed fuzzy metagraph method of clustering to find the similar fuzzy nodes in a fuzzy metagraph. They have used T-norms (Triangular Norms) functions and join two or more T norms to cluster the fuzzy nodes. Dashore and Jain (2010a; 2010b) used rule based system and fuzzy metagraph for real world application (Online Transaction such as banking, E commerce and share market) to make correct decision. It has been constructed by projection operation of a fuzzy metagraph to provide high level view that reduces the unnecessary details. The projection of fuzzy metagraph is more dominant because there is less number of edges. Zheng-Hua (2006) proposed a Fuzzy Metagraph based knowledge representation. The FM has been applied to fuzzy rule-based systems for knowledge representation and reasoning. In the format of algebraic representation and FM closure matrix. The above related papers forms the basis for integrating Fuzzy Metagraph with RSI, MACD and WILLIAM-%R for taking decisions in Share market investments.

Technical Indicators
Technical Indicator is a result of mathematical calculations based on indications of price and/or volume. The values obtained are used to forecast probable price changes. Technical indicators look to predict the future price levels, or simply the general price direction, of a security by looking at past patterns. Though single indicator can give reliable buy or sell signal, the results can be improved by using multiple indicators.

Relative Strength Index (RSI)
A momentum oscillator that measures the speed and change of price movements. RSI oscillates between zero and 100.
The very first calculations for average gain and average loss are simple 14 period averages.
First Average Gain = Sum of Gains over the past 14 periods/14. First Average Loss = Sum of Losses over the past 14 periods/14. The second and subsequent, calculations are based on the prior averages and the current gain loss: Average Gain = [(previous Average Gain) x 13 + current Gain]/14. Average Loss = [(previous Average Loss) x 13 + current Loss]/14 RSI is considered overbought when above 70 and oversold when below 30. Signals can also be generated by looking for divergences, failure swings and centerline crossovers. RSI can also be used to identify the general trend. Buy signal is generated when RSI is near 30 and sell signal is generated when RSI is near 70.

Moving Average Convergence Divergence
MACD indicator is one of the simplest and most effective momentum indicators available. The MACD turns two trend-following indicators, moving averages, into a momentum oscillator by subtracting the longer moving average from the shorter moving average. The Standard MACD Line is the 12-day Exponential Moving Average (EMA) less the 26-day EMA. Closing prices are used for these moving averages. A 9-day EMA of the MACD Line is plotted with the indicator to act as a signal line and identify turns. Buy signal is generated when MACD turns up and crosses above the signal line. Sell signal is generated when MACD turns down and crosses below the signal line.

William-%R
Developed by Larry Williams, William-%R is a momentum indicator which reflects the level of the close relative to the highest high for the look-back period. William-%R oscillates from 0 to-100. Readings from 0 to-20 are considered overbought. Readings from-80 to-100 are considered oversold. The default setting for William-%R is 14 periods, which can be days, weeks, months or an intraday timeframe. Buy signal is generated when William-%R is near-80.Sell signal is generated when indicator is near-20.

Fuzzy Metagraph
A metagraph S = {X, E} is a graphical representation consisting of two tupelos X and E. Here X is its generating set and E is the set of edges defined on generating sets (Basu and Blanning, 2001) .
A fuzzy graph G ɶ can be defined as a triple {X, X ɶ , E ɶ }, where X ɶ is a fuzzy set on X and E ɶ is a fuzzy relation on X×X A fuzzy set X on X is completely characterized by its membership function µ:X→ [0, 1] for each x∈X, µ(x) illustrates the truth value of the statement of "x belongs to X ɶ ". The fuzzy metagraph is the concept of Fuzzification of the crisp Metagraph using fuzzy generating set. Fuzzy generating set is the node set of all the elements of fuzzy metagraph.
Consider a finite set X = {x1, x2, x3,…, x n }. A fuzzy metagraph is a triple S ɶ ={X, X ɶ , E ɶ } in which X ɶ is a fuzzy set on X and E ɶ is a fuzzy edge set { e ɶ m ,m=1, 2, 3,.. m}. Each component e ɶ in E ɶ is characterized by an ordered pair < m V ɶ , m W ɶ >. In the pair m V ɶ subset of X ɶ is the in-vertex of m e ɶ and m W ɶ subset of W ɶ is the out-vertex.

Fuzzy Expert System
Fuzzy expert system consists of Fuzzification, inference system, rule base and Defuzzification units. It has the capability to solve decision making problems for which no exact algorithm exists. Fuzzy expert systems are well to problems that exhibit uncertainty resulting from inexactness, vagueness or subjectivity. Fuzzy expert system architecture used in this system is shown in the Fig. 2.
Fuzzification is the process of converting crisp input to fuzzy value. Membership Functions (MFs) are used to convert crisp inputs into fuzzy value.  The MF maps each element of input to a membership grade (or membership value) between zero and one (Abraham, 2005). A rule-based system consists of ifthen rules, a set of facts and an interpreter controlling the application of the rules, given the facts. These ifthen rule statements are used to formulate the conditional statements that comprise the complete knowledge base. A single if-then rule assumes the form 'if x is A then y is B' and the if-part of the rule 'x is A' is called the antecedent or premise, while the then-part of the rule 'y is B' is called the consequent or conclusion. A fuzzy inference system implements a nonlinear mapping from its input space to output space through a number of fuzzy if-then rules. The three most popular inference systems used in fuzzy logic are the: Mamdani fuzzy model, Tagaki-Sugeno fuzzy model and Tsukamoto model. In this study Mamdani Fuzzy model is used. Finally, Defuzzification is applied to convert the fuzzy output set to a crisp output (Bova and Codara, 2010).    Membership function is in the range of [0, 1] the membership function converts the crisp inputs to 'NEG' and 'POS' fuzzy values. Figure 6 shows the membership function for William-%R. Triangle function is used as membership function. Crisp inputs given to the fuzzification module is converted into set of fuzzy variable. Input variable William-%R is in the range of [-100, 0].
Fuzzy inference system consists of knowledge base and set of rules. The inference engine processes the input data by asking questions until the hypothesis is either confirmed or disproved. Figure 7 shows the rule editor and Fig. 8 and Shows the rule viewer. Rule viewer gives the final crisp output from the fuzzy inference system. Proper decisions can be made based on the output of the rule viewer.

System Results
Stocks listed in Bombay stock exchange are used to evaluate the system. Stock data are collected from the website of Bombay stock exchange for the period 06/01/2011 to 06/01/2012.Rs.50,000 is used as capital for each investment. A buy signal from the expert system is used to buy stock and sell signal is used to sell that stock. Only LONG type investment is used to assess the performance of the system. Buy and hold method may give better result than the proposed one but it is of very high risk where as the proposed method has very low risk. Table 1-3 shows the expert system result for some selected stocks listed in Bombay stock exchange. Figure 9 shows one year RSI plot for TCS listed in Bombay Stock Exchange in India, this plot is used by traders to make buy and sell decision. One year MACD Plot for TCS listed in BSE in India is shown in Fig. 10. Positive value of MACD is used to make buy call. Negative Value of MACD is used to sell. Figure 11 shows one year William-%R plot for TCS, India. William-%R oscillates from 0 to-100. Readings from 0 to-20 are considered overbought. Readings from-80 to-100 are considered oversold.

CONCLUSION
This study proposes a Fuzzy Metagraph model for stock market decision making based on technical analysis. Three most used technical indicators MACD, RSI and WILLIAM-%R integrated with Fuzzy Metagraph are used Science Publications JCS to support the system. The performance of the model is tested using data from Bombay stock exchange. The results are satisfactory. This method reduces the risk factor considerably for both short term and long term investors. Future works may concentrate on optimization techniques applied for tuning the input parameters to enhance the performance of the system.