A Fuzzy Based Soft Computing Technique To Predict The Movement of The Price of A Stock
A Fuzzy Based Soft Computing Technique To Predict The Movement of The Price of A Stock
Abstract—Soft computing is a part of an artificial intelligence, (ANN), FL and genetic algorithm [14], [15]. The combination
and fuzzy logic is the study of fuzziness on data. The combination of FL and SC is used to develop an accurate expert system
of these two techniques can provide an intelligent system with [23]-[25].
more ability and flexibility. The nature of data in the
stock/capital market is more complex and challenging to predict Stock/capital market is familiar to investors due to its high
the movement of the price of the stock. The study has combined returns. The non – linear, chaotic, noisy behavior nature of data
both fuzzy c-means and neural network technique for the in the market made difficult to predict the price of a stock [1].
prediction of the price of the stock. The research finds an Technical, fundamental, and macroeconomics are the popular
optimum solution to predict the future price of a stock. The methods to analyze the market and predict the movement of a
comparison of time and space complexity proved that the stock. A technical analysis is used to find the price of the stock
proposed method is better than the existing methods. in a period. Mathematical methods are used in the technical
analysis to indicate the buy/sell signals [2], [3]. Fundamental
Keywords—Soft computing; fuzzy logic; stock analysis is the technique to analyze the company performance
recommendation; fuzzy based soft computing, soft computing by calculating profit and liabilities. A macroeconomic analysis
systems is a technique to analyze the recent decision taken by the
I. INTRODUCTION company and its impact on the market [4], [5]. The aim of the
research is to build an intelligent system illustrated in Fig. 1 to
A wide variety of engineering control processes are using predict the price of a stock in Indian capital market.
the concept of fuzzy logic (FL). There is a need of expert
knowledge to develop an intelligent system. FL concepts were
evolved in late 60’s from crisp fuzzy sets and reached a high
level of perceptions in recent years [6], [7]. A researcher can
apply every kind of possibilities ranges from approximate,
linguistics to perception, computing with words, natural
language processing, computational theory of perceptions, and
perception-based probability theory. Logical, relational, set-
theoretic and epistemic are the four facets of FL [8], [9].
Sigmoid functions can be used to define fuzzy sets. Professor
Zadeh has found many operators in FL and completely
replaced the ordinary Boolean logic. Fuzzification and
defuzzification are the functions similar to encode and decode
functions. Many expert systems were implemented with the
concept of FL. Fig. 1. Stock recommendation systems.
Soft computing (SC) is related to FL used to develop
Current and previous day price of the stock, Relative
intelligent systems. The purity of thinking, machine
strength index (RSI), the volume of the stock and 30 days
intelligence, and fuzziness processing capabilities are the
average moving price of the stock are the inputs required for
attributes of SC. The SC aims to exploit tolerance for
the system and FL – SC combined proposed method will
imprecision, uncertainty, and fuzziness to achieve low-cost
predict the future price of the stock [16], [17]. The Nifty – 50
computation. It can learn from experience, universalize
and Pharmacy stocks used in the research. Support vector
domain, simulation of biological processes, and faster
machine (SVM), Neural networks (NN) are the existing
computations [10], [11]. It has the critical role in science and
methods used in the research to show the effectiveness of the
engineering applications [20]-[22]. It is widely used in machine
proposed method. Section 2 elaborates the review of the
learning, belief networks, chaos theory, wisdom based expert
literature, Section 3 define the methodology of the research and
system and probability reasoning. It has feature of extraction of
experiment and results provided in Section 4. Finally,
knowledge/information from inaccurate and uncertain data
Section 5 concludes the research.
[12], [13] and vast influence of artificial neural network
319 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 9, No. 2, 2018
II. REVIEW OF LITERATURE Chin – Cheng Tseng [5] have proposed a portfolio
Ibrahim M. Hamed et al. [1], proposed an intelligent system management using hybrid recommendation system. The
to recommend the price of the stock. They have used research has deployed a group of agents with different
multilayer perceptron-based ANN for the research. The model functionality and groups them under case – based situations.
proposed in their research had several stages. Input selection, Agents are used to gather, filter, and process various cases in
pre-processing of data and signal detection were some of the the systems. It does not have any mechanism to deal with
critical stages in the model. The algorithm was used in the uncertainty and complex data. It will help an individual to
model update the weights between the neural network neurons select a stock based on historical data and not on real-time data.
to minimise the error of the prediction results. Blind source Influence diagram module, decision tree system module, web
separation techniques are used in the research for the signal information agent module, and interface module were the
detection and forward to the final stage for the user. ANN is a components of the hybrid recommendation architecture.
slow learner, and moreover, the multilayer perceptron leads to Decision tree is one of the old methods and if the number of
taking more time for the prediction of results. data increased then the computation time will be more and
create problems in the process of making the decision.
Monica Tirea and Viorel Negra [2] have developed an
intelligent stock market analysis system for the prediction of Lei wang et al. [6], have developed a stock
the stock price. The study has taken many attributes and recommendation system based on a method called HLP. The
constructed a multi-agent prediction system. Economic, method was used to extract data with different frequency and
industrial and behavioural are the types of approaches in amplitude. The data were extracted from the server will
fundamental analysis. The macro – economical analysis have describe the nature of a price of stock and its movement. ANN
taken interest rates, earning of the company, profitability and modules are used to forecast the movement of the stock. The
growth rate. The overall structure of the system had three following Table I shows the type of technique and year used in
essential parts. They are multi-agent stock trading system, the research.
news information system and portfolio optimisation system.
TABLE. I. TECHNIQUES USED IN THE RESEARCH
The portfolio system has data interpretation level, behavioural
level, risk detection level and portfolio optimisation level. The S.No. Technique Year Authors
multi-agent stock trading system has used the numerical data 1 Decision Tree 2004 Chiu –Che et.al. ,
with multi-agents. Text mining agent is used to crawl the 2 SVM 2009 QinghuaWen et. al. ,
3 ANN 2011 Ibrahim M. Hamed et.al.,
recent news and forwards to the portfolio optimisation system 4 Decision Tree 2013 Zhen Hu et.al.,
and modify signals according to the news. The system took 5 ANN 2014 Monica Tirea et. al. ,
more time and space to predict the price and consume more 6 ANN 2014 Sunil Kumar Khatri et. al. ,
memory comparing to the other new methods. 7 ANN 2014 Neelima Budhani et.al.,
Amin Hedayati Moghaddam et.
Sunil Kumar Khatri et al. [3] have proposed a sentiment 8 ANN 2016
al.,
analysis to predict Bombay stock exchange using ANN. Many
forums are there for the investors to participate and share their III. PROPOSED METHOD
views related to the market. Data of blogs/forums and E –
The proposed method uses fuzzy C-means and ANN model
media were the inputs for the system and pre-processed into
to build an intelligent system to predict the movement of the
four different moods like happy, hope, sad and disappointing.
price of the stock. Fuzzy c-means is similar to K – means
The ANN model was trained with sample data from a detailed
algorithm. In this study, Fuzzy C – means and NN are
set and produces the final prediction from the test data. The
combined into the Fuzzy logic neural network (FL-N) to
output of the ANN model prediction will be positive,
predict the price of the stock. The fuzzy algorithm used to
negative/neutral. A maximum of 15 hidden layers were used
cluster stock market data, clusters the stock data extracted from
for the prediction of the price of the stock based on the
National Stock Exchange (NSE) portal. The clusters are given
sentiments. The research entirely based on the sentiment of the
as input to NN. The NN has two input and one output layers.
users in the forum and there was no relation with the real price
The historical data will be pre-processed for the model for the
of the stock. The accuracy is the primary concern of the
prediction of its future [18], [19]. Let ∑D be the price data and
research as it depends on the sentiment shared in the forum.
f(∑D)is the fuzzification of data. ANN model will take the
Qiaghua wen et al. [4], have proposed an intelligent stock fuzzified data and compute the future price of the data. Current
recommendation system using SVM techniques and box theory and previous day price of the stock, Relative strength index
of stock. The SVM uses statistical learning theory and (RSI), the volume of the stock and 30 days average moving
structural risk minimisation principle. The principle behind the price of the stock are the inputs. A total of 15 hidden layers
SVM is to map the inputs into a high – dimension space by a were used in NN to produce results. The NN used in the
non – linear mapping with kernel function to do a linear research is the feed forward, back propagation network. It can
regression. In this research, the radial basis function is acted as learn from the failures and fault tolerance. The following
the kernel function of SVM estimators. The selection of the algorithm will describe the process of the computation in
user-prescribed is a vital role in overall performance. The detail.
sliding window method is employed in the research to train
Step 1: Start
SVM estimators. The accuracy and computation time of SVM
was more compared to other existing methods. Step 2: Historic data downloaded from the Nifty 50 and
Pharma
320 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 9, No. 2, 2018
Step 3: Initial pre – process of data to normalize it for the Step 8: Goto step 3.
fuzzification Step 9: End
Step 4: Fuzzy C – means clusters the data. Fig. 2 shows the screen of NSEIndia (www.nseindia.com)
Step 5: The clusters transformed into NN inputs. website having details about NIFTY 50 stocks. Fig. 3 shows
Step 6: Multi – Layer perceptron NN model receives the the details of NIFTY Pharma stocks. Fig. 4 shows the pre –
transformed input for the training phase. processing of data extracted from NSEINDIA. The data were
Step 7: Learnt NN produces results normalized by fuzzy plug-ins for Microsoft Excel 2007.
321 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 9, No. 2, 2018
Days Days
/Methods 10 20 30 40 50 60 Fig. 5. Training Phase (in seconds).
ANN 0.432 0.326 0.423 0.521 0.563 0.452
SVM 0.621 0.568 0.528 0.612 0.589 0.632 TABLE. III. TESTING TIME (IN SECONDS)
DT 0.745 0.695 0.485 0.569 0.541 0.458 Days Days
FL - N 0.385 0.215 0.412 0.235 0.346 0.295 /Methods 10 20 30 40 50 60
ANN 0.234 0.256 0.185 0.215 0.265 0.278
Table III shows the testing time taken by the methods and it
SVM 0.285 0.312 0.165 0.178 0.195 0.174
is evidence that the proposed method have taken less time to DT 0.195 0.215 0.175 0.185 0.139 0.149
produce the results. The FL-N has taken only 0.098 seconds to FL - N 0.124 0.138 0.135 0.152 0.098 0.112
produce results from 50 days data. Fig. 6 displays the relevant
graph of Table III.
322 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 9, No. 2, 2018
323 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 9, No. 2, 2018
324 | P a g e
www.ijacsa.thesai.org