In modern financial market, the most crucial problem is to find essential approach to outline and visualizing the predictions in stock-markets to be made by individuals in order to attain maximum profit by investments. The stock market is a transformative, onstraight dynamical and complex system. Long term investment is one of the major investment decisions. Developing this simple project idea using dash library (of python), we can make dynamic plots of financial data of a specific company using tabular data provided by finance python library. On top of it, we can use machine learning algorithm to predict the upcoming stock prices. The project is a good start for beginners in python/data science and a good refresher for professionals who have dabbled in Python/ML before.
Introduction
I. INTRODUCTION
Exchanging the stocks on money markets is one of the significant speculation exercises. Already, scientists developed different stock examination system that could empower them to envision the bearings of stock esteem development. Predicting and foreseeing of significant worth future cost, in perspective of the present cash related information and news, is of colossal use to the financial pros. Financial masters need to know whether some stock will get higher or lower over particular timeperiod. To obtain the accurate output, the approach used is to implemented is machine learning along with supervised learning algorithms. Results are tested using different types of supervised learning algorithms with a different set of a features. Investment companies and individual investors have been utilizing money models to possess a higher understanding of the market and build a profitable investment. Plenty of data regarding stock data fluctuations is at hand for analysis and processing. Investors take calculated guesses by analyzing data. They browse the news, study the corporate history, trade trends and numerous variables that go into creating a prediction.
This project is about stock market prices using the SVM model and uses a dash to visualize stock market analysis including real value and predicted value as a web application.
Dash is a great library framework that allows python to create interactive web dashboards. Dash layout contains all HTML content. In order to use the dashboard, we need to install the dash components.
II. MOTIVATION
Predicting this stock value offers enormous profit opportunities which are a huge motivation for research in this area. Even a fraction of a second's knowledge of a stock's worth can result in large earnings. Similarly, in the repeated context, a probabilistically correct prediction might be highly profitable.
This attractiveness of finding a solution has prompted researchers, in both industry and academics to find a way past the problems like volatility, seasonality and dependence on time, economics and rest of the market. However, the platform's prices and liquidity are highly unpredictable, which is where technology
comes in to aid
III. PROBLEM STATEMENT
The accuracy of the existing stock market prediction models is relatively low because only a small dataset is used for training, the results will be less accurate. There is still a need to continually explore more new features that are more predictable.
Even though multiple algorithms exist, there is no real-life implementation of these ideas for the beneficial of people. Efficient algorithms should be made available with easy accessibility and interface. Developing an interface between human and the system using the machine learning algorithms and python language to predict the prices of the stock using Long Short-Term Memory (LSTM) networks. This is totally based on Machine Learning Algorithm to proceed and provide an effective result. Getting the data and processing it and generating a forecast is the problem statement that we worked on.
IV. LITERATURE SURVEY
This paper is a survey on the application of neural networks in forecasting stock market prices. With their ability to discover patterns in nonlinear and chaotic systems, neural networks offer the ability to predict market directions more accurately than current techniques. Common market analysis techniques such as technical analysis, fundamental analysis, and regression are discussed and compared with neural network performance.
Also, the Efficient Market Hypothesis (EMH) is presented and contrasted with chaos theory and neural networks. Finally, future directions for applying neural networks to the financial markets are discussed.
V. PROPOSED SYSTEM
We have created a single page web application using dash and machine learning models. The main goal of this project is to precisely predict the future closing price of stock over a period of time in future. In this project we have used dash html components and dash core components to create website’s structure and for enhancing the site’s UI we have used CSS for styling. Plots of data are generated by using the plotly library of python and the data is fetched using yfinance. Machine learning models are implemented for predicting the stock price for the dates requested by the user. The project is deployed on Heroku to host it live.
As per prediction system, developed in the stock price prediction to help investors in making financial decisions. In most researches it focuses on "lowest price buy", "highest selling price". On the "lowest buy" and "highest selling" strategy of stocks occurs when stocks are at the lowest price and sell shares when prices are highest.
For stock price predictions ANN technique is used with back propagation the dataset was preprocessed and tuned up for real analysis. Hence, our admin can upload stock price history i.e. open price, highest price, lowest price and close price of the day. Paper will also focus on data preprocessing. Secondly, after preprocessing the data, System reads stock price history and gives input to the Back propagation algorithm. In addition, the proposed paper examines the use of the prediction system in real-world settings and issues associated with the accuracy of the overall values given.
VI. METHODOLOGY
We saw that the new user was afraid to invest in the share market because he did not have the knowledge and did not have any tool with the help of which he could do this work. So then we created a tool with the help of machine learning and deep learning, which can tell in a very precise way where the market will move by analyzing things. We did this work by taking data from yfinance. We imported this data through library and analyzed with the help of machine learning model and we did it with a machine learning model because it does this thing very precisely.
In this we have used the model of Deep Learning LSTM, we have trained the data in its own way, we have learned to use it because it is very advanced and performs this task very accurately and the result is more accurate. We used this method because in this we can train the data, due to which it can do its work very accurately and get close to the real result with great accuracy.
There is a drawback in this that it will work the way we trained it. We have to face a lot of difficulty in trained the data because the model cannot make any changes in itself like the data is transcribed, it works the same way. While working on the use the machine learning in the prediction of stock market the different types of the neural network can be proposed for prediction. Here we are using Long short -term memory (LSTM) which is an artificial recurrent neural network (RNN).
A. Recurrent Neural Network
A recurrent neural network (RNN) is a part of artificial neural network. RNN uses the sequential data or time series data. RNN works on principle of saving the output of the specific layer and feeding this back to the input in order to forecast the output of the layer. The most important characteristic of the Recurrent neural network is hidden state, which consider data about sequence.
B. Long Short-Term Memory (LSTM)
The Long Short-Term Memory is a special type of RNN, it is efficient of catching the data from previous Stages and use it for upcoming future predication. LSTMs are widely used for sequence prediction problems and have proven to be extremely successful. The reason behind is they work so well is because LSTM is able to store historic information that is important and forget the information that is not. LSTM has three gates:
The input gate: The input gate adds details to the cell state.
The forget gate: It removes the details that is no longer required by the model.
The output gate: Output Gate at LSTM selects the details to be shown as output
C. Support Vector Regression (SVR)
Support Vector Regression is a supervised learning algorithm that is used to predict discrete values. Support Vector Regression uses the same principle as the SVMs. The basic idea behind SVR is to find the best fit line. In SVR, the best fit line is the hyperplane that has the maximum number of points. Support Vector Machines (SVMs) are well known in classification problems. The use of SVMs in regression is not as well documented, however. These types of models are known as Support Vector Regression (SVR).
Conclusion
Predicting the stock market is a timeconsuming and arduous procedure. However, with the introduction to Machine Learning and its various algorithms, the Stock Market Prediction advancements have begun to consist such approaches in considering stock market data. By calculating the accuracy of the different type of algorithms, we found that the most appropriate algorithm for predicting the market price of a stock based on various data points from the previous past data is the Support Vector Regression (SVR) algorithm.
The algorithm will be a great asset for brokers and investors for investing money in the stock market since it is trained on a vast collection of historical data and has been chosen after being tested on a trial data. The project demonstrates the machine learning model to predict the stock price with more accuracy as compared to other machine learning models. The sentiment analysis of social media can be used with the SVR to better train weights and further improve machine learning model. It has led to the conclusion that it is possible to predict the stock market with more accuracy and efficiency using machine learning techniques. The scope of visualizing and forecasting stock has a very huge in the field of stock market. According to recent report the number of investors investing in stock market is increasing every year, therefore a system of visualizing and forecasting stocks is required to guide the investors to invest carefully in the stocks. Visualizing stocks is a risky trend and can often lead to inaccurate value predictions mainly because of how many factors it depends upon. This project can be extended and modified in future by training the model on more features and including some important nonnumerical features as well with the help of a subject matter expert.
References
[1] N. Babu and B. E. Reddy, “Selected Indian stock predictions using a hybrid ARIMA-GARCH model,” 2014 Int. Conf. Adv. Electron. Comput. Commun. ICAECC 2014, 2015.
[2] M. D. Shubhrata, D. Kaveri, T. Pranit, and S. Bhavana, “Stock Market Prediction and Analysis Using Naïve Bayes,” Int. J. Recent Innov. Trends Comput. Commun., vol. 4, no.11, pp. 121–124, 2016.
[3] X. Ding, Y. Zhang, T. Liu, and J. Duan, “Deep Learning for Event-Driven Stock Prediction,” no. Ijcai, pp. 2327–2333, 2015.
[4] K. A. Smith and J. N. D. Gupta, “Neural networks in business: Techniques and applications for the operations researcher,” Comput. Oper. Res., vol. 27, no. 11–12, pp.1023–1044, 2000.
[5] Pritam Ahire, Hanikumar Lad, Smit Parekh, Saurabh Kabrawala, “LSTM Based Stock Prediction,” International Journal of Creative Research Thoughts(IJCRT), vol. 9, pp. 51185122, Feb. 2021.
[6] Ya Gao, Rong Wang, and Enmin Zou, “Stock Prediction Based on Optimized LSTM and GRU Models,” Hindawi, vol. 2021, pp. 18, Sept. 2021.
[7] Adil Moghar and Mhamed Hamiche, “Stock Market Prediction Using LSTM Recurrent Neural Network,” Sciencedirect, vol. 170, pp.1168-1173, Apr. 2020.
[8] Data Visualization and Stock Market and Prediction, Ashutosh Sharma, Sanket Modak, Eashwaran Sridhar, International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056, Volume: 06 Issue: 09| Sep 2019
[9] Ran Aroussi yfinance is distributed under the Apache Software License.
[10] https://pypi.org/project/yfinance/
[11] https://plotly.com/python/graph-objects/