Training LSTM on Historical Market Data for Predicting Stock Prices on Real-Time Basis
The traders and investors buy or sell stocks in stock markets each day and this decision is based on the price action, that is day high or low price, or previous day closing price of a stock that they want to trade or invest in. This study explores the application of a deep learning algorithm for predicting closing price of the stock. In this study, Long Short-Term Memory (LSTM) algorithm was trained on the Indian company stock (Reliance Industries Ltd.) that is a constituent of the Nifty 50. The training dataset for this model comprised of historic (10-year) prices of Reliance stock sourced from NSE. The LSTM algorithm trained on Reliance stock was executed using the real-time stock market prices of three stocks (Reliance, HDFC Bank, and Infosys) and predicted the closing price of the respective stocks. It was found that LSTM was trained on Reliance stock and thereafter, was used for predicting prices of other Nifty 50 stocks, that is, HDFC Bank and Infosys. The study establishes that the algorithm can predict results for one of the stocks that is different from the stock used to train the model. The traders and investors may take timely buy or sell decisions based on this study.
Authors
- Daljeet Singh Bawa
- Parul Chachra
Institutions
- Bharati Vidyapeeth (Deemed to be University) (IN)
Publication Details
- Published
- 2025-04-02
- DOI
- https://doi.org/10.23919/indiacom66777.2025.11115302
- Citations
- 2
- Primary Topic
- Stock Market Forecasting Methods
- Type
- article
- Field-Weighted Citation Impact
- 4.21