International Research Journal of Engineering and Technology (IRJET)
e-ISSN: 2395-0056
Volume: 10 Issue: 07 | July 2023
p-ISSN: 2395-0072
www.irjet.net
STOCK PRICE PREDICTION USING MACHINE LEARNING [RANDOM FOREST REGRESSION MODEL] Ghanashyam Vagale1, Matur Rohith Kumar2, Bhanuprakash Darbha3, Durga Shankar Dalayi4 ---------------------------------------------------------------------***---------------------------------------------------------------------
Abstract - The process of stock price prediction has
prediction is used along with randomised grid search cross-validation. Following prediction, error analysis is essential for evaluating the model's effectiveness and the precision of the anticipated values.
gained significant attention in recent years due to the potential benefits it can offer to investors. This paper discusses the use of machine learning in stock price prediction by leveraging historical data to identify trends and make predictions. The application of machine learning can automate the trading process by providing insights and predictions based on statistical models. By collecting and analyzing large amounts of structured and unstructured data, suitable algorithms can be applied to identify patterns and make informed decisions. However, the volatile nature of the financial stock market poses a significant challenge in accurately predicting stock prices. Factors such as current trends, politics, and the economy can have a profound impact on stock prices, making it difficult to decide when to buy, sell, or hold. Despite these risks, machine learning can help reduce them by providing valuable insights to investors. Key Words: Stock, Price, Prediction, Learning, Random Forest, Regression, Intelligence, future, market.
Prediction is performed using the random forest regression model. This will forecast the low and high prices for the forthcoming trading days, along with the NSE nifty 50 index's predicted prices for the following month. Based on the expected values, decisions regarding the purchase, sale, or holding of a stock can be made. The gathering, processing, and creation of the trading algorithm for prediction are the main goals of this study.
2. FLOWCHART
Machine Artificial
1. INTRODUCTION The act of predicting stock prices based on past data is known as stock price prediction. To identify trends and comprehend the current market, we employed machine learning on previous data. Through the use of statistical models to generate predictions and draw inferences, machine learning automates the trading process. Both structured and unstructured data can be gathered and tested by machine learning. It can use the new data to apply appropriate algorithms, transform, look for trends, and make judgements. Because of the nature of the financial stock market, which involves current trends, politics, and the economy, it is difficult to predict the value of stocks with a high degree of accuracy. They have a significant impact on prices by making it difficult to decide whether to purchase, sell, or hold the stock. Risks must therefore be managed due to the fact that they cannot be eliminated.
Fig -1: Flowchart of the Algorithm
3. IMPLEMENTATION
This study demonstrates the numerous approaches used to incorporate machine learning into stock forecasting for the NSE nifty 50 index. It was built by us using Python and open-source libraries. We used pre-processing techniques to make the stock data relevant after obtaining it from Yahoo Finance. Additionally, a tuning procedure to validate the model for building, fitting, and training for
© 2023, IRJET
|
Impact Factor value: 8.226
3.1 Import libraries: The following libraries are used: Pandas — a Python module for data analysis that loads the data file as a pandas data frame.
|
ISO 9001:2008 Certified Journal
|
Page 785