Ijraset Journal For Research in Applied Science and Engineering Technology
Authors: Mr. Ayush Jha, Mr. Pankaj Singh
DOI Link: https://doi.org/10.22214/ijraset.2026.84439
Certificate: View Certificate
The Indian stock market is characterized by high volatility, non-linear price behaviour, and sensitivity to macroeconomic, sectoral, and sentiment-driven factors, which limits the accuracy of traditional linear forecasting models such as ARIMA. Building on our earlier literature review and problem formulation, this paper presents the implementation and evaluation of an integrated deep learning framework for next-day closing price prediction of Indian equities. The framework combines a two-layer Long Short-Term Memory (LSTM) network with four complementary technical indicators — Moving Average Convergence Divergence (MACD), Relative Strength Index (RSI), the 10–20 day Exponential Moving Average (EMA) crossover, and the Stochastic Oscillator — as engineered input features, and a downstream XGBoost classifier that converts the LSTM\'s continuous price forecast, together with the current indicator states, into discrete BUY, HOLD, or SELL trading signals with associated confidence scores. The complete pipeline is implemented as a full-stack platform (Python, Flask, MongoDB, React) that retrieves real-time NSE/BSE data through the yfinance API. The proposed model is evaluated on RELIANCE.NS using Root Mean Squared Error (RMSE) and Mean Absolute Error (MAE), supported by a per-indicator ablation study and a comparison against an autoregressive (AR) linear baseline, a Support Vector Machine (SVM) regressor, and a single-indicator LSTM baseline.
This paper presents a deep learning-based stock prediction system for the Indian stock market that combines multiple technical indicators with a Long Short-Term Memory (LSTM) network and an XGBoost classifier to improve next-day stock price prediction and trading decisions. Traditional statistical models such as ARIMA and linear regression struggle with the non-linear, volatile nature of stock prices, while LSTM networks can better capture long-term temporal dependencies in financial time-series data.
The proposed system integrates four widely used technical indicators—MACD, RSI, 10–20 EMA crossover, and the Stochastic Oscillator—into a unified feature set. Rather than relying on individual indicators, which often generate delayed or false signals, the model combines them to produce more accurate price forecasts and BUY/HOLD/SELL trading recommendations with confidence scores.
The literature review shows that previous studies consistently found LSTM models outperform traditional machine learning and statistical methods for stock prediction. Research also demonstrates that combining multiple technical indicators improves forecasting accuracy. However, most earlier works focused on offline back-testing or rule-based decision systems and did not provide a complete forecasting-and-classification pipeline or evaluate the contribution of each individual indicator.
The paper identifies several shortcomings in existing approaches: linear models cannot capture complex market behaviour, lagging indicators respond slowly to trend changes, leading indicators produce false signals in sideways markets, independent indicators often conflict, standard RNNs suffer from vanishing gradients, and prior studies rarely analyze the importance of individual indicators. The proposed framework addresses these issues by using a two-layer LSTM with engineered technical features and a downstream XGBoost classifier.
The system architecture consists of five layers: data acquisition using the yfinance API, feature engineering for technical indicators, LSTM-based price prediction, XGBoost-based trading signal generation, and a Flask–MongoDB–React application for deployment. Eight input features—closing price, MACD, signal line, RSI, EMA10, EMA20, %K, and %D—are normalized using MinMax scaling and organized into a 60-day sliding window before training.
This paper presented the implementation and evaluation of an integrated approach to Indian stock price prediction that combines a two-layer LSTM deep learning model with a multi-indicator technical analysis feature set — MACD, RSI, the 10–20 day EMA crossover, and the Stochastic Oscillator — and a downstream XGBoost classifier that converts continuous price forecasts into discrete, confidence-scored BUY/HOLD/SELL trading signals. Building on our earlier problem analysis and preliminary rule-based back-testing study, this work replaced fixed, human-interpreted decision rules with a trained forecasting-plus-classification pipeline, evaluated on RELIANCE.NS using RMSE, MAE, a per-indicator ablation study, and comparison against AR(5), SVM, and single-indicator baselines. The proposed model achieved an RMSE of ?28.56 and MAE of ?23.48 (MAPE 1.71%) on RELIANCE.NS, achieving the lowest RMSE among all compared models while showing comparable MAE to the ARIMA and SVM baselines. The downstream XGBoost signal classifier achieved 91.7% accuracy on held-out BUY/HOLD/SELL labels — well above the random baseline for a three-class problem. The ablation study, run on a linear surrogate model, indicated that MACD and RSI are the clearest linear drivers of the accuracy gain, while EMA crossover and Stochastic Oscillator appear to act through non-linear interactions captured only by the full LSTM. The proposed system is implemented as a complete, deployed platform — built on Python, Flask, MongoDB, and React — rather than an offline experimental notebook alone, distinguishing it from much of the reviewed literature and from our own earlier rule-based study, both of which stopped at historical back-testing. Future work will extend the framework through: fitting normalization scalers on the training partition only; implementing a fully tuned ARIMA model and an indicator-aware SVM baseline; running the per-indicator ablation on the full LSTM architecture; sentiment-analysis integration; attention-based Transformer architectures; an expanded indicator set (e.g., Bollinger Bands, On-Balance Volume); broader equity coverage across mid- and small-cap stocks beyond the single-stock case study presented here; SHAP-based explainability for the XGBoost classifier; incorporation of transaction-cost-aware back-testing; and portfolio-level allocation and risk-management extensions.
[1] Agarwal, S., & Goel, U. (2020). News media sentiments and stock markets: The Indian perspective. In Proc. 2020 IEEE International Conference on Industrial Engineering and Engineering Management (IEEM), pp. 309–313. https://doi.org/10.1109/IEEM45057.2020.9309870 [2] Agrawal, M., Khan, A. U., & Shukla, P. K. (2019). Stock price prediction using technical indicators: a predictive model using optimal deep learning. Learning, 6(2), 7. [3] Agrawal, M., Shukla, P. K., Nair, R., Nayyar, A., & Masud, M. (2022). Stock prediction based on technical indicators using deep learning model. Computers, Materials & Continua, 70(1), 287–304. https://doi.org/10.32604/cmc.2022.014637 [4] Alsubaie, Y., El Hindi, K., & Alsalman, H. (2019). Cost-sensitive prediction of stock price direction: Selection of technical indicators. IEEE Access, 7, 146876–146892. https://doi.org/10.1109/ACCESS.2019.2945907 [5] Ashwini, J., & Dinesh, S. (2021). Stock Market Forecasting Using LSTM. [6] Bagde, A. M. (2023). Predicting stock market time-series data using CNN-LSTM neural network model. arXiv:2305.14378. [7] Bhandari, H. N., Rimal, B., Pokhrel, N. R., Rimal, R., Dahal, K. R., & Khatri, R. K. (2022). Predicting stock market index using LSTM. Machine Learning with Applications, 9, 100320. https://doi.org/10.1016/j.mlwa.2022.100320 [8] Bhardwaj, A., Narayan, Y., & Dutta, M. (2015). Sentiment analysis for Indian stock market prediction using Sensex and Nifty. Procedia Computer Science, 70, 85–91. https://doi.org/10.1016/j.procs.2015.10.043 [9] Bhatt, K. et al. (2024). Benchmarking CNN and LSTM networks for stock movement prediction. [10] Chan (Him), C. K., & Goh (Pang), G. C. (2023). Stock Trend Prediction Using LSTM with MA, EMA, MACD and RSI Indicators. INTI Journal, 2023. [11] Chawla, R., Gupta, D., & Jain, S. (2022). Enhancing deep learning models using RSI and EMA crossover strategies for financial market prediction. Applied Soft Computing, 122, 108848. [12] Cheng, L. C., Huang, Y. H., & Wu, M. E. (2018). Applied attention-based LSTM neural networks in stock prediction. In Proc. IEEE International Conference on Big Data (Big Data), pp. 4716–4718. https://doi.org/10.1109/BigData.2018.8622541 [13] Chio, P. T. (2022). A comparative study of the MACD-based trading strategies: evidence from the US stock market. arXiv:2206.12282. [14] Dash, R., Dash, P. K., & Bisoi, R. (2022). Stock market prediction using LSTM-based deep learning model with technical indicators. Expert Systems with Applications, 198, 116825. [15] Dhokane, R. M., & Agarwal, S. (2024a). LSTM Deep Learning Based Stock Price Prediction with Bollinger Band, RSI, MACD, and OHLC Features. International Journal of Intelligent Systems and Applications in Engineering, 12(3), 1169–1176. [16] Dhokane, R. M., & Agarwal, S. (2024b). A Predictive Model of the Stock Market Using the LSTM Algorithm with a Combination of Exponential Moving Average (EMA) and Relative Strength Index (RSI) Indicators. Journal of The Institution of Engineers (India): Series B, 105, 1145–1157. [17] Dhondiyal, A., Chauhan, D., & Munjal, G. (2025). NIFTY 50 Stock Price Prediction Using Machine Learning Techniques and Technical Indicators. In Adaptive Intelligence (InCITe 2024), Springer. [18] Fischer, T., & Krauss, C. (2018). Deep learning with long short-term memory networks for financial market predictions. European Journal of Operational Research, 270(2), 654–669. https://doi.org/10.1016/j.ejor.2017.11.054 [19] Inumula, K., Tadamarla, A., & Deeppa, K. (2019). Simulation of technical indicators for better profits in the Indian stock market. International Journal of Recent Technology and Engineering, 8(3), 1612–1619. [20] Jin, Z., Yang, Y., & Liu, Y. (2020). Stock closing price prediction based on sentiment analysis and LSTM. Neural Computing and Applications, 32, 9713–9729. [21] Kuber, V., Yadav, D., & Yadav, A. K. (2022). Univariate and multivariate LSTM model for short-term stock market prediction. arXiv:2205.06673. [22] Kumar, A., Tripathi, R. K., & Agarwal, S. C. (2023). Stock market forecasting using ANN. In 2023 6th International Conference on Information Systems and Computer Networks (ISCON), pp. 1–5. https://doi.org/10.1109/ISCON57294.2023.10111976 [23] Kumar, B., Sharma, A., & Verma, R. (2023). Comparative analysis of technical indicators for stock market prediction using machine learning and deep learning models. International Journal of Information Management Data Insights, 3(1), 100146. [24] Li, W., & Bastos, G. S. (2020). Stock market forecasting using deep learning and technical analysis: A systematic review. IEEE Access, 8, 185232–185242. https://doi.org/10.1109/ACCESS.2020.3030226 [25] Lu, W., Li, J., Li, Y., Sun, A., & Wang, J. (2020). A CNN-LSTM-based model to forecast stock prices. Complexity, 2020, Art. no. 6622927. https://doi.org/10.1155/2020/6622927 [26] Mehtab, S., Sen, J., & Dasgupta, S. (2020). Robust Analysis of Stock Price Time Series Using CNN and LSTM-Based Deep Learning Models. 2020 4th International Conference on Electronics, Communication and Aerospace Technology (ICECA). [27] Meng, F. et al. (2020). Predicting stock price co-movements using technical indicators and XGBoost. [28] Moodi, F., & Rafsanjani, A. J. (2023). Feature selection and regression methods for stock price prediction using technical indicators. arXiv:2310.09903. [29] Nabipour, M., Nayyeri, P., Jabani, H., & Mosavi, A. (2020). Predicting stock market trends using machine learning and deep learning algorithms via continuous and binary data: a comparative analysis. IEEE Access, 8, 150199–150212. https://doi.org/10.1109/ACCESS.2020.3015966 [30] Pardeshi, Y. K., & Kale, P. (2021). Technical analysis indicators in the stock market using machine learning: A comparative analysis. In 2021 12th International Conference on Computing Communication and Networking Technologies (ICCCNT), pp. 1–6. https://doi.org/10.1109/ICCCNT51525.2021.9580172 [31] Piravechsakul, P., Kasetkasem, T., Marukatat, S., & Kumazawa, I. (2021). Combining technical indicators and deep learning by using LSTM stock price predictor. In 2021 18th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON), pp. 1155–1158. https://doi.org/10.1109/ECTI-CON51831.2021.9454877 [32] Roy, S., & Sen, A. (2022). Empirical study on composite technical indicators in financial forecasting models. [33] Shen, J., & Shafiq, M. O. (2020). Short-term stock market price trend prediction using a comprehensive deep learning system. Journal of Big Data, 7, 1–33. https://doi.org/10.1186/s40537-020-00333-6 [34] Shi, Z., Hu, Y., Mo, G., & Wu, J. (2022). Attention-based CNN-LSTM and XGBoost hybrid model for stock prediction. arXiv:2204.02623. [35] Singh, M., & Kaur, P. (2023). MACD and RSI-based feature engineering for stock trend prediction. ACM Transactions on Intelligent Systems and Technology, 14(2), 1–18. [36] Tadas, H., Nagarkar, J., Malik, S., Mishra, D. K., & Dipen, P. (2023). The effectiveness of technical trading strategies: Evidence from Indian equity markets. Investment Management & Financial Innovations, 20(2), 26. http://dx.doi.org/10.21511/imfi.20(2).2023.03 [37] Vadlamudi, S. (2017). Stock market prediction using machine learning: a systematic literature review. American Journal of Trade and Policy, 4(3), 123–128. [38] Waghela, H., Sen, J., & Rakshit, S. (2024). A Performance Analysis of Technical Indicators on the Indian Stock Market. In Artificial Intelligence in Prescriptive Analytics, vol. 260, Springer Nature. [39] Wijaya, A. Y., Fatichah, C., & Saikhu, A. (2022). Stock price prediction with a golden cross and death cross on technical analysis indicators using long short term memory. In 2022 5th International Conference on Information and Communications Technology (ICOIACT), pp. 278–283. https://doi.org/10.1109/ICOIACT55506.2022.9971844 [40] Yadav, A., Jha, C. K., & Sharan, A. (2020). Optimizing LSTM for time series prediction in Indian stock market. Procedia Computer Science, 167, 2091–2100.
Copyright © 2026 Mr. Ayush Jha, Mr. Pankaj Singh. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
Paper Id : IJRASET84439
Publish Date : 2026-07-26
ISSN : 2321-9653
Publisher Name : IJRASET
DOI Link : Click Here
Submit Paper Online
