2.5 A Hybrid Model
The BiCuDNNLSTM-1dCNN model, presented by
(Kanwal, Lau, Ng, Sim, & Chandrasekaran, 2022)
commences with a crucial data preparation phase.
Given the inconsistent nature of financial datasets,
particular attention is given to handling missing
values (NaNs). To maintain the integrity and
continuity of the data stream, NaN values are replaced
with the average of adjacent values (Kanwal et al.,
2022). Furthermore, normalization is executed via the
Min-Max scaler, which adjusts the feature values to a
range of 0 to 1, thus enhancing the model's
performance and computational efficiency. Once
preprocessing is complete, the data is divided into
90% for model training and 10% for testing the
predicted accuracy.
The configuration of hyperparameters is the
initial phase in the complex training process of
BiCuDNNLSTM-1dCNN. A Dropout layer is
utilized to eliminate nodes at a rate of 20% during
training to mitigate overfitting, alongside a
bidirectional CuDNNLSTM layer that proficiently
collects features from sequential input, followed by a
one-dimensional CNN layer that identifies sudden
market swings, crucial for capturing quick changes in
the stock market. (Kanwal et al., 2022).
Hyperparameter tuning is performed with a random
search strategy, which navigates the parameter space
more effectively than conventional grid search
methods, resulting in decreased computational time
and enhanced model performance (Bergstra &
Bengio, 2012).
The practical execution of the model
commences with the preparation of stock market data,
encompassing open, maximum, minimum, and
closing prices, along with trading volume, to ensure
uniform inputs for training. The model uses a
lookback window of 50-time steps to examine
historical patterns, enabling the BiCuDNNLSTM
component to leverage its bidirectional functionality
effectively.
The BiCuDNNLSTM-1dCNN model has
consistently demonstrated superior performance
across various datasets, including individual stocks
like Crude Oil and DAX ETF, as well as major
indices such as GDAXI and HSI. It outperforms other
models, including CNN, RNN, and standard LSTM,
with lower RMSE and MAE values, indicating
enhanced accuracy (Kanwal et al., 2022). This model
functions as a dependable instrument for financial
analysts and traders, demonstrating the efficacy of
sophisticated machine-learning methodologies in
intricate financial forecasting endeavors. By
integrating LSTM and CNN architectures, the model
effectively combines temporal sequence analysis
with pattern recognition, establishing
BiCuDNNLSTM-1dCNN as a robust solution for
stock market prediction in volatile environments.
3 CONCLUSIONS
Forecasting stock prices has always presented a
difficulty due to the inherent complexity and
volatility of trade markets. Although conventional
methods such as ARIMA are proficient for short-term
forecasts, they frequently fail to account for the
nonlinear dynamics inherent in stock data.
Conversely, neural networks—such as CNNs, RNNs,
LSTMs, and GRUs—have arisen as formidable
instruments for stock price prediction, delivering
superior performance through modeling intricate
temporal dependencies and nonlinearities. The
creation of hybrid architectures, shown by the
BiLSTM-CNN model, enhances prediction accuracy
and stability by integrating the advantages of various
neural network models.
CNNs excel at recognizing limited, transient
patterns in time series data, rendering them effective
for forecasting rapid market fluctuations.
Nonetheless, CNNs independently may encounter
difficulties in capturing long-range relationships,
hence constraining their utility in contexts
necessitating extensive trend analysis. RNNs,
especially LSTMs, and BiLSTMs, excel in handling
sequential dependencies by retaining crucial
information over extended periods, making them
popular choices for financial forecasting. GRUs
provide a more efficient solution by streamlining the
architecture, diminishing computing complexity, and
accelerating training without compromising
accuracy, rendering them suitable for situations
necessitating rapid, dependable predictions.
In conclusion, neural network models,
particularly hybrid systems that amalgamate various
designs, have continuously surpassed traditional
forecasting methods. Their capacity to comprehend
intricate patterns, retain vital information over time,
and adeptly handle sequential dependencies enables
them to deliver enhanced accuracy and reliability,
which is crucial for investors making data-driven
judgments in the dynamic and unpredictable realm of
finance. As financial markets progress, the demand
for advanced forecasting techniques will increase.
Consequently, continuous research and development
in machine learning, especially in the creation and
enhancement of hybrid neural network models, will