SURVEY OF MACHINE LEARNING TECHNIQUES FOR STOCK MARKET ANALYSIS

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

Predicting Economic Recession using Data Mining Techniques

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

Predicting stock prices for large-cap technology companies

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

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

Time Series Forecasting Of Nifty Stock Market Using Weka

An enhanced artificial neural network for stock price predications

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

2015, IJARCSSE All Rights Reserved Page 66

Forecasting stock market prices

Iran s Stock Market Prediction By Neural Networks and GA

A Novel Method of Trend Lines Generation Using Hough Transform Method

STOCK MARKET PREDICTION AND ANALYSIS USING MACHINE LEARNING

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

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

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

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

STOCK MARKET TRENDS PREDICTION USING NEURAL NETWORK BASED HYBRID MODEL

Understanding neural networks

Stock Prediction Using Twitter Sentiment Analysis

International Journal of Advance Engineering and Research Development REVIEW ON PREDICTION SYSTEM FOR BANK LOAN CREDIBILITY

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

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

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

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

Prediction Algorithm using Lexicons and Heuristics based Sentiment Analysis

Applications of Neural Networks in Stock Market Prediction

Role of soft computing techniques in predicting stock market direction

STOCK PRICE PREDICTION: KOHONEN VERSUS BACKPROPAGATION

Prediction of Stock Closing Price by Hybrid Deep Neural Network

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

OPENING RANGE BREAKOUT STOCK TRADING ALGORITHMIC MODEL

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

CHAPTER V TIME SERIES IN DATA MINING

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

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

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

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

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

Credit Card Default Predictive Modeling

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

Machine Learning in Risk Forecasting and its Application in Low Volatility Strategies

Predictive Risk Categorization of Retail Bank Loans Using Data Mining Techniques

april a review of John Murphy s latest book using the COT report to trade the S&P 500

Artificially Intelligent Forecasting of Stock Market Indexes

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

Research Article Design and Explanation of the Credit Ratings of Customers Model Using Neural Networks

Bond Market Prediction using an Ensemble of Neural Networks

Using artificial neural networks for forecasting per share earnings

GUIDE TO STOCK trading tools

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

Journal of Internet Banking and Commerce

Stock Market Forecasting Using Artificial Neural Networks

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

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

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

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

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

Pattern Recognition by Neural Network Ensemble

Regression Analysis of Stock Returns By Filtering with Simple Moving Averages

Price Pattern Detection using Finite State Machines with Fuzzy Transitions

Performance analysis of Neural Network Algorithms on Stock Market Forecasting

A Big Data Analytical Framework For Portfolio Optimization

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

USE OF MACHINE LEARNING ALGORITHMS AND TWITTER SENTIMENT ANALYSIS FOR STOCK MARKET PREDICTION

Forecasting Stock Prices Using a Hybrid Approach

Feedforward Neural Networks for Sentiment Detection in Financial News

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

Journal of Insurance and Financial Management, Vol. 1, Issue 4 (2016)

Using Sector Information with Linear Genetic Programming for Intraday Equity Price Trend Analysis

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

Application of Bayesian Network to stock price prediction

Time Series Least Square Forecasting Analysis and Evaluation for Natural Gas Consumption

THE CYCLE TRADING PATTERN MANUAL

Lazy Prices: Vector Representations of Financial Disclosures and Market Outperformance

Stock Market Prediction System

Application of selected methods of statistical analysis and machine learning. learning in predictions of EURUSD, DAX and Ether prices

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

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

Data Adaptive Stock Recommendation

A TEMPORAL PATTERN APPROACH FOR PREDICTING WEEKLY FINANCIAL TIME SERIES

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

A Comparative Study of Various Forecasting Techniques in Predicting. BSE S&P Sensex

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

Application of Support Vector Machine on Algorithmic Trading

Stock Market Prediction with Various Technical Indicators Using Neural Network Techniques

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

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

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

Predicting Abnormal Stock Returns with a. Nonparametric Nonlinear Method

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

Foreign Exchange Rate Forecasting using Levenberg- Marquardt Learning Algorithm

Neural Network Approach for Stock Prediction using Historical Data

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

Stock Market Real Time Recommender Model Using Apache Spark Framework

Level III Learning Objectives by chapter

OSCILLATORS. TradeSmart Education Center

Level III Learning Objectives by chapter

Data based stock portfolio construction using Computational Intelligence

Transcription:

International Journal of Computer Engineering and Applications, Volume XI, Special Issue, May 17, www.ijcea.com ISSN 2321-3469 SURVEY OF MACHINE LEARNING TECHNIQUES FOR STOCK MARKET ANALYSIS Sumeet Ghegade 1, Mandar Koujalgi 2, Garvit Raj Singhal 3 1 Department of Computer Engineering 2 Department of Computer Engineering MITCOE, India ABSTRACT: Stock market trading is becoming a major source of income for people in India. In order to be a successful investor the most important thing is to predict the trend of the stock you are investing in. It is a well-known fact though that stock market prices are highly volatile. Analyzing the entire data and recent updates about a company is beyond human brains comprehension. Hence, we aim to propose in this paper some models that may be able to predict accurate trends in stock market prices. The aim is to forecast closing price of a particular stock for next few days with minimal error. Combination of both technical and fundamental analysis is going to be used along with some data analysis techniques. Keywords: Stock market, trends, fundamental analysis, technical analysis, data analysis techniques. [1] INTRODUCTION Stock market, a very complex system, plays an vital part in financial sector. There are many points affecting the volatility of stock market, such as domestic economic factors, international affairs factor and company s performance, etc. Positive stock market results can be used to promote people to buy the shares, thus leading to a bullish market; Bad stock market results can be used to promote people to sell stocks, thus causing a fall. Prediction of stock market is important in finance and is gaining more consideration, due to the fact that if the trend of the market is predicted effectively the investors may get better guidance. Researchers have projected many models using different fundamental, technical and time series analysis methods to give approximate predictions [1][2][4][6][7]. The nonlinear and volatile nature of stock market is advocated by many researchers and financial experts. As the financial market being dynamic, chaotic, and volatile in nature it is very hard to comprehend because of its nonlinearity, therefore it is of utter importance for the investors to recognize its performance which would help for their profitable investment in it. Sumeet Ghegade, Mandar Koujalgi, Garvit Raj Singhal 1

SURVEY OF MACHINE LEARNING TECHNIQUES FOR STOCK MARKET ANALYSIS Nowadays, stock markets are a vital part of the global economy. Any variation in the market affects our lives and the economy of a country. Due to its unpredictable behavior there is always some risk to the investment in the stock market. Many attempts have been conducted on the market to understand some worthwhile patterns and forecast their movements. One very important thing to consider is that predicting accurate prices of a stock is impossible and is also not necessary at all. Investors need to know the trends in market ad that alone is enough for them to make profits. Hence predicting accurate trends in the market is the main objective of this paper. We have divided the entire process into three parts namely: 1. Data analysis 2. Fundamental analysis for prediction 3. Technical analysis for prediction. [2] DATA ANALYSIS We have a large amount of historical data associated with every stock. Its opening price, closing price, number of trades, total transactions of each day since the company put forward its IPO (Initial Public Offer) can be accessed. Some investors prefer to study this data manually in order to make their decisions. But analyzing this huge amount of data in text format is not possible for a normal human being. Hence we propose to use data analyzing techniques so that the investor can be provided with data about data which will make his task a bit simple. The first technique used is Moving Averages: Moving averages smooth the price data to form a trend following indicator. They do not predict price direction, but rather define the current direction with a lag. Moving averages lag because they are based on past prices[5]. Despite this lag, moving averages help smooth price action and filter out the noise. They also form the building blocks for many other technical indicators and overlays, such as Bollinger Bands, MACD and the McClellan Oscillator. The two most popular types of moving averages are the Simple Moving Average (SMA) and the Exponential Moving Average (EMA). These moving averages can be used to identify the direction of the trend or define potential support and resistance levels. A simple moving average is formed by computing the average price of a security over a specific number of periods. Most moving averages are based on closing prices. A 5-day simple Sumeet Ghegade, Mandar Koujalgi, Garvit Raj Singhal 2

International Journal of Computer Engineering and Applications, Volume XI, Special Issue, May 17, www.ijcea.com ISSN 2321-3469 moving average is the five day sum of closing prices divided by five. As its name implies, a moving average is an average that moves. Old data is dropped as new data comes available. In the following graph moving average has been plotted for a dataset of closing prices of Bank of Baroda for 30 consecutive days: Figure 1: Moving average analysis The direction of the moving average conveys important information about prices. A rising moving average shows that prices are generally increasing. A falling moving average indicates that prices, on average, are falling. A rising long-term moving average reflects a long-term uptrend. A falling longterm moving average reflects a long-term downtrend. The second one is K-means algorithm: As important it is to predict the future prices, choosing which stock to invest in is equally important. There are a large number of companies in Indian stock market and analyzing each one is not possible for the investor. To make it easy for the investor to make this choice we propose to use the K-means algorithm to classify all the companies according to the amount of returns they may yield. In general, we have data points that have to be partitioned in clusters. The goal is to assign a cluster to each data point. K-means is a clustering method that aims to find the positions of the clusters that minimize the distance from the data points to the cluster. K-means clustering solves where is the set of points that belong to cluster. The stocks will be assigned clusters depending on the amount of returns they have yielded in the past. Stocks with higher returns will be placed in same cluster while those with low in another. This will make it easier for the investor to choose a company to invest in. Sumeet Ghegade, Mandar Koujalgi, Garvit Raj Singhal 3

SURVEY OF MACHINE LEARNING TECHNIQUES FOR STOCK MARKET ANALYSIS [3] FUNDAMENTAL ANALYSIS The fundamental approach is based on an in-depth and all-around study of the underlying forces of the economy, conducted to provide data that can be used to forecast future prices and market developments. Fundamental analysis can be composed of many different aspects: the analysis of the economy as the whole, the analysis of an industry or that of an individual company. A combination of the data is used to establish the true current value of stocks, to determine whether they are over or under-valued and to predict the future value of the stocks based on this information. Every time you put on a trade you trade with another human being. The reason why stocks plunge and rise is that people get scared and greedy very easily. Hence it is important to understand the sentiments of investors. This can be done using sentimental analysis.[8] The biggest source of information to understand people s sentiments is through social networking sites. There are two approaches towards sentimental analysis namely: 1. Machine Learning 2. Lexicon-based approach Of these we are going to be focusing on Naïve-Bayes Classification under supervised machine learning. General flow towards sentimental analysis involves following steps: 1. Corpus collection: Social networking sites contain huge amount of unstructured data that needs to be filtered before analysis. Therefore, investor needs to fire a query to Search API in order to extract required metadata. In response to query search API sends required data in the form of.json file stored on host machine using mongodb storage. 2. Text Processing: Textual data gathered from various social networking sites is difficult to analyze as it is. Hence it is necessary to filter this data. This is done using tokenization. Tokenization is the process of replacing sensitive data with unique identification symbols that retain all the essential information about the data without compromising its security. Several stopwords like articles, conjunctions, prepositions, etc. need to be eliminated. After filtering the important features need to be analyzed further. 3. Classification: Sumeet Ghegade, Mandar Koujalgi, Garvit Raj Singhal 4

International Journal of Computer Engineering and Applications, Volume XI, Special Issue, May 17, www.ijcea.com ISSN 2321-3469 A dictionary of finance related words is maintained along with their associated class labels. In our implementation we have used only two class labels: positive and negative. These features are said to be trained set. Using this trained set the data gathered (test set) is analyzed. 4. Calculating Posterior Priority: Posterior probability is the probability of a feature belonging to certain class label. where, count (F,C) - Total no of features belonging to class label c / Count(c) -Total no of features in class c V - Vocabulary. The value calculated for each class label is compared. The highest value determines highest probability of feature belonging to class label. Based on posterior probabilities investor determines overall polarity of public opinion. Accordingly investor might invest or sell stocks effecting stock market price. [4] TECHNICAL ANALYSIS Technical analysis is a method of evaluating stocks by analyzing the statistics generated by market activity, such as past prices and volume. Technical analysts do not attempt to measure a stock s intrinsic value, but instead use charts and other tools to identify patterns that can suggest future activity.[2] We propose to use Time Series Analysis methods in order to predict the future stock prices. There are many approaches towards implementing time series analysis of which we are going to use the following: Linear Regression Artificial Neural Networks Sumeet Ghegade, Mandar Koujalgi, Garvit Raj Singhal 5

SURVEY OF MACHINE LEARNING TECHNIQUES FOR STOCK MARKET ANALYSIS For a short time span where the prices show either an uptrend or downtrend linear regression can be used. LINEAR REGRESSION: In statistics, linear regression is an approach for modeling the relationship between a scalar dependent variable Y and one or more explanatory variables (or independent variables) denoted X. In our implementation variable Y represents the closing prices while variable X represents count. Equation of regression line is given by: Y- intercept is given by: Slope is given by: Using this equation we can predict the future stock prices with acceptable accuracy unless the stock maintains its trends. But for longer time spans this model may fails. To overcome those problems Artificial Neural Networks can be used. ARTIFICIAL NEURAL NETWORKS: An artificial neuron network (ANN) is a computational model based on the structure and functions of biological neural networks. Information that flows through the network affects the structure of the ANN because a neural network changes or learns, in a sense-based on that input and output. ANNs are considered nonlinear statistical data modeling tools where the complex relationships between inputs and outputs are modeled or patterns are found. ANN is also known as a neural network. An ANN has several advantages but one of the most recognized of these is the fact that it can actually learn from observing data sets. In this way, ANN is used as a random function approximation tool. These types of tools help estimate the most costeffective and ideal methods for arriving at solutions while defining computing functions or distributions. ANN takes data samples rather than entire data sets to arrive at solutions, which saves Sumeet Ghegade, Mandar Koujalgi, Garvit Raj Singhal 6

International Journal of Computer Engineering and Applications, Volume XI, Special Issue, May 17, www.ijcea.com ISSN 2321-3469 both time and money. ANNs are considered fairly simple mathematical models to enhance existing data analysis technologies. For our implementation we propose to use 3 nodes in input layer, 16 in hidden and 1 in output layer. Prices of 3 consecutive days will be given as input to the neural network and 4 th days prices will be predicted. Transition function is set to sigmoid function an multiple perceptron implementation is used. Learning rate initially will be 0.2 but will change with more training. The following figure shows the structure of proposed neural network: Figure 2: ANN for stock prediction [5] CONCLUSION Even though stock market prices are highly volatile it is possible to predict them to some extent. There is no one such algorithm which can efficiently predict stock prices, but various algorithms and techniques can be combined to get successful results. Technical analysis can be used when the market is stable while fundamental analysis will help when market is volatile. Data analysis will help investor get an idea of the market conditions. It is not necessary to predict accurate stock prices but predicting the trends in prices is what is important. Overall we think that with proper implementation and successive trials the predictive model can get close to successfully predicting accurate future trends in stock prices. Sumeet Ghegade, Mandar Koujalgi, Garvit Raj Singhal 7

SURVEY OF MACHINE LEARNING TECHNIQUES FOR STOCK MARKET ANALYSIS REFERENCES [1] A. Abhyankar, L.S. Copeland and W. Wong, Uncovering nonlinear struc-ture in real-time stock market indexes: The S&P 500, the DAX, the Nikkei 225 and the FTSE-100, Journal of Business & Economic Statistics, No 15, pp 1-14, 1997. [2] M.T. Hagan, H.B. Demuth and., M. Beale, Neural network design. PWS Publishing Company, Boston, 1996. [3] M.R. Hassan and B. Nath,, Stock Market Forecasting using Hidden Mar-kov Model: A new approach, Proceedings of 5th International conference on Intelligent systems Design and Applications, 2005. Volume: 02, December 2013, Pages: 440-449 International Journal of Computing Algorithm Integrated Intel-ligent Research (IIR) 449 [4] Schoeneburg, E.(1990), Stock Price Prediction Using Neural Networks: A Project Report, Neurocomputing, vol. 2, pp. 17-27. [5] Poddig, T., & Rehkugler, H. (1996), A world of integrated financial markets using artificial neural networks, Neurocomputting, 10, pp. 251 273. [6] Wong, Bodnovich & Selvi.(1997), Neural Network application, Neural Network business, vol.19, pp. 301-320. [7] Anshul Mittal and Arpit Goel. Stock prediction using twitter sentiment analysis. 2012. [8] Alexander Pak and Patrick Paroubek. Twitter as a corpus for sentiment analysis and opinion mining. Proceedings of LREC, 2010. [9] B. Pang, L. Lee, and S. Vaithyanathan. Thumbs up? sentiment classi cation using machine learning techniques. pages 79{86, 2002. Sumeet Ghegade, Mandar Koujalgi, Garvit Raj Singhal 8