Views 
   PDF Download PDF Downloads: 1601

 Open Access -   Download full article: 

Fuzzy Logic based Stock Value Prediction using Fundamental Analysis

Chittaranjan Mangale*, ShyamSundar Meena and Preetesh Purohit

Dept. of computer Science and Engineering Swami Vivekanand College of Engineering, Indore,

 

Corresponding author Email: chittaranjan167@ gmail.com

DOI : http://dx.doi.org/10.13005/ojcst/10.01.16

Article Publishing History
Article Received on : February 27, 2017
Article Accepted on : March 15, 2017
Article Published : 16 Mar 2017
Article Metrics
ABSTRACT:

Stock market is very versatile and fluctuates with time. For the same way it becomes difficult to predict movement of the stock, there are various approaches and tools through which the price of the stock is determined by the past patterns. Mostly the approaches are in terms of fundamental approach and technical approach. For the long-term valuation fundamental approach is used. Every stock is having its own value that does not depend on the price of the stock that is known as Intrinsic value. The proposed model works through phases of data collection, feature processing, fuzzy logic mapping and stock value calculation. Fuzzy logic is used to map the quality as well as quantity valuation factors. The IF THEN rules are applied on the linguistic variable.  The fuzzy model outcomes the stock value which is used to provide stock worth. The stock value is calculated by Dividend discount model. Accuracy of the system is 0.77. The results offer the backbone for the value and not the price.

KEYWORDS: Fuzzy Logic; Intrinsic Value; Stock Valuation

Copy the following to cite this article:

Mangale C, Meena S, Purohit P. Fuzzy Logic based Stock Value Prediction using Fundamental Analysis. Orient.J. Comp. Sci. and Technol;10(1)


Copy the following to cite this URL:

Mangale C, Meena S, Purohit P. Fuzzy Logic based Stock Value Prediction using Fundamental Analysis. Orient.J. Comp. Sci. and Technol;10(1). Available from: http://www.computerscijournal.org/?p=4862


Introduction

Recently there is lots of technical work have been updated in the research area of prediction1. Stock prediction is the field where stock price is considered as the means of profit. In this business money is input as well as output. According to the Ben Graham, the investment operation is nothing but to maintain surety of the stock as safe principal along with continuous profit margin on the principal. Investors today are habitual with expert systems to handle the complex operations strategies for valuation. There are the two common approaches where the stock price prediction is done by the Investors, Short term approach and long term approach. Price of the stock fluctuates in the short run of the stock and investors uses their benefits. In the long term the stock fluctuation is not considered as the means for the investment. The Intrinsic value depends on the fundamentals not on the external parameters such as election, draught etc. Fundamentals of the stock include P/E ratio, eps growth, sales growth, return on assets, operating margin etc. It is very strict to step in to shoes of the old school person in investing by an accurate incantation algorithm. That makes valuable incomes for financial affair firms, indicating a gat a handle on something relationship surrounded by the certainty of the incantation algorithm and the prosperity made from by the algorithm.

There is a difference between stock value and its price. Price is that shows the trading value and stock value is an underlying value irrespective of the trading price that does not depend on the current state of the stock price2. Mostly the emotions of the traders and the rumors affect the price. Investors work is to analyze the values compare it with the prices according to margin of safety make Investment or sell them. Determining accomplishment of technical approach is absolutely difficult merit its subjective quality of these practices3.

The illusion of financial market indicators is a tenor of full practical accomplishment and, if prosperous, commit involve enormous pecuniary rewards. Many classifiers have been second hand for several ages in the levy of investments, everything being equal of their right to notice patterns of process that are not lavishly observable. Much of this has been proprietary for the indisputable reason that the users hast a preference for to take bulk of the point of view into the market that they gained over the handle of new technology.

Related works

Konstantinos N. Pantazopoulos et al. clearly assess the energy of neurofuzzy modeling in the background of financial divination and management. They had perceived two cases. Neurofuzzy prediction approaches are used smoothly to expect financial variables in a style that is stunning from an investment incorporate of view4. Lixin Yu and Yan-Qing Zhang eventually work on recurrent neural networks and recurrent fuzzy networks. In their act, a genetic recurrent fuzzy program based on the arrangement of RSONFIN is studied. Many supervised study algorithms have been proposed for recurrent network trainings5. Kai Keng Ang and Chai Quek proposes a model that the industry profits is more significant to an investor than statistical stance, these neuro-fuzzy systems are concerted as the lurking predictor ideal in forecasting stock rate difference by the whole of a anticipate bottleneck ad hoc transaction decision model using approaching average trading rules. Stock prices of NOL and DBS are considered as experiment6. Ahmed, Raaffat and Nevins (2007) propose a paper coming a multi press and fuzzy logic ideal for stock market decision making based on modern analysis. The ideal was tuned and modified for genetic algorithms. The DSS was entire into a public relations consultant based on frame function to gain the stock taste retrieval style, and forthcoming accessible through the Internet. NASDAQ stock exchange data is gathered. Technical Analysis approach is used7. Lean Yu, Huanhuan et al. work on an evolving LSSVM epitome integrating LSSVM and EAs which is use to perceive stock market tendency. It is value noting, anyway, that the approaching evolving LSSVM study paradigm could be also improved in the future, a well known as in areas of jointly learning and ensemble. Particularly, on a part two of putting air experiments, they let introduce that the eventual evolving LSSVM ideal not solo maximizes the generalization attitude but furthermore selects a close but no cigar acrimonious ideal evolution by all of LSSVM8. Haoming Huang and Chai Quek proposed a system for frugal industry strategy using the value percentage oscillator (PPO) as the potent technical indicator, which is adopted to bring about trading signals in the eventual system. The potent hardship for the HiCEFS predictive ideal is to foresee the infinity PPO in order to nick profit by making preemptive trading transactions. To inspire an ironclad predictive epitome, the hierarchical co evolutionary genetic algorithm is made9.  Ganesh Bonde, Rasheed Khalid use genetic algorithms, the built-in algorithm was adept to expect better than the evolutionary strategies in all cases. The evolutionary action toward reached a truthfulness of 70% or better in for the most part cases. They used two offbeat datasets for predicting the summer stock prices. The sooner one constitutes training fit and the other constitutes testing set. This course of study is established so that they can verify if over-fitting is occurring or not. The results uncover that overall results has not occurred10. Eisuke Kita et al. propose a model in which errors are estimated individually, difference surrounded by the evident and predicted stock prices. Then, the dressed to the network is energetic from both time-series stock outlay data and its incantation errors in decision to expect the stock price. The Bayesian network combination was avid from the time-series stock value data in term to perceive the stock price. In this design, the immediate algorithm is request predicting the stock rate which was once observed 11. Yanshan Wang and Anam-dong proposed a PCA SVM approach. In this model, they had approach a PCA-SVM integrated ideal to foresee the directions of the stock market indices and the abandoned stock prices. In the ideal, the dominant components identified separately PCA are hand down along mutually internal and external across the counter factors in SVM for forecasting. Exemplar uses KOSPI and HSI. Since their experiments computed the one-day-ahead predictions for rolling windows statement of invent period, the results are not the produce of tentative sample assignment but reliable by the whole of all the accessible information at that time12. Khalid Alkhatib et al. use kNN algorithm, the fascination results were bring to a do to obvious prices. Having such pragmatic results for predictions in tenacious, and for per disclosure mining techniques in trustworthy life; this presents a useful indication that the handle of disclosure mining techniques could uphold decision makers at disparate levels when by kNN for data analysis13. V. Govindasamy and P. Thambudarai work demonstrates the fruitful capabilities of the Probabilistic Fuzzy Logic act for implementing verdict making tasks in the stock market prediction. It is mainly expected for predicting the infinitesimals direction of stock prices via empirical datasets14. Osman Hegazy et al. proposed ABC algorithm, the eventual LSSVM-ABC ideal Convergence to an overall minimum cut back be expected. Also coming ideal recuperates the over-fitting jams which stay in ANN, specifically in status of fluctuations in stock sector. LSSVM-ABC algorithm parameters boot be tuned easily. Optimum ground by the proposed model is overtaking than LSSVM-PSO and LSSVM15. Wijn and Nuij et al. proposed a framework about genetic system which is used to nab complex market rules based on modern indicators and news-based signals. For this end, we concern three foreshadow horizons when computing the endurance of the market strategies based on the generated returns, namely a well known, three, and five days afterwards the copulation of a competitive or sell signal16. V. Govidasamy et al. proposes a divination of events based on Complex Event Processing and Probabilistic Fuzzy Logic which is implemented in real-time Stock Market Prediction. The stock value is predicted mutually higher accuracy. The program will be in a superior way enjoyable for investors as it will devote them act idea as which stock will have more value17. Desheng Dash Wu et al propose a model to examine the relationship analysis of sentiment and stock rate volatility orientation at the industry directly. They assorted the verdict of the sentiment-related skepticism interval keeping parameters like GARCH terms and the ARCH terms in the GARCH-SVM models unchanged. Experimental results unspoken that well the values of the censure of the sentiment-related provision would success accuracy18. Partha Roy et al. use fuzzy system in their model. The coming system is good to unconditionally forecast the trend, which was experimented for contradictory set of data of different years. The experimentation was done on NIFTY-50 index values and was stay successful19. Rajesh Argiddi et al propose a different pattern discovery models and summarized new enhancements20.

Existing Systems

There are two approaches which are interrelated.

Dynamic Probabilistic Fuzzy Relation Model (DPFRM)

According to the stock request data dependencies mid event sequences been calculated. Probability distribution work is form to speculate dependencies. Dynamic Probabilistic Fuzzy Relation Model is worked for getting the non linear and relationships between events to infinity trends. This epitome consists of parameters of both examination approaches a well known as fundamental as abundantly as technical. Indicators such as GDP, Manufacturing Index, Inflation, Interest rate, Govt Policies, S&P 500, PE, EG, Debt to Asset are used14.

Probabilistic Fuzzy logic with Complex Event Processing (PFCEP)

Cause and effect relationship is broadly voiced by perplexing event processing. Uncertainty occurs between when unprocessed message is taken. Stock market incantation area uses CEP. The prevalent pupose of complicated event processing is to see out eloquent events. Complex event processing along mutually Probabilistic Fuzzy logic is termed as PFCEP is used for stock rate prediction. This epitome works in three phases Data collection, preprocessing and learning methods. In report accumulation phase disparate statement from online word sources are collected. CEP adaptors are secondhand for accumulation of data. Feature processing phase consists of data preparation Integration and enrichment besides all the data is aggregated into such by agglomeration phase. In learning phase events are mapped to the desired action17.

The required outlay for the event precipitation is calculated. The resultant computed price tag is compared mutually threshold value. The epitome is depicted as faster and evident in expression with the quick PFL approach.

Basics for Stock Valuation

There are different factors by which the stock price is calculated2.  Here are some best factors.

  1. Adequate size of Enterprise (ASE): –
  2. Strong financial condition (SFC)
  3. Earning Stability (ES)
  4. Dividend Record (DR)
  5. Earnings Growth (EG)
  6. Moderate PE Ratio (MPE)
  7. Price to Earnings (PE)
  8. Price to Book (PB)
  9. Debt to equity.

For a stock its present long term value is considered as future cash flows. Fundamental analysis is easy way to calculate valuation21. Intrinsic value is calculated by Dividend Discount Model (DDM). The Intrinsic value is a value which not depends on an external price i.e. it is true worth of company.

 = Intrinsic Value.

D = Dividend for the year.

k = required rate of return of stock.

g = dividend growth rate.

r = Required Return.

formula1

Methods

According to the problem statement and Literature work, the implementation of system consists of stock raw dataset. For Investment figure, some dynasty will derive estimates. Among generally estimated values, one figure will link with obvious rate in stock market and one price tag with true value (price). So there are two problems, as a matter of choice to inform current rate in stock market as it is and instant what price would be comeuppance for the stock. This concern is integral analysis approach. This exemplar has gift to travail fundamental analysis of incoming stock based on diverse parameters (attributes).

There are especially three parts are associated – Data Set collection, Feature Processing and Fuzzy Logic 22.

The Fuzzy Logic component consists of fuzzifier to manual the distinct factors, development base which contains rules and Inference iron horse for execution.

Fuzzifier

A fuzzy set includes characteristic work mathematically represented as: P(E) -> [0,1]. It is also states that factor P(E) belongs to apply F. Membership functions selection request performance of fuzzy logic in Input/output. Fuzzy exist theory assumes membership for analysis. In the fuzzifier, late values are over fuzzified and shuffle linguistic terms which are associated mutually the input linguistic variables.

To enable Data Stream i.e. non fuzzy of sample space is improved by fuzzifier. The hereafter is the membership functions which address respective µ ((x)) aside parameter. A fuzzy inhere includes characteristic function mathematically represented as: P(E) -> [0,1]. It is further states that component P(E) belongs to set F. Membership functions selection request performance of fuzzy logic in Input/output..

Fig 1. Fuzzy Relational model.

Figure 1: Fuzzy Relational model.



Click here to View figure

 

The membership functions are used for output  for every stock valuation factor 22.

Knowledge Base

Knowledge base consists of fuzzy IF… THEN rules. Rules define the decision making process. Where Stock valuation factors are linguistic variables and one, two, three are linguistic terms.

Inference Engine

Inference Engine executes vague logic to map variables from fuzzy sets. When generally told unusual values are fuzzified directed toward their acceptable values, by the agency of knowledge base of operation rules supposition engine prompt morphological values for yield linguistic variables.

Defuzzifier is established if the linguistic values are to be stripped as crisp values. Intrinsic price tag is proposed by Dividend Discount Model (DDM). The Intrinsic value is compared and adequate decision of {Invest, Not Invest} is taken 22.

The consequently algorithm describes around proposed context step wise.

Algorithm

  1. Start

Add Objects to Data Table

  1. Data Collection

Add RawData to Data table.

  1. Data Preparation

Remove Unwanted data

Data Cleaning –Remove Noise from data

Data Transformation

Data Aggregation

  1. Initialize Variable set, no. of Intermediate range, Membership Types.
  2. Calculate No. of Input Variable, Total Variables and Out Variable Index.
  3. Display Empty Canvases.
  4. Fuzzifier – Triangular Membership function

Take Inputs from the database and assign them to linguistic variables.

Calculate Degree of Membership of crisp value

by comparing membership functions.

Convert each crisp value to linguistic values.

  1. Inference Engine Computation

Aggregation – IF part condition is assigned a degree of truth, based on membership degree by using MIN().

Composition – Calculate degree of truth of linguistic term of output linguistic variable

  1. Defuzzification : Centre Gravity (COG)

Typical value of each linguistic term is selected as aggregation of respective membership function.

Compute Crisp value by centre of gravity of the resultant membership which is formed by the previous step.

  1. Calculate Stock value by Dividend Discount Model.

IF Intrinsic Stock value < current stock price AND defuzzified_crisp_value >=1.5 THEN

Positive to Invest

ELSE

Not Invest.

Stop.

Results and Discussions

The performance of the classifier in this model is analyzed by Mean Absolute Percentage Error (MAPE), deviation of current and previous stock values and confusion matrix indicators.
The data is checked through the previous five years value calculation and current value.

Graph 1: Stock comparison of current to previous value

Graph 1: Stock comparison of current to previous value

 

Click here to View Graph

 

The model predicts the satisfactory results as from the figure previous stock price were at 16 and after five years it is 23. The stock is profitable as per the prediction

Error Rate Analysis

The error rate is given by the following formula.

formula2

Current model’s prediction is FLMain having more accurate on the stock value rather than previous value i.e. FLpre

Graph 2: Analysis of Stock based on defuzzified value of existing system

Graph 2: Analysis of Stock based on defuzzified value of existing system

 

Click here to View graph

 

Quality indicators are presenting defuzzification values and by them system can clearly gives the error rate as 0.04 for the current scenario.

Accuracy

Total 150 companies are analyzed by the current system. Results are depicted as following matrix. Out of 150 companies 39 are in profit having decision Invest. 76 companies are in loss where the decision is not invest. Companies are in loss when the decision is invest are 27. Companies are in profit when the decision is not invest are 8.

Fig 2: Confusion Matrix.

Figure  2: Confusion Matrix. 



Click here to View figure

 

Based on the above matrix following measures are being formed. Accuracy of the system is 0.77. Out of all profitable companies only companies which are profitable having invested decision are 39.  The ratio is sensitivity of the classifier which is 0.82 i.e. sensitivity (Recall). Precision is 0.59.  F1 measure is 0.69. Identification of correct companies out of profitable companies is 82% and Incorrectness for the loss is 26%.

Conclusion

Work has the ability to identify true worth of stock. This model involves the strength of Fuzzy Logic to expect stock price. System considers fundamental concern for study. Methodology gives indistinguishable value for stock. It becomes inconsequential to contrast that whether the supposing stock is value to contemporary price or not. Long term prediction is the base for the algorithm. Accuracy of the algorithm is 0.77. System focuses on the standard parameters to determine true worth. The current system is designed for stocks. Bonds and other financial instruments may be used for future work.

References

  1. Shah, V. H., Mohri, Dr. Mehryar., Machine Learning Techniques for Stock Prediction. White Paper, Foundations of Machine Learning spring 2007Courant Institute of Mathematical Science New York University.
  2. Butler, William, F., & Tim, G. A., An Enquiry concerning the acceptance of Intrinsic value Theories of Nature. Environmental values Volume 16, no.2 2007:149-68.
    CrossRef
  3. Venkatesh, C. K., Madhu, Tyagi., Fundamental analysis as a method of share valuation in comparision with technical analysis. Bangladesh research publications journal ISSN 1998-2003 Vol 5, Issue 3 may-june 2011.
  4. Konstantinos, N. Pantazopoulos, Lefteri H. Tsoukalas., Nikolaos, G. Bourbakis., Michael, J. Brun., & Elias, N. Houstis., Financial Prediction & Trading Strategies Using Neurofuzzy Approaches. IEEE Transactions on Systems, Man, & Cybernetics—Part B: cybernetics, vol. 28, no. 4, August 1998.
  5. Lixin, Y., & Yan-Qing, Z., Evolutionary Fuzzy Neural Networks for Hybrid Financial Prediction. IEEE Transactions on Systems, Man, & Cybernetics—Part C: Applications & Reviews, vol. 35, no. 2, May 2005.
  6. Kai, Keng Ang., & Chai, Quek., Stock Trading Using RSPOP: A Novel Rough Set-Based Neuro-Fuzzy Approach.  IEEE transactions on Neural Networks October 2006 Impact Factor: 2.95 · DOI: 10.1109/TNN.2006.875996.
    CrossRef
  7. Ahmed, A. Gamil., Raafat, S. El-fouly., & Nevin, M. Darwish., Stock Technical Analysis using Multi Agent & Fuzzy Logic. Proceedings of the World Congress on Engineering 2007 Vol I WCE 2007, July 2 – 4, 2007, London, U.K. ISBN: 978-988-98671-5-7.
  8. Lean, Yu., Huanhuan, Chen., Shouyang, Wang., & Kin, Keung Lai., Evolving Least Squares Support Vector Machines for Stock Market Trend Mining. IEEE Transactions On Evolutionary Computation, Vol. 13, No. 1, February 2009.
  9. Haoming, H., Michel. Pasquier., & Chai, Quek.,  Financial Market Trading System With a Hierarchical Coevolutionary Fuzzy Predictive Model. IEEE Transactions on Evolutionary Computation, Vol. 13, No. 1, February 2009.
  10. Bonde, G., Khalid, Rashid., Stock Price Prediction using genetic algorithms & evolution stretagies. Institute of Artificial Intelligence Athens, Mar 2012.
  11. Eisuke, Kita., Yi, Zuo., Masaaki, Harada,, Takao, Mizuno., Application of Bayesian Network Network to Stock Price Presiction. Artificial Intelligence Research, Dec. 2012, Vol 1, No. 2.
  12. Yanshan, Wang., Anam-dong., Market Index & Stock Price Direction Prediction using Machine Learning Techniques: An empirical study on the KOSPI & HIS. Elsevier science direct 00 (2013) 1–13
  13. Khalid, Alkhatib., Hasan, Nazadat., Ismail, Hamiedi., Mohd, K. S., Stock Price Prediction Using K- Nearest Neighbour(kNN) Algorithm. International Journal of Business, Humanities & Technology. Vol 3, No 3, March 2013.
  14. Govindasamy, V., & Thambudarai, P., Probabilistic Fuzzy Logic based Stock Price Prediction , International Journal of Computer Applications vol 71 no 5 May 2013.
  15. Osman Hegazy, Omar S. Soliman & Mustafa Abdul Salam,  LSSVM-ABC Algorithm for Stock Price prediction  , Journal of Computer Trends & Technology (IJCTT) – volume 7 number 2– Jan 2014.
  16. Wijn., & Nuij., Viorel, Milea., Frederik, Hogenboom., Flavius, Frasincar., & Uzay, Kaymak., An Automated Framework for Incorporating News into Stock Trading Strategies.   IEEE Transactions On Knowledge & Data Engineering, Vol. 26, No. 4, April 2014.
  17. Govindasamy, V., Akila, V., & Ganesh, R., Prediction of events Based on Complex Event Processing & Probabilistic Fuzzy Logic. IEEE Conference 16-17 April 2014 ISBN 978-1-4799-3836-1.
    CrossRef
  18. Desheng, Dash Wu., Lijuan, Zheng., & David, L. Olson., A Decision Support Approach for Online Stock Forum Sentiment Analysis. IEEE Transactions On Systems, Man, & Cybernetics: Systems, Vol. 44, No. 8, August 2014.
  19. Partha, Roy., Ramesh., Sanjay, Sharma., A Fuzzy Logic Model to forecast stock market momentum. International Journal of Advanced Engineering Research & Studies/IV/II/Jan-Mar 2015. E-ISSN 2249 – 8974.
  20. Argiddi, R. V., Apte, S. S., Kale, B. U., Analysis of Stock Market Intelligence & Research Approches. International Journal of Application of Innovation in Engineering & Management (IJAIEM) Vol 3 Issue 1, Jan 2014. ISSN 2319-4847.
  21. Baresa, Suzana., Sinisa, Bogdan., Zoran, Ivanovic., Strategy of Stock Evaluation by Fundamental Analysis. Special Issue, UTMS Journal of Economics 4(1): 45-51 2013.
  22. Chittaranjan, Mangale, ShyamSundar, Meena., Vijay, Birchha.,  Prediction of Stock Values Based on Fuzzy Logic using Fundamental Analysis.International Journal on Recent & Innovation Trends in Computing & Communication ISSN: 2321-8169 Volume: 3 Issue: 10 5806 – 5810.

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.