Predicting Stock Market Trends with Machine Learning: A Comprehensive Study
8 Pages Posted: 10 Nov 2023
Date Written: June 9, 2023
The use of Long Short-Term Memory (LSTM) neural networks in conjunction with linear regression for stock market prediction is examined in this research article. The main focus of the study is on the use of LSTM networks to capture the time-series character of stock market data and how integrating those with linear regression models might enhance prediction performance. The LSTM and linear regression models are trained using historical stock market data, and a variety of assessment measures are used to assess how well they performed. The findings show that the combined LSTM and linear regression model performs better in terms of precision and predictive ability than conventional linear regression models. The results of this study have significance for LSTM network applications in financial forecasting and provide light on the efficacy of integrating machine learning approaches for stock market predictions. To implement the model, the yfinance library is utilized to retrieve historical stock price data from reliable sources. The fetched data is preprocessed and transformed into suitable input sequences for the LSTM model. The model architecture comprises input layers, LSTM layers for capturing temporal dependencies, and a fully connected output layer for regression predictions. The proposed LSTM regression model, integrated with the yfinance library, offers potential applications in the field of finance and investment. It provides a reliable tool for investors, traders, and financial professionals to make data-driven decisions based on accurate predictions of stock price movements obtained from yfinance's comprehensive financial data repository.
Keywords: Stock Market Prediction, Machine Learning, Python, LSTM [long short-term memory], Linear Regression
JEL Classification: C0
Suggested Citation: Suggested Citation