ML2
ML2
Charitha G Karishma KH
Department of Computer Science and Engineering Department of Computer Science and Engineering
Sir M. Visvesvaraya Institute of Technology, Sir M. Visvesvaraya Institute of Technology,
Bengaluru, Karnataka, India Bengaluru, Karnataka, India
Mrs. Supriya HS
Department of Computer Science and Engineering
Sir M. Visvesvaraya Institute of Technology,
Bengaluru, Karnataka, India
I. INTRODUCTION
Abstract— In today’s financial world stock exchange
has become one of the most significant events. The A stock or a share which is also known as a company’s equity
world’s economy today is widely dependent on the stock is referred to as a financial instrument that is used to represent
market prices. The Stock Market has been very an ownership in a company that represents a proportional
successful in attracting people from various assertion on its assets and earnings .
backgrounds be it educational or business .The
nonlinear nature of the Stock Market has made its
research one of the most trending and crucial topics all
around the world.. People decide to invest in the stock
market on the basis of some prior research knowledge
or some prediction. In terms of prediction people often
look for tools or methods that would minimize their
risks and maximize their profits and hence the stock
price prediction takes on an influential role in the ever
challenging stock market business. Adopting traditional
methodologies such as fundamental and technical
analysis doesn’t seem to ensure the consistency and
accuracy in the prediction. As a result the machine
learning technologies have become the recent trend in
the stock market prediction whose prediction is based
on the existing stock market values eventually as an
Fig 1: Flow of shares and funds
outcome of training on their previous values. This
paper focuses on RNN (Recurrent Neural Networks)
and LSTM (Long Short term memory) technologies in
predicting the ongoing trend of the stock market. Stock ownership means that the shareholder is the owner of
a part of the company which is equal to the number of
shares that is held as a fraction of the company's total
Keywords— Stock, Stock Market, Shares, Shareholder, outstanding shares. For example, an individual who is the
Recurrent Neural Network(RNN), Long Short Term owner of a hundred thousand shares of a company with a
Memory(LSTM) million outstanding shares would be having a ten percent
stake ownership in it. The outstanding shares of most
companies run into huge values as huge as millions or even
258
International Journal of Engineering Applied Sciences and Technology, 2020
Vol. 5, Issue 8, ISSN No. 2455-2143, Pages 258-262
Published Online December 2020 in IJEAST (http://www.ijeast.com)
259
International Journal of Engineering Applied Sciences and Technology, 2020
Vol. 5, Issue 8, ISSN No. 2455-2143, Pages 258-262
Published Online December 2020 in IJEAST (http://www.ijeast.com)
[3]An LSTM-Method for Bit-coin Price Prediction: A Case was readily available in the csv format which was first read
Study Yahoo Finance Stock Market, IEEE 2019- Ferdiansyah and converted into a data frame by making use of one of the
et al., Bit-coin is a type of Cryptocurrency and currently is one most popular libraries, Pandas in Python. In the due course,
of a kind of investment on the stock market. Stock markets are one specific company’s data was pulled out by separating data
inclined by several risks. And bit-coin is one kind of crypto depending on the symbol field. After this, the data was
currency that keeps rising in recent years, and sometimes segregated into testing and training data sets by performing
suddenly falls without knowing influence on the stock market. normalization by using yet another popular Python library
There’s a need for automation tools to predict bit-coin on the known as Sklearn library. The test set was placed as 20
stock market because of its fluctuations. This research study percent of the dataset that was available. Although Machine
studies how to create mode prediction bit-coin stock market learning has various algorithms that could be used for
prediction using LSTM. Before confirming the results the predicting the stock prices here in this paper we make use of
paper tries to measure the results using RMSE (the Root Mean two main algorithms known as RNN and LSTM.
Square Error).The RMSE will at all times be larger or equal to
the MAE. The RMSE metric assesses how well a model can
calculate a continuous value. The method that is applied on
this research to predict Bit-coin on the stock market Yahoo
finance can forecast the result above $12600 USD for the next
couple of days after prediction.
[4] Share Price Prediction using Machine Learning Technique,
IEEE 2019-Jeevan B et al., Lately stock market has been the
talk of the town with more and more people from academics
and business showing interest in it. This paper mostly deals
with the approach towards predicting stock prices using RNN
(Recurrent Neural Network) and LSTM (Long Short Term
Memory) on National Stock Exchange using numerous
elements such as the present-day market price as well as
anonymous events. A recommendation system along with
models constructed on RNN and LSTM methods are used in Fig 3: A Representation of test,train and validation
selecting the company is also mentioned in this paper. accuracy of RNN-LSTM Model.
[5] Stock Market Prediction Using Machine Learning
Techniques, IEEE 2020- Naadun Sirimevan et al., The Stock RNN AND LSTM
Market Prices play a crucial role in today’ economy. Recurrent Neural Network is a type of Neural Network in
Researchers have discovered that social media platforms such which the input to the next layer is taken from the output of
as twitter and web news tend to influence the decision- the previous layer. It has many types to it and LSTM is one
making process of any individual. In this research behavioural among them. LSTM stands for Long Short Term Memory.
reflex towards web news is taken into count to reduce the gap It basically has three parts to it which are input layer, forget
and make the prediction much more accurate. Precise layer, output layer. Input layer is responsible for deciding
predictions what amount of information should be carried forward to
were made for a day, a week and two weeks here after. the next layer from the previous layer and the output layer
is responsible for deciding what amount of data should be
METHODOLOGY sent forward into the next layer as input. The reason for the
Stock market prediction seems like a complicated problem immense popularity of the LSTM is its special power to
because there are various factors that are still left unaddressed memorize the data . In a basic neural network that consists
and do not seem to be statistical at first. But to our rescue of only one layer that is hidden the number of layers to be
there are various machine learning algorithms by using which contained in the input layer mostly depends on the
we could efficiently predict current trends in the stock market dimensionality of the data, and these input layer neurons
by using the references from the previous data. Here the get connected to the hidden layers via ‘synapses’. The
dataset that we are going to use has been collected from relationship between each of the two nodes from the input
Yahoo finance. This dataset consists of nearly 9,00,000 layer to the hidden layer consists of a coefficient called
records related to the stock prices required and many other weight which acts as a decision maker for the signals. The
values that are relevant to each other. This data predicted the learning process of the model is basically nothing but a
stock prices at some intervals of time for each day in a year. continuous fine-tuning of weights and gradually after the
Many sections such as volume, date etc were included in it. In completion of the entire process, the artificial neural
order to simulate and analyze only one company’s data was networks will have optimum weights for each synapse. An
taken into account. The data considered or taken into account activation function such as a sigmoid or a tangent function
260
International Journal of Engineering Applied Sciences and Technology, 2020
Vol. 5, Issue 8, ISSN No. 2455-2143, Pages 258-262
Published Online December 2020 in IJEAST (http://www.ijeast.com)
is applied to the input layers in order to minimize the error Forecasting using Machine Learning: Today and Tomorrow in
rates and a softmax activation function is used in the output National Institute of Technology, Kurukshetra, Haryana,
layer. The main functionality of this activation function is India. DOI : 10.1109/ICICICT46008.2019.8993160
to produce non linearity in the model. After this a Back [3] Ferdiansyah Ferdiansyah; Siti Hajar Othman; Raja Zahilah
propagation algorithm will be applied in which the same Raja Md Radzi; Deris Stiawan; Yoppy Sazaki; Usman
process repeats itself again and again that is, the Ependi(2020). A LSTM-Method for Bitcoin Price Prediction:
information keeps getting transferred back and forth until A Case Study Yahoo Finance Stock Market in School of
the weights are normalized and the error rate is Computing, Universiti Teknologi Malaysia, Johor Bahru,
minimalized. Finally the model will be trained on the Johor, Malaysia. DOI : 10.1109/ICECOS47637.2019.8984499
training dataset and tested on the test data set. [4] Meghna Misra; Ajay Prakash Yadav; Harkiran Kaur
(2020). Stock Market Prediction using Machine Learning
III. EXPERIMENT AND RESULT Algorithms: A Classification Study in Department of
This proposed system makes use of data taken from Yahoo Computer Science and Engineering, (Deemed to be
finance, trained and tested. The LSTM RNN model used for University, Patiala). DOI :
the prediction is found out to be very effective and resembles 10.1109/ICRIEECE44171.2018.9009178
the actual trend very well. The results obtained on the training [5] Mojtaba Nabipour , Pooyan Nayyeri , Hamed Jabani ,
dataset had a Mean Square Error of 0.00106 and a Root Mean Shahab S., (Senior Member, Ieee), and Amir Mosavi (2020).
Square Error of 0.03. Predicting Stock Market Trends Using Machine Learning and
Deep Learning Algorithms Via Continuous and Binary Data; a
The results on the testing data had a Mean Square Error of Comparative Analysis. DOI :
around 0.00875 and a Root Mean Square Error of around 0.09. 10.1109/ACCESS.2020.3015966
The larger the dataset and more the frequency of training
[6] B Jeevan, E Naresh, B P Vijaya kumar, Prashanth Kambli
higher will be the accuracy that will be obtained.
(2019). Share Price Prediction using Machine Learning
IV. CONCLUSION Technique in Department of Information Science and
Engineering, RIT, Bangalore 560 054. DOI :
From the research done so far it could be concluded that 10.1109/CIMCA.2018.8739647
the RNN and LSTM libraries are very effective in [7] Sumeet Sarode; Harsha G. Tolani; Prateek Kak; C S Lifna
determining the stock price trends effectively relative to the (2019). Stock Price Prediction Using Machine Learning
actual market trend. At the same time what we could find Techniques in Vivekanand Education Society's Institute of
out is that the python libraries that were used as a part of Technology, Mumbai, India.
the training process were not very optimal. As far as the DOI: 10.1109/ISS1.2019.8907958
training speed is considered the functions that we use from [8] Shao En Gao; Bo Sheng Lin; Chuin-Mu Wang(2019).
the mathematics principle have a lot faster speed Share Price Trend Prediction Using CRNN with LSTM
comparatively and they consist of more detailed designs Structure in Department of Computer Science and Information
and significant improvements when tested under various Engineering, National Chin-Yi University of Technology,
situations. However, the python library functions are Taichung, Taiwan. DOI: 10.1109/IS3C.2018.00012
considered to be more adaptable. From our work done so [9] Ishita Parmar; Navanshu Agarwal; Sheirsh Saxena; Ridam
far we can easily tell that certain stock trends can be Arora; Shikhin Gupta; Himanshu Dhiman; Lokesh Chouhan
predicted easily on the basis of certain general rules and (2019). Stock Market Prediction Using Machine Learning in
regulations of the stock. This the main reason behind the Department of Computer Science and Engineering, National
existence of the private placement institutes. Few things Institute Of Technology, Hamirpur, INDIA. DOI :
such as optimization of the neural network parameters as 10.1109/ICSCCC.2018.8703332
well as the training process however always has much [10] A.J.P. Samarawickrama; T.G.I. Fernando(2018). A
room for improvement. All these points would be recurrent neural network approach in predicting daily stock
considered as further steps in the research. prices an application to the Sri Lankan stock market in
V. REFERENCE Department of Computer Science, Faculty of Applied
Sciences University of Sri Jayewardenepura, Nugegoda, Sri
[1] Naadun Sirimevan; I.G. U. H. Mamalgaha; Chandira Lanka. DOI : 10.1109/ICIINFS.2017.8300345
Jayasekara; Y. S. Mayuran; Chandimal Jayawardena (2020). [11] Chawalit Jeenanunta; Rujira Chaysiri; Laksmey
Stock Market Prediction Using Machine Learning Techniques Thong(2018). Stock Price Prediction With Long Short-Term
in Faculty of Computing, Sri Lanka Institute of Information Memory Recurrent Neural Network in School of Management
Technology, Malabe, Sri Lanka. Technology, Thammasat University, Thailand. DOI :
DOI: 10.1109/ICAC49085.2019.9103381 10.1109/ICESIT-ICICTES.2018.8442069
[2] Sukhman Singh; Tarun Kumar Madan; Jitendra [12] Mehak Usmani; Syed Hasan Adil; Kamran Raza; Syed
Kumar; Ashutosh Kumar Singh (2020) Stock Market Saad Azhar Ali (2016). Stock market prediction using
261
International Journal of Engineering Applied Sciences and Technology, 2020
Vol. 5, Issue 8, ISSN No. 2455-2143, Pages 258-262
Published Online December 2020 in IJEAST (http://www.ijeast.com)
262