STOCK MARKET PREDICTION AND ANALYSIS USING MACHINE LEARNING

Similar documents
Stock Market Index Prediction Using Multilayer Perceptron and Long Short Term Memory Networks: A Case Study on BSE Sensex

Application of Deep Learning to Algorithmic Trading

Two kinds of neural networks, a feed forward multi layer Perceptron (MLP)[1,3] and an Elman recurrent network[5], are used to predict a company's

Recurrent Residual Network

The Use of Artificial Neural Network for Forecasting of FTSE Bursa Malaysia KLCI Stock Price Index

Stock Market Prediction using Artificial Neural Networks IME611 - Financial Engineering Indian Institute of Technology, Kanpur (208016), India

Barapatre Omprakash et.al; International Journal of Advance Research, Ideas and Innovations in Technology

An enhanced artificial neural network for stock price predications

Novel Approaches to Sentiment Analysis for Stock Prediction

A Dynamic Hedging Strategy for Option Transaction Using Artificial Neural Networks

International Journal of Computer Engineering and Applications, Volume XII, Issue II, Feb. 18, ISSN

Application of Innovations Feedback Neural Networks in the Prediction of Ups and Downs Value of Stock Market *

Forecasting stock market prices

Based on BP Neural Network Stock Prediction

Design and implementation of artificial neural network system for stock market prediction (A case study of first bank of Nigeria PLC Shares)

Dr. P. O. Asagba Computer Science Department, Faculty of Science, University of Port Harcourt, Port Harcourt, PMB 5323, Choba, Nigeria

Performance analysis of Neural Network Algorithms on Stock Market Forecasting

Backpropagation and Recurrent Neural Networks in Financial Analysis of Multiple Stock Market Returns

An Improved Approach for Business & Market Intelligence using Artificial Neural Network

International Journal of Computer Engineering and Applications, Volume XII, Issue II, Feb. 18, ISSN

Stock Market Prediction System

Stock Trading Following Stock Price Index Movement Classification Using Machine Learning Techniques

Applications of Neural Networks in Stock Market Prediction

STOCK PRICE PREDICTION: KOHONEN VERSUS BACKPROPAGATION

Artificially Intelligent Forecasting of Stock Market Indexes

Iran s Stock Market Prediction By Neural Networks and GA

$tock Forecasting using Machine Learning

Deep Learning for Time Series Analysis

Bond Market Prediction using an Ensemble of Neural Networks

A Novel Prediction Method for Stock Index Applying Grey Theory and Neural Networks

Prediction Using Back Propagation and k- Nearest Neighbor (k-nn) Algorithm

Keywords: artificial neural network, backpropagtion algorithm, derived parameter.

Statistical and Machine Learning Approach in Forex Prediction Based on Empirical Data

Leverage Financial News to Predict Stock Price Movements Using Word Embeddings and Deep Neural Networks

Applications of Neural Networks

Predicting Economic Recession using Data Mining Techniques

Stock Price Prediction using combination of LSTM Neural Networks, ARIMA and Sentiment Analysis

COMPARING NEURAL NETWORK AND REGRESSION MODELS IN ASSET PRICING MODEL WITH HETEROGENEOUS BELIEFS

The Use of Neural Networks in the Prediction of the Stock Exchange of Thailand (SET) Index

Journal of Internet Banking and Commerce

AN ARTIFICIAL NEURAL NETWORK MODELING APPROACH TO PREDICT CRUDE OIL FUTURE. By Dr. PRASANT SARANGI Director (Research) ICSI-CCGRT, Navi Mumbai

Development and Performance Evaluation of Three Novel Prediction Models for Mutual Fund NAV Prediction

Using Structured Events to Predict Stock Price Movement: An Empirical Investigation. Yue Zhang

ANN Robot Energy Modeling

International Journal of Research in Engineering Technology - Volume 2 Issue 5, July - August 2017

Neural Network Prediction of Stock Price Trend Based on RS with Entropy Discretization

Role of soft computing techniques in predicting stock market direction

PREDICTION OF CLOSING PRICES ON THE STOCK EXCHANGE WITH THE USE OF ARTIFICIAL NEURAL NETWORKS

2015, IJARCSSE All Rights Reserved Page 66

A.K.Singh. Keywords Ariticial neural network, backpropogation, soft computing, forecasting

A Comparative Study of Ensemble-based Forecasting Models for Stock Index Prediction

Introducing GEMS a Novel Technique for Ensemble Creation

Stock Price Prediction using Recurrent Neural Network (RNN) Algorithm on Time-Series Data

OPENING RANGE BREAKOUT STOCK TRADING ALGORITHMIC MODEL

Understanding neural networks

Copy Right to GARPH Page 38

Neuro-Genetic System for DAX Index Prediction

Design of a Wavelet Inspired Neuro-Fuzzy Approach to Forecast Financial Data

Pattern Recognition by Neural Network Ensemble

Stock market price index return forecasting using ANN. Gunter Senyurt, Abdulhamit Subasi

SURVEY OF MACHINE LEARNING TECHNIQUES FOR STOCK MARKET ANALYSIS

Keywords: artificial neural network, backpropagtion algorithm, capital asset pricing model

Stock Price Prediction using Deep Learning

Foreign Exchange Rate Forecasting using Levenberg- Marquardt Learning Algorithm

HKUST CSE FYP , TEAM RO4 OPTIMAL INVESTMENT STRATEGY USING SCALABLE MACHINE LEARNING AND DATA ANALYTICS FOR SMALL-CAP STOCKS

Keywords Time series prediction, MSM30 prediction, Artificial Neural Networks, Single Layer Linear Counterpropagation network.

Stock Market Forecasting Using Artificial Neural Networks

Disclaimer. 2 Disclaimer

Neural Network Approach for Stock Prediction using Historical Data

Stock Market Prediction using Artificial Neural Networks

APPLICATION OF ARTIFICIAL NEURAL NETWORK SUPPORTING THE PROCESS OF PORTFOLIO MANAGEMENT IN TERMS OF TIME INVESTMENT ON THE WARSAW STOCK EXCHANGE

distribution of the best bid and ask prices upon the change in either of them. Architecture Each neural network has 4 layers. The standard neural netw

Forecasting Foreign Exchange Rate during Crisis - A Neural Network Approach

Cognitive Pattern Analysis Employing Neural Networks: Evidence from the Australian Capital Markets

Price Pattern Detection using Finite State Machines with Fuzzy Transitions

Using neural network to approximate macroeconomic forecast models for BRICS nations

Decision model, sentiment analysis, classification. DECISION SCIENCES INSTITUTE A Hybird Model for Stock Prediction

Prediction of Stock Closing Price by Hybrid Deep Neural Network

Predicting Trading Signals of the All Share Price Index Using a Modified Neural Network Algorithm

COGNITIVE LEARNING OF INTELLIGENCE SYSTEMS USING NEURAL NETWORKS: EVIDENCE FROM THE AUSTRALIAN CAPITAL MARKETS

A Review of Artificial Neural Network Applications in Control. Chart Pattern Recognition

Forecasting of Stock Exchange Share Price using Feed Forward Artificial Neural Network

Accepted Manuscript AIRMS: A RISK MANAGEMENT TOOL USING MACHINE LEARNING. Spyros K. Chandrinos, Georgios Sakkas, Nikos D. Lagaros

Spiking Back Propagation Multilayer Neural Network Design for Predicting Unpredictable Stock Market Prices with Time Series Analysis

International Journal of Computer Science Trends and Technology (IJCST) Volume 5 Issue 2, Mar Apr 2017

LITERATURE REVIEW. can mimic the brain. A neural network consists of an interconnected nnected group of

Option Pricing Using Bayesian Neural Networks

Forecasting stock market return using ANFIS: the case of Tehran Stock Exchange

Business Strategies in Credit Rating and the Control of Misclassification Costs in Neural Network Predictions

Deep Learning in Asset Pricing

Neuro Fuzzy based Stock Market Prediction System

Solving dynamic portfolio choice problems by recursing on optimized portfolio weights or on the value function?

Academic Research Review. Algorithmic Trading using Neural Networks

Predictive Model Learning of Stochastic Simulations. John Hegstrom, FSA, MAAA

Forecasting Currency Exchange Rates via Feedforward Backpropagation Neural Network

Predicting the stock price companies using artificial neural networks (ANN) method (Case Study: National Iranian Copper Industries Company)

A Big Data Analytical Framework For Portfolio Optimization

INDIAN STOCK MARKET PREDICTOR SYSTEM

International Journal of Computer Engineering and Applications, Volume XII, Issue IV, April 18, ISSN

Stock Market Analysis Using Artificial Neural Network on Big Data

Transcription:

STOCK MARKET PREDICTION AND ANALYSIS USING MACHINE LEARNING Sumedh Kapse 1, Rajan Kelaskar 2, Manojkumar Sahu 3, Rahul Kamble 4 1 Student, PVPPCOE, Computer engineering, PVPPCOE, Maharashtra, India 2 Student, PVPPCOE, Computer engineering, PVPPCOE, Maharashtra, India 3 Student, PVPPCOE, Computer engineering, PVPPCOE, Maharashtra, India 4 Student, PVPPCOE, Computer engineering, PVPPCOE, Maharashtra, India ABSTRACT Stock market prediction has always been an interesting research topic among researchers mainly due to its capital gain by trading stocks and or to understand the information hidden in stock market data. Many machine learning algorithms and statistical models have been proposed by researchers for stock price prediction and stock price movement prediction. We have studied various machine learning methods and techniques for stock market prediction. Here we present recent growth in stock market prediction methods and models, perform a comparison among these models to find out the accuracy of the prediction of the stock market values and also figuring out the advantages and disadvantages of these individual models. We are using LSTM and GRU models to predict future stock prices. Keyword: - Stock market forecasting, Machine learning, Recurrent neural networks, Long short term memory, Gated recurrent unit, Back propagation. 1. INTRODUCTION Stock market prediction has been one of the most challenging goals of the Artificial Intelligence (AI) research community. This research is meant to go far beyond the capabilities of traditional AI research, which primarily focuses on developing systems that are supposed to emulate human intelligence, because stock market is generally Nonlinear and volatile. The fluctuation rate may depend on many factors: equity, interest rate, security options, warrants merger and ownership of large financial corporations or companies. Still, no one can consistently predict the stock market movement. That is why this of AI prediction requires an iterative process of knowledge discovery and system improvement which can be achieved with various models such as ANN and SVM. Stock market is a promising financial investment that can generate great wealth. However, the volatile nature of the stock market makes it a very high risk investment. Stock market prediction have always been an important issue in the field of technology, financial and mathematics because of its very likely financial gain. As major amount of capital is traded and exchanged from the stock market, it is considered as highly important investment outlet. Also, the prediction of the stock brings the task of proving if the stock market can be predicted or not, with the huge number of fast computers and tremendous information all over the Internet, stock markets have become more accessible to both the strategic investors and the normal public. Long Short-Term Memory (LSTM) is one of the most successful RNNs architectures. LSTM introduces the memory cell, a unit of computation that replaces traditional artificial neurons in the hidden layer of a network. With these memory cells, networks are able to effectively associate memories and input remote in time, hence suit to grasp the structure of data dynamically over time with high prediction capacity. 2. LITERATURE REVIEW Stock price prediction using LSTM, RNN and CNN-sliding window model: [3] The experiment was done for three different deep learning models. CNN is giving more accurate results than the other two models. This is due to the reason that CNN does not depend on any previous information for prediction. It uses only the current window for prediction. This enables the model to understand the dynamical changes and patterns occurring in the current 8196 www.ijariie.com 3806

window. However in the case of RNN and LSTM, it uses information from previous lags to predict the future instances. Stock market prediction using neural network through news on online social networks: [5] In theory, RNNs can make use of the information in arbitrarily long sequences, but in practice they are limited to looking back only a few steps. The vanishing gradient problem prevents standard RNNs from learning long-term dependencies. Gated Recurrent Units (GRUs) were proposed. Stock market's price movement prediction with LSTM neural networks: [1] The objective of this project is to study the applicability of recurrent neural networks, in particular the LSTM networks, on the problem of stocks market prices movements prediction. Assess their performance in terms of accuracy and other metrics through experiments on top of real life data and analyze if they present any sort of gain in comparison to more traditional machine learning algorithms. A recurrent neural network approach in predicting daily stock prices an application to the Sri Lankan stock market: [4] Recurrent Neural Networks (RNN) is a sub type of neural networks that use feedback connections. Several types of RNN models are employed in predicting financial time series. This study was conducted in order to develop models to predict daily stock prices of selected listed companies of Colombo Stock Exchange (CSE) based on Recurrent Neural Network (RNN) Approach and to measure the accuracy of the models developed and identify the shortcomings of the models if present. A LSTM-based method for stock returns prediction: A case study of China stock market: [2] In our LSTM model for stock prediction, one sequence was defined as a sequential collection of the daily dataset of any single stock in a fixed time period (N days). The daily dataset describes the performance of the stock with sequence learning features like closing price, trade volume on one particular day in these N days. 3. PREDICTION MODELS 3.1 Long short-term memory Long short-term memory (LSTM) units (or blocks) are a building unit for layers of a recurrent neural network (RNN). The Long Short-Term Memory or LSTM network is a recurrent neural network that is trained using Backpropagation through Time and overcomes the vanishing gradient problem. A common LSTM unit is composed of a cell, an input gate, an output gate and a forget gate. The cell is responsible for "remembering" values over arbitrary time intervals; hence the word "memory" in LSTM. Each of the three gates can be thought of as a "conventional" artificial neuron, as in a multi-layer neural network: that is, they compute an activation of a weighted sum. Intuitively, they can be thought as regulators of the flow of values that goes through the connections of the LSTM; hence the denotation "gate". There are connections between these gates and the cell. Fig -1: Architecture of LSTM 8196 www.ijariie.com 3807

3.2 Gated recurrent unit Gated recurrent units (GRUs) are a gating mechanism in recurrent neural networks, introduced in 2014 by Kyunghyun Cho et al. The GRU operates using a reset gate and an update gate. The reset gate sits between the previous activation and the next candidate activation to forget previous state, and the update gate decides how much of the candidate activation to use in updating the cell state. GRUs have been shown to exhibit better performance on smaller datasets. The LSTM unit has separate input and forget gates, while the GRU performs both of these operations together via its reset gate. They have fewer parameters than LSTM, as they lack an output gate. There are several variations on the full gated unit, with gating done using the previous hidden state and the bias in various combinations, and a simplified form called minimal gated unit. 4. PROPOSED SYSTEM Fig -2: Architecture of GRU Fig -3: Proposed System Architecture In the process of predicting the future of stock market there needs to be a detailed procedure to follow as described in this figure 8196 www.ijariie.com 3808

The initial step will be to collect some historical stock data of any firm from yahoo finance that is used for predicting the values of stock prices. Then the data collected is preprocessed by using Data scaling and Data discretization techniques. In this step, only the features such as Date, open, high, low, close, and volume which are to be fed to the neural network are chosen. The historical stock data is divided into training data and testing data, in the ratio of 70:30. The data are fed to the recurrent neural network and trained for prediction. Our LSTM model consist of a sequential input layer followed by LSTM layers, dense layer and then finally a dense output layer with linear activation function. The output value generated by the output layer of the RNN is compared with the target value. The error between the target and the obtained output value is minimized by using back propagation through time algorithm which adjusts the weights and the biases of the network. 5. RESULTS AND DISCUSSIONS Here we plot the loss value of the training of the dataset, the loss is high during the initial stages of the training, but as the training progresses the loss goes on decreasing, the lower the loss the better will be the prediction. Fig -4: Plot of Loss During Training Process This graph depicts actual and predicted stocks closing price from a particular company, through this system, it is observed that the actual as well as predicted values are both close and produce acceptable testing accuracy. Fig -5: Plot Depicting Actual and Predicted Stock Prices 8196 www.ijariie.com 3809

6. CONCLUSION The project titled Stock market prediction and analysis using machine learning is implemented using the machine learning models LSTM and GRU which are modern versions of Recurrent neural networks. The LSTM and GRU models are trained by feeding past datasets and statistics upon which it has learned and adapted to the pattern and predicted the future stock price value, which is approximate and close to the original value. 7. REFERENCES [1]. M. Q. Nelson, A. C. M. Pereira and R. A. de Oliveira, "Stock market's price movement prediction with LSTM neural networks," 2017 International Joint Conference on Neural Networks (IJCNN), Anchorage, AK, 2017, pp. 1419-1426. [2]. K. Chen, Y. Zhou and F. Dai, "A LSTM-based method for stock returns prediction: A case study of China stock market," 2015 IEEE International Conference on Big Data (Big Data), Santa Clara, CA, 2015, pp. 2823-2824. [3]. S. Selvin, R. Vinayakumar, E. A. Gopalakrishnan, V. K. Menon and K. P. Soman, "Stock price prediction using LSTM, RNN and CNN-sliding window model," 2017 International Conference on Advances in Computing, Communications and Informatics (ICACCI), Udupi, 2017, pp. 1643-1647. [4]. A. J. P. Samarawickrama and T. G. I. Fernando, "A recurrent neural network approach in predicting daily stock prices an application to the Sri Lankan stock market," 2017 IEEE International Conference on Industrial and Information Systems (ICIIS), Peradeniya, 2017, pp. 1-6. [5]. Chen, W, Zhang, Y, Yeo, C.K., Lau, C.T., Lee, B.S. Stock market prediction using neural network through news on online social networks[c]. Smart Cities Conference (ISC2), 2017 International, 2017: 11-2. 8196 www.ijariie.com 3810