Bidirectional LSTM-GRU Hybrid Model for Stock Price Forecasting Across Varying Time Frames
摘要
The financial markets contain volatility and non-linear dynamics, and they present challenges in price prediction, an accurate estimation can lead to better decisions. This study introduces a hybrid Bidirectional Long Short-Term Memory (BiLSTM) and Gated Recurrent Unit (GRU) to enhance prediction accuracy of a stock on varying time datasets. This hybrid model integrates the strengths of two well-established architectures in price prediction, leveraging their complementary features to enhance forecasting accuracy and robustness. State Bank of India stock traded as SBIN on NSE is chosen for this research. Rigorous preprocessing and feature engineering are applied to the model to optimize performance, with features such as open-close and high-low differences. When evaluated across varying timeframes, the 10-year dataset yielded the best result, with the mean absolute error being the lowest at (0.97) and high explanatory power (R2:1.00), which doesn’t prove overfitting here. To understand the dynamics better, a detailed comparison of Pure LSTM, GRU and BiLSTM is also provided. This study determines the potential of hybrid architecture in financial markets and sets the foundation for adding sentiment analysis in the future.