In the finance world stock trading is one of the most important activities. Stock market prediction is an act of trying to determine the future value of a stock other financial instrument traded on a financial exchange. This paper explains the prediction of a stock using Machine Learning. The technical and fundamental or the time series analysis is used by the most of the stockbrokers while making the stock predictions. The programming language is used to predict the stock market using machine learning is Python. In this paper we propose a Machine Learning (ML) approach that will be trained from the available stocks data and gain intelligence and then uses the acquired knowledge for an accurate prediction. In this context this study uses a machine learning technique called Support Vector Machine (SVM) to predict stock prices for the large and small capitalizations and in the three different markets, employing prices with both daily and up-to-the-minute frequencies.
Basically, quantitative traders with a lot of money from stock markets buy stocks derivatives and equities at a cheap price and later on selling them at high price. The trend in a stock market prediction is not a new thing and yet this issue is kept being discussed by various organizations. There are two types to analyse stocks which investors perform before investing in a stock, first is the fundamental analysis, in this analysis investors look at the intrinsic value of stocks, and performance of the industry, economy, political climate etc. to decide that whether to invest or not. On the other hand, the technical analysis it is an evolution of stocks by the means of studying the statistics generated by market activity, such as past prices and volumes. In the recent years, increasing prominence of machine learning in various industries has enlightened many traders to apply machine learning techniques to the field, and some of them have produced quite promising results. This paper will develop a financial data predictor program in which there will be a dataset storing all historical stock prices and data will be treated as training sets for the program. The main purpose of the prediction is to reduce uncertainty associated to investment decision making. Stock Market follows the random walk, which implies that the best prediction you can have about tomorrow’s value is today’s value. Indisputably, the forecasting stock indices are very difficult because of the market volatility that needs accurate forecast model. The stock market indices are highly fluctuating and it effects the investor’s belief. Stock prices are considered to be a very dynamic and susceptible to quick changes because of underlying nature of the financial domain and in part because of the mix of a known parameters (Previous day’s closing price, P/E ratio etc.) and the unknown factors (like Election Results, Rumors etc.). There have been numerous attempts to predict stock price with Machine Learning. The focus of each research projects varies a lot in three ways.
- The targeting price change can be near-term (less than a minute), short-term (tomorrow to a few days later), and a long-term (months later).
- The set of stocks can be in limited to less than 10 particular stock, to stocks in particular industry, to generally all stocks.
- The predictors used can range from a global news and economy trend, to particular characteristics of the company, to purely time series data of the stock price
In existing system, we tend to propose that a company’s performance, in terms of its stock worth movement, is foreseen by internal communication patterns. to get early warning signals, we tend to believe that it's vital for patterns in company communication networks to be detected earlier for the pre- diction of serious stock worth movement to avoid attainable adversities that an organization could face within the securities market in order that stakeholders’ interests is protected the maximum amount as attainable. Despite the potential importance of such data regarding corporate communication, very little work has been tired this vital direction. We attempt to bridge these research gaps by employing a data-mining method to examine the linkage between a firm’s communication data and its share price. As Enron Corporation’s e-mail messages constitute the only corpus available to the public, we make use of Enron’s e-mail corpus as the training and testing data for our proposed algorithm.
- However accuracy would decrease when setting more levels of stock market movement.
- The average of prediction accuracies using Decision Tree as the classifier are 43.44%, 31.92%, and 12.06% for “two levels,” “three levels,” and “five levels,” respectively.
- These results indicate that the stock price is unpredictable when traditional classifier is used.
Accuracy plays an important role in stock market prediction. Although many algorithms are available for this purpose, selecting the most accurate one continues to be the fundamental task in getting the best results. In order to achieve this, in this paper we have compared and analysed the performance of various available algorithms such as Logistic regression, SVM, Random Forest, etc. This involves training the algorithms, executing them, getting the results, comparing various performance parameters of these algorithms and finally obtaining the most accurate one.
- The successful prediction will maximize the benefit of the customer.
- In this paper we have discussed various algorithms to predict the same.
- In this paper we used stock data of five companies from the Huge Stock market dataset consisting of data ranging from 2011 to 2017 to train different machine learning algorithms.
- Hence we compared the accuracy of different machine learning algorithms
PERFORMANCE ANALYSIS OF ALGORITHMS
In this research paper we compared machine learning algorithms using stock market dataset. We performed experiments with various algorithms on stock market dataset and observed the mean square error to predict accuracy using four algorithms namely Logistic regression, SVM and Random Forest. We used Python libraries such as pandas, numpy to load the dataset and to perform mathematical calculations respectively and we used sklearn to model different machine learning algorithms. We used 0.20 of our whole dataset to test our model. We can conclude that SVM, Random Forest and Logistic Regression have better accuracies. We have plotted three of five best performing algorithms’ mean square error for each company to compare performance of each algorithm. SVM, Random Forest and Logistic Regression yielded best result. The result can further be enhanced by processing data properly as there are large fluctuations in stock market.
- Python IDLE