# A Stock Prediction Method Based on Heterogeneous Bidirectional LSTM
## 1 Introduction  
The exploration of stock price prediction models has always been a significant topic. From traditional forecasting methods such as Autoregressive Integrated Moving Average (ARIMA), Generalized Autoregressive Conditional Heteroskedasticity (GARCH), and Vector Autoregressive Moving Average (VARMA) ([PERSON] and [PERSON] [1]) to Machine Learning (ML) and nowadays Artificial Neural Networks (ANNs) ([PERSON] et al. [2]), numerous scholars have continually attempted to improve models for predicting stock prices. In 2019, [PERSON] [3] constructed a model using Support Vector Regression (SVR) for short-term stock index prediction, a nonlinear time series forecasting method. In 2018, [PERSON] and [PERSON] [4] utilized Support Vector Machine (SVM) technology to establish a model to predict the movements of the CSI 300 Index, demonstrating the effectiveness of SVM in stock index prediction. Compared to traditional machine learning algorithms, neural network models can effectively address the non-stationary and nonlinear characteristics of stock price data ([PERSON] and [PERSON] [5]). [PERSON] et al. (2019) [6] used a BP neural network model to predict stock price fluctuations. [PERSON] et al. (2021) [7] employed a GRU neural network model to predict Amazon spot prices, verifying the applicability of neural network models in the financial domain [8]. Especially, LSTM networks are highly favored due to their ability to address the vanishing gradient problem common in RNNs. This is attributed to their internal hidden memory cells [9], which can store past information and use it along with the latest information to predict sequences, and automatically decide when to delete information from their memory ([PERSON], [PERSON], and [PERSON], 2003 [10]; [PERSON] and [PERSON], 1997 [11]), thus maintaining long-term dependencies. BiLSTM, an updated variant of LSTM, has been utilized in both classification and regression problems ([PERSON] et al., 2021 [12]). BiLSTM combines forward and backward LSTM, achieving additional training by traversing the input data from left to right and from right to left. Some studies ([PERSON], [PERSON], [PERSON], & [PERSON], 2019 [13]; [PERSON], [PERSON], & [PERSON], 2020 [14]) have demonstrated its effectiveness in handling long-term dependencies. It primarily achieves this through back-to-back encoding, allowing for the extraction of more hidden information from the data. However, due to certain issues with the gating mechanism of LSTM units in processing data information, some gating mechanisms are not designed to be sufficiently streamlined, which may limit the efficiency of BiLSTM in processing data. Experimental results indicate that the input gate and output gate mechanisms in LSTM are crucial, and coupling the forget gate and input gate can achieve performance comparable to LSTM. The coupled structure can enhance the data processing capability of LSTM units. The He-BiLSTM takes advantage of the BiLSTM architecture and a modified neural network unit, replacing the traditional LSTM units in the BiLSTM framework with the modified neural network units, thereby influencing the overall model through these modified units and subsequently optimizing it. Based on this situation, this paper optimizes the LSTM design and proposes a He-BiLSTM, aiming to improve the data processing efficiency of BiLSTM and enhance the overall model performance. Based on the aforementioned situation, the research findings of this paper are summarized as follows:  
1. To further enhance the robustness, accuracy, and generalization capability of the BiLSTM model, a novel LSTM unit structure is adopted to reconstruct the BiLSTM. Compared to the existing BiLSTM, this paper reconstructs a novel bidirectional neural network structure (He-BiLSTM) by replacing the traditional neural units in BiLSTM. This makes the data transmission efficiency of the He-BiLSTM higher, enabling the model to better handle the non-stationary and nonlinear characteristics of stock financial data.