You are on page 1of 3

2017 International Conference on Technical Advancements in Computers and Communications

Developing a Prediction Model for Stock Analysis

R. Yamini Nivetha Dr. C. Dhaya


Department of Computer Science and Engineering. Department of Computer Science and Engineering.
Adhiparasakthi Engineering College Adhiparasakthi Engineering College
Melmaruvathur, Kanchipuram District Melmaruvathur, Kanchipuram District
nive.yamini91@gmail.com dhaya.c@gmail.com

Abstract—Prediction in the stock market is challenging and model. The Artificial Neural Network is a deep learning
complicated for investors. Many researches have performed to approach in hidden data neurons, to forecast the price of a
sense the future market movements. In the stock market, social stock. A Neural Network consists of an input layer, hidden
media data have high impact today than ever. In this work, layer and output layer. The weights are assigned for each input
various prediction algorithms are analyzed to build a prediction
layer. The summation function is calculated for the weighted
model. The prediction model will be based on monthly prediction
and daily prediction to forecast the next day market price. This output. The output layer calculates the sigmoid function for the
model estimates the open value of the next day in the market. summation value. The final output is the predicted stock price.
Sentiment Analysis needs to identify and extract sentiments from The prediction model predicts daily prediction and monthly
each individual in the social media. The correlation between the
prediction. Sentiment Analysis is combined with a best
sentiments and the stock value is to be determined. A
comparative study of these three algorithms: Multiple Linear predicting algorithm to refine the outcomes in the stock market.
Regression, Support Vector Machine and Artificial Neural Hence the prediction model acts as a stock market broker in
Network are done. The stock price is predicted by sentiment finance and business streams.
analysis with the best forecasting algorithm.
II. RELATED RESEARCH
Keywords—Stock Market; Sentiment Analysis; Multiple Linear D. Kumar and S. Murugan have introduced a new method
Regression (MLR); Support Vector Machine (SVM); Artificial by combining time-series data with Artificial Neural Network
Neural Network (ANN).
(ANN) [1]. This prediction model is based on a feed-forward
I. INTRODUCTION ANN with back propagation. The performance of the
prediction model is analyzed using some factors. The key
The stock market is always one of the most popular factor includes Mean Absolute Error (MAE), Mean Absolute
investments due to its high profit. As the level of investing and Percentage Error (MAPE), Percentage Mean Absolute
trading grew, people searched for tools and methods that would Deviation (PMAD) and Mean Squared Error (MSE). This
increase their gains while minimizing the risk. Most of the performance is calculated by BSE100 and NIFTY MIDCAP50.
trading in Indian Stock Market takes place on its two stock
exchanges: the Bombay Stock Exchange (BSE) and the K. Abhishek, A. Khairwa, T. Pratap and S. Prakash have
National Stock Exchange (NSE). The two prominent Indian developed a forecasting model for the Microsoft Corporation.
Market Indexes are Sensex and Nifty. Stock market prediction This forecasting model includes a two-step procedure [2]. In
is complicated since the prices in the stock market are dynamic first-step, ANN go through training with the genetic algorithm.
in nature. The prominent input factors of the company that This algorithm teaches the prediction model to identify the new
have an impact on prediction are Price-To-Earnings Ratio (PE), trends. In a second step the results are obtained by analyzing
Debt-To-Equity Ratio and Price Flow Ratio (PF). the trained prediction model to the dataset.
In this paper, to make a comparative study of stock
M. Hagenan, M. Liebmann, M. Hedwig and D. Neumann
predicting algorithms and determine the best predicting
have experimented with the dataset of NSE and news data from
algorithm. The Linear Regression which contains more than
social media [3]. They designed the word combination
two predictor variables is Multiple Linear Regression. It
technique with German adhoc messages and stock prices. The
measures the relationship between the two variables. The least
text mining is evaluated by Chi-Based feature selection. The
square value is calculated to obtain the prediction results. The
Support Vector Machine algorithm is used to predict the stock
support vector machine is a supervised learning model to
price. The classification accuracy is boosted by feedback based
classify the training data. The hyper-plane is identified and the
feature selection.
margin of the training data is maximized by Optimal
Separating hyper-plane. The support vectors which are closest Arti Buche and Dr. M. B. Chandak discuss the text opining
to the hyper-plane and it is in equal distance from both the mining in stock market reviews of Economic Times [4]. This
classes are identified. The value of support vector is evaluated method deals with the polarity of the text in two processes,
by assigning the three weights to be learned from the SVM namely POS tagger and SentiWordNet. This method is

978-1-5090-4797-0/17 $31.00 © 2017 IEEE 1


DOI 10.1109/ICTACC.2017.11
implemented by Natural processing language and statistical processed by normalization and used as the input data. For
parameter. This paper has surveyed on different methods to monthly prediction and daily prediction historical data from
highlight the factors that have an impact on market price. Yahoo finance is used.
Z. Khan, T. Alin and Md. A. Hussain highlighted the B. Multiple Linear Regression
consequences in prediction of stock value [5]. The system is Regression is a data mining task of predicting the stock
incorporated by backward propagation with artificial neural price by implementing a model based on one or more
network. The general index (GI), net asset value (NAV), attributes. This technique is a compact method of mathematical
earnings per share (EPS) and volume of the market may affect representation. It represents the relationship between the
the market movement. The system with this algorithm is response parameter and the input parameter in a given
experimented in BSE stock market. prediction model. Prediction of the outcome y from the input
parameter x of the form
III. PROBLEM DEFINITION
y = β0 + β1 x1 + β2 x2… + βk xk (1)
The stock market prediction is difficult since the stock price
is dynamic in nature. To reduce the false forecasts of the stock y – Outcome, β0 – Intercept, β1, β2, βk – Partial Regression
market and increase the ability to predict the market Co-efficient, x1, x2, xk – Input Parameters.
movements. To avoid the risk and the complex in predicting The least square value is determined by the current market
stock price. price y from the PE ratio and mean of the input parameters
IV. SYSTEM DESIGN y = a + bx (2)
y – Current market price, x – Price-to-Earnings ratio (PE
ratio), a – Mean of y – b (Mean of x), b – Cov(x, y).
C. Support Vector Machine
In machine learning, Support vector machine is supervised
learning models with associated learning algorithms to identify
the data. This process includes the classification and regression
methods to analyse the prediction. It implements the margins
adoption to predict the market price. The support vector means
the closest hyper-plane and it is equal in distance are identified.
The value of support vector y is calculated using the two
attribute case
y = w0 + w1 x1 + w2 x2 (3)

y – Outcome, w0, w1, w2 – three weights to be learned by


SVM model, x1, x2 – input parameters.

Fig. 1. Stock Prediction Model

The stock price is predicted in the prediction model by


using the historical data and text opinion mining in social
media data. The Yahoo finance data contains the historical data
of three months of various companies. It is used for monthly
prediction. The Economic Times data and Twitter data contains
the reviews (or) news which is expressed by each individual is
evaluated by the sentiment value. This data is used for daily
prediction. The Sentiment Analysis is combined with the best
forecasting algorithm. Fig. 2. SVM Model
V. ALGORITHMS
D. Artificial Neural Networks
A. Data Collection and Processing The artificial neural network is deep learning at hidden
The Yahoo finance data contain BSE data and NSE data. layer neuron. Artificial Intelligence classifiers are used to train
The financial index of BSE is SENSEX and for NSE is NIFTY. the prediction model to identify the trends in a complicated
This finance data contain many attributes of the stock market. environment. The input value is assigned with different weights
Some of the attributes are opening value, closing value, in the input layer. The output of the input layer is fed into the
adjacent close value, min value, max value, volume, dividend, hidden layer neuron as the input. The summation function is
date and time of the day. The key attributes are selected for evaluated in the hidden layer. It learns every prediction at each
stock market prediction in this work. The collected data are

2
node. If any hidden layer neuron is not completed, then it is fed predicting algorithm among the three algorithms in stock
into the summation function. market.
h = ∑ wi.xi (4) B. Proposing a Prediciton Model
h – Summation function, ∑wi – Weight of the input, xi – The prediction model is designed to forecast the monthly
Input value. and daily prediction in stock market. The historical data and
news from social data is collected to design the prediction
The output of the hidden layer is given as input to the model. The monthly prediction uses the historical data of NSE
output layer where the sigmoid function O is determined using and BSE data. The daily prediction uses the historical data and
the summation function h. the social media data which includes Economic Times
O = 1 / 1+e (-h) (5) Website, Money Control Website and Twitter. The expression
of each individual varies and it is analysed in social media data.
The expression of each individual varies and it is analysed in
social media data. The polarity of each word is evaluated. The
polarity can be neutral, positive and negative. The correlation
between the news and actual price is determined.
VII. CONCLUSION
The purpose of this study is to compare the performance of
the three prediction algorithms Multiple Linear Regression,
Support Vector Machine, Artificial Neural Network in the
stock market. The Multiple Linear Regression algorithm is less
developed state which measures the relationship between the
stock price and volume. The Support Vector Machine
algorithm is a two-class classifier for the learning model. The
Fig. 3. Process of ANN Artificial Neural Network is the classification algorithm for
deep learning. The result exhibits that the deep learning
E. Sentiment Analysis algorithm performs better than the MLR and SVM. In deep
The expression of each individual varies and it is analysed learning algorithm the hidden layer neuron learns in every
in social media data. The polarity of each word is evaluated. prediction. Hence the output layer neuron produces the best
The polarity can be neutral, positive and negative. The outcome. Artificial Neural Network is the best predicting
correlation between the news and actual price is determined. algorithm.
The Sentiment value in a row S is initial zero. For each word in
a row do the Sentiment Calculation. REFERENCES
[1] Kumar, D. Ashok, and S. Murugan. "Performance analysis of Indian
Sent_Word (word, dictionary) (6) stock market index using neural network time series model." In Pattern
Recognition, Informatics and Mobile Engineering (PRIME), 2013
Sent_Word – compares the word with the dictionary. International Conference on, pp. 72-78. IEEE, 2013.
S = Sent_Word (7) [2] Abhishek, Kumar, Anshul Khairwa, Tej Pratap, and Surya Prakash. "A
stock market prediction model using Artificial Neural Network."
S – Calculates the value of Sentiment Analysis of the data. In Computing Communication & Networking Technologies (ICCCNT),
2012 Third International Conference on, pp. 1-5. IEEE, 2012.
VI. TRADING MODEL [3] Hagenau, Michael, Michael Liebmann, Markus Hedwig, and Dirk
Neumann. "Automated news reading: Stock price prediction based on
A. Choosing the Best Algorithm financial news using context-specific features." In System Science
(HICSS), 2012 45th Hawaii International Conference on, pp. 1040-1049.
To analyse the best prediction algorithms in stock market IEEE, 2012.
various experiments are examined. Many key factors of stock [4] Buche, Arti, M. B. Chandak, and Akshay Zadgaonkar. "An Approach
market are considered to forecasts the stock price. The factors for Online Analysis using Expectation Maximization." International
are opening price, closing price, adjacent close, volume and Journal of Innovative Research in Computer & Communication
Engineering 1 (2013).
dividend of the stock. The performance is measured for the
[5] Khan, Zabir Haider, Tasnim Sharmin Alin, and Md Akter Hussain.
analysed algorithms. The best algorithm which forecasts the "Price prediction of share market using artificial neural network
results is found and the further design is implemented. The (ANN)." International Journal of Computer Applications 22, no. 2
results exhibit that Artificial Neural Network is the best (2011): 42-47.

You might also like