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

Similar documents
Prediction for Stock Marketing Using Machine Learning

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

Price Pattern Detection using Finite State Machines with Fuzzy Transitions

STOCK MARKET PREDICTION AND ANALYSIS USING MACHINE LEARNING

Stock Market Predictor and Analyser using Sentimental Analysis and Machine Learning Algorithms

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

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

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

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

Handling Uncertainty in Social Lending Credit Risk Prediction with a Choquet Fuzzy Integral Model

Role of soft computing techniques in predicting stock market direction

OPENING RANGE BREAKOUT STOCK TRADING ALGORITHMIC MODEL

Stock Prediction Using Twitter Sentiment Analysis

Application of Data Mining Technology in the Loss of Customers in Automobile Insurance Enterprises

Forecasting stock market prices

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

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

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

An introduction to Machine learning methods and forecasting of time series in financial markets

Machine Learning and Artificial Neural Network Process Viability and Implications in Stock Market Prediction

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

Prediction of Stock Closing Price by Hybrid Deep Neural Network

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

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

Risk Element Transmission Model of Construction Project Chain Based on System Dynamic

FINANCIAL MARKET PREDICTION SYSTEM WITH EVOLINO NEURAL NETWORK AND DELPHI METHOD

Stock Trading System Based on Formalized Technical Analysis and Ranking Technique

ScienceDirect. Detecting the abnormal lenders from P2P lending data

A Dynamic Hedging Strategy for Option Transaction Using Artificial Neural Networks

A Novel Method of Trend Lines Generation Using Hough Transform Method

Iran s Stock Market Prediction By Neural Networks and GA

2015, IJARCSSE All Rights Reserved Page 66

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

Long Term and Short Term Investment Strategy for Predicting the Performance of BSE using MLP Model

ISSN: (Online) Volume 4, Issue 2, February 2016 International Journal of Advance Research in Computer Science and Management Studies

Journal of Internet Banking and Commerce

FORECASTING THE S&P 500 INDEX: A COMPARISON OF METHODS

Improving Stock Price Prediction with SVM by Simple Transformation: The Sample of Stock Exchange of Thailand (SET)

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

APPLICATION OF SUPPORT VECTOR REGRESSION FOR JAKARTA STOCK COMPOSITE INDEX PREDICTION WITH FEATURE SELECTION USING LAPLACIAN SCORE

A Big Data Analytical Framework For Portfolio Optimization

Prediction of stock price developments using the Box-Jenkins method

Fuzzy and Neuro-Symbolic Approaches to Assessment of Bank Loan Applicants

Keyword: Risk Prediction, Clustering, Redundancy, Data Mining, Feature Extraction

Available online at ScienceDirect. Procedia Computer Science 89 (2016 )

International Journal of Advance Engineering and Research Development. Stock Market Prediction Using Neural Networks

A Study on the Motif Pattern of Dark-Cloud Cover in the Securities

An enhanced artificial neural network for stock price predications

COMPARATIVE STUDY IN ESTIMATING VOLKSWAGEN S PRICE: ARIMA VERSUS ANN

Artificially Intelligent Forecasting of Stock Market Indexes

Application of Deep Learning to Algorithmic Trading

SURVEY OF MACHINE LEARNING TECHNIQUES FOR STOCK MARKET ANALYSIS

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

Stock Price and Index Forecasting by Arbitrage Pricing Theory-Based Gaussian TFA Learning

Natural Customer Ranking of Banks in Terms of Credit Risk by Using Data Mining A Case Study: Branches of Mellat Bank of Iran

Research Article A Novel Machine Learning Strategy Based on Two-Dimensional Numerical Models in Financial Engineering

Academic Research Review. Algorithmic Trading using Neural Networks

Seasonal Pathloss Modeling at 900MHz for OMAN

A COMPARATIVE STUDY OF DATA MINING TECHNIQUES IN PREDICTING CONSUMERS CREDIT CARD RISK IN BANKS

Predictive Risk Categorization of Retail Bank Loans Using Data Mining Techniques

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

ABSTRACT. KEYWORDS: Credit Risk, Bad Debts, Credit Rating, Credit Indices, Logistic Regression INTRODUCTION AHMAD NAGHILOO 1 & MORADI FEREIDOUN 2

State Switching in US Equity Index Returns based on SETAR Model with Kalman Filter Tracking

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

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

Research on Enterprise Financial Management and Decision Making based on Decision Tree Algorithm

Naïve Bayesian Classifier and Classification Trees for the Predictive Accuracy of Probability of Default Credit Card Clients

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

A SEEMINGLY UNRELATED REGRESSION ANALYSIS ON THE TRADING BEHAVIOR OF MUTUAL FUND INVESTORS

Copy Right to GARPH Page 38

A MATHEMATICAL PROGRAMMING APPROACH TO ANALYZE THE ACTIVITY-BASED COSTING PRODUCT-MIX DECISION WITH CAPACITY EXPANSIONS

$tock Forecasting using Machine Learning

A New Method Based on Clustering and Feature Selection for Credit Scoring of Banking Customers Seyedeh Maryam Anaei 1 and Mohsen Moradi 2

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

Applying Independent Component Analysis to Factor Model in Finance

Applications of Neural Networks in Stock Market Prediction

Study of Relation between Market Efficiency and Stock Efficiency of Accepted Firms in Tehran Stock Exchange for Manufacturing of Basic Metals

A multiple model of perceptron neural network with sample selection through chicken swarm algorithm for financial forecasting

Recurrent Residual Network

The analysis of the multivariate linear regression model of. soybean future influencing factors

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

Stock Market Trend Prediction Using Recurrent Convolutional Neural Networks

STOCK PRICE PREDICTION: KOHONEN VERSUS BACKPROPAGATION

The Empirical Study on Factors Influencing Investment Efficiency of Insurance Funds Based on Panel Data Model Fei-yue CHEN

Prediction of Future Stock Close Price using Proposed Hybrid ANN Model of Functional Link Fuzzy Logic Neural Model

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

Stock Price Forecasting with Support Vector Machines based on Web Financial Information Sentiment Analysis Run Cao, Xun Liang, and Zhihao Ni

Chapter 11: Artificial Intelligence

A Prediction Model for Stock Market: A Comparison of The World s Top. Investors with Data Mining Method

Analysis the relationship between consumer confidence index and other macroeconomic indices using RBF network

ARTIFICIAL NEURAL NETWORK SYSTEM FOR PREDICTION OF US MARKET INDICES USING MISO AND MIMO APROACHES

Two-Period-Ahead Forecasting For Investment Management In The Foreign Exchange

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

Performance analysis of Neural Network Algorithms on Stock Market Forecasting

Stock Market Prediction Analysis by Incorporating Social and News Opinion and Sentiment

An Algorithm for Trading and Portfolio Management Using. strategy. Since this type of trading system is optimized

CS221 Project Final Report Deep Reinforcement Learning in Portfolio Management

Neuro-Genetic System for DAX Index Prediction

American Option Pricing Formula for Uncertain Financial Market

Deep Learning for Time Series Analysis

Transcription:

Stock Price Prediction using Recurrent Neural Network (RNN) Algorithm on Time-Series Data Israt Jahan Department of Computer Science and Operations Research North Dakota State University Fargo, ND 58105 i.jahan@ndus.edu Sayeed Sajal Department of Math and Computer Science Minot State University Minot, ND 58707 sayeed.sajal@minotstateu.edu Abstract The stock market is generally very unpredictable in nature. There are many factors that might be responsible to determine the price of a particular stock, such as, the market trend, supply and demand ratio, global economy, public sentiments, sensitive financial information, earning declaration, historical price and many more. That's why accurate prediction is one the challenging works. But, with the help of new technologies like data mining, machine learning, we can analyze big data and develop an accurate prediction model without any human errors. In this work, we analyzed the closing price of a stock as sample data. We developed a prediction model using a supervised machine learning algorithm to predict the stock price. In particular, we used a recurrent neural network (RNN) algorithm on the time-series data of a stock. We also cross-checked the predicted closing price with the true closing price. Finally, we found that this model also can be used to predict other volatile financial instruments. Introduction Prediction is one of the difficult things where the future is very volatile. By nature, stock market is unpredictable. There are many factors that influences stock price [1, 2]. With the advancement of new technology and statistical tools, many scholars explored the possibility to predict stock price. In 1997, the prior knowledge and neural network was used to predict stock price [3]. Later, genetic algorithm approach and support vector machine were also introduced to predict stock price [4, 5]. Lee introduced stock price prediction using reinforcement learning [6]. In 2008, Chang used a TSK type fuzzy rule-

based system for stock price prediction [7]. In 2009, Tsai used a hybrid machine learning algorithm to predict stock price [8]. Over the time, the scholars used to predict the stock price using different kinds of machine learning algorithms such as deep learning [9, 10], extreme machine learning [11] and applied econometric approach using machine learning [12]. In 2018, popular machine learning algorithms were used to predict stock price such as pattern graph [13], convolutional neural network [14], recurrent neural network [15]. Here, we used recurrent neural network on time-series data to predict stock price. Experimental Results Here, we used the closing price of Advanced Micro Device (AMD) of 168 working days. The start date is May 2 nd, 2017 and end date is Dec 28 th, 2017. First 156 days data was used as training data shown in Figure 1 and last 12 days data was used as test data. First of all, we trained the 156 days data to predict next 12 data points. Then we compared the true data and generated data using recurrent neural network. The data is separated in two parts for train and test data. Figure 1: Train Data for first 156 days (AMD closing price). Here, we used python 3.0 to develop the RNN model to predict stock price. Numpy, pandas, matplotlib, scikitlearn and tensorflow packages in Python were used in this work. Scikitlearn was used for pre-processing the data. 1

Then we defined the next batch function to generate the batch. After successful tuning on the parameters in RNN model, we successfully developed the model which generate the predicted price which is very close the true price. The parameters are given below. We also have the define the basic LSTM cell and run the session to measure mean-square error (MSE). The python code is given below. 2

At the end, we generate the predicted values from the seed and compare the generated values with the true value to evaluate our model shown in Figure 2. Conclusion Figure 2: Comparison between true and generated stock price. Here, we successfully developed a model to predict the stock price in future. The predicted stock price is very close to the true price. We only showed a stock as a sample in this experiment. The percentage of error is below 5 % based on this model. We can use the same model to predict other stock prices. In our future work, we planned to introduce the investors sentiments on sensitive financial disclosure to incorporate the uneven price changes which is often very difficult to justify based on the historical prices only. 3

References [1] King, B. F. (1966). Market and industry factors in stock price behavior. the Journal of Business, 39(1), 139-190. [2] Chen, N. F., Roll, R., & Ross, S. A. (1986). Economic forces and the stock market. Journal of business, 383-403. [3] Kohara, K., Ishikawa, T., Fukuhara, Y., & Nakamura, Y. (1997). Stock price prediction using prior knowledge and neural networks. Intelligent systems in accounting, finance and management, 6(1), 11-22. [4] Kim, K. J., & Han, I. (2000). Genetic algorithms approach to feature discretization in artificial neural networks for the prediction of stock price index. Expert systems with Applications, 19(2), 125-132. [5] Trafalis, T. B., & Ince, H. (2000). Support vector machine for regression and applications to financial forecasting. In Neural Networks, 2000. IJCNN 2000, Proceedings of the IEEE-INNS-ENNS International Joint Conference on (Vol. 6, pp. 348-353). IEEE. [6] Lee, J. W. (2001). Stock price prediction using reinforcement learning. In Industrial Electronics, 2001. Proceedings. ISIE 2001. IEEE International Symposium on (Vol. 1, pp. 690-695). IEEE. [7] Chang, P. C., & Liu, C. H. (2008). A TSK type fuzzy rule-based system for stock price prediction. Expert Systems with applications, 34(1), 135-144. [8] Tsai, C. F., & Wang, S. P. (2009, March). Stock price forecasting by hybrid machine learning techniques. In Proceedings of the International MultiConference of Engineers and Computer Scientists (Vol. 1, No. 755, p. 60). [9] Patel, J., Shah, S., Thakkar, P., & Kotecha, K. (2015). Predicting stock market index using fusion of machine learning techniques. Expert Systems with Applications, 42(4), 2162-2172. [10] Heaton, J. B., Polson, N. G., & Witte, J. H. (2016). Deep learning in finance. arxiv preprint arxiv:1602.06561. [11] Li, X., Xie, H., Wang, R., Cai, Y., Cao, J., Wang, F.,... & Deng, X. (2016). Empirical analysis: stock market prediction via extreme learning machine. Neural Computing and Applications, 27(1), 67-78. [12] Mullainathan, S., & Spiess, J. (2017). Machine learning: an applied econometric approach. Journal of Economic Perspectives, 31(2), 87-106. 4

[13] Jeon, S., Hong, B., & Chang, V. (2018). Pattern graph tracking-based stock price prediction using big data. Future Generation Computer Systems, 80, 171-187. [14] Lee, M. S., Ahn, C. H., Kwahk, K. Y., & Ahn, H. (2018). Stock Market Prediction Using Convolutional Neural Network That Learns from a Graph. World Academy of Science, Engineering and Technology, International Journal of Business and Economics Engineering, 5(1). [15] TORRES, D. G., & QIU, H. (2018). Applying Recurrent Neural Networks for Multivariate Time Series Forecasting of Volatile Financial Data. 5