Stock Market Prediction
Aaron Josey1, Amrutha N2
1Aaron Josey, Department of Computer Science, St. Albert’s College, Kochi (Kerala), India.
2Amrutha N, HOD, Department of Computer Science, St. Albert’s College, Kochi (Kerala), India.
Manuscript received on 26 April 2024 | Revised Manuscript received on 06 May 2024 | Manuscript Accepted on 15 May 2024 | Manuscript published on 30 May 2024 | PP: 34-37 | Volume-4 Issue-1 May 2024 | Retrieval Number: 100.1/ijdm.A164104010524 | DOI: 10.54105/ijdm.A1641.04010524
Open Access | Editorial and Publishing Policies | Cite | Zenodo | OJS | Indexing and Abstracting
© The Authors. Published by Lattice Science Publication (LSP). This is an open-access article under the CC-BY-NC-ND license (http://creativecommons.org/licenses/by-nc-nd/4.0/)
Abstract: The prediction of stock market trends is a challenging yet critical task in the financial sector, given its significant implications for investors, traders, and financial institutions. This research leverages the Long Short-Term Memory (LSTM) algorithm, a type of recurrent neural network (RNN), to develop a robust model for forecasting stock prices. The study utilizes historical stock market data sourced from Yahoo Finance, accessed via the yfinance package in Python. The primary objectives are to preprocess the data, implement the LSTM model, and evaluate its performance against traditional models such as Random Forest and Linear Regression. Data preprocessing involved handling missing values, normalizing the dataset, and transforming it into sequences suitable for LSTM training. The model’s architecture includes multiple LSTM layers designed to capture temporal dependencies in the data. The study evaluates the model’s performance using metrics such as Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and prediction accuracy. Comparative analysis shows that the LSTM model outperforms both Random Forest and Linear Regression models, with lower MSE and RMSE values and higher accuracy in predicting stock prices. This research discovered that LSTM’s ability to retain long-term dependencies makes it particularly effective for stock market prediction, where historical trends and patterns significantly influence future prices. The results indicate that the LSTM model provides more reliable and precise predictions, which can enhance decision-making in trading and investment. This research highlights the potential of advanced neural network architectures in financial forecasting, offering a valuable tool for investors aiming to optimize their strategies and mitigate risks. The significance of this study lies in its practical application in the financial industry, demonstrating that machine learning models, particularly LSTM, can substantially improve the accuracy of stock market predictions. Future research could explore the integration of additional features, such as macroeconomic indicators and sentiment analysis, to further enhance model performance. This study underscores the importance of continuous innovation and the adoption of sophisticated algorithms to navigate the complexities of financial markets.
Keywords: Stock Market Prediction, LSTM, Machine Learning, Financial Forecasting, Time Series Analysis, Data Preprocessing, Model Evaluation, Yahoo Finance.
Article of the Scope: Data Science