Predicting Stock Market using CNN and BiLSTM Model
This study explores the efficacy of two deep learning models, Convolutional Neural Network (CNN) is a deep learning model primarily designed for recognizing patterns in data through convolutional layers. and Bidirectional Long Short-Term Memory (BiLSTM) is an advanced variant of the Long Short-Term Memory (LSTM) network, designed to handle sequential data in predicting stock prices. Utilizing historical stock price data from NVIDIA spanning January 1, 2013, to December 31, 2023, the dataset was normalized and structured into sequences with a time step of 10 days. After that, the data was divided using an 80/20 split between the training set and the testing set. The CNN model architecture included multiple convolutional layers with batch normalization and dropout to prevent overfitting, followed by dense layers. Conversely, the BiLSTM model comprised a bidirectional LSTM layer with dense layers for output. Both models were use Mean Squared Error (MSE) as the loss function and trained using the Adam optimizer 0.001 learning rate. Model performance was evaluated using evaluation metrics including Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), Mean Squared Error (MSE), and R-squared (R<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup>). The BiLSTM model significantly outperformed the CNN model, achieving lower MAE (1.675), RMSE (2.237), and MSE (5.008) values, and a higher R<sup xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">2</sup> value (0.963), indicating superior predictive accuracy. These findings underscore the BiLSTM model's enhanced capability in capturing temporal dependencies and intricate patterns within stock price data, suggesting its greater effectiveness for time series forecasting tasks. For the purpose of improving the result of stock price predictions, studies in the future should take into consideration hybrid models that combine the advantages of CNN and BiLSTM.
Authors
- Hanif Fakhrurroja (ORCID: https://orcid.org/0000-0002-2483-251X)
- Lukman Abdurrahman (ORCID: https://orcid.org/0000-0001-7288-0455)
- Mohammad Tyas Pawitra
Institutions
- National Research and Innovation Agency (ID)
- Telkom University (ID)
Publication Details
- Published
- 2024-10-09
- DOI
- https://doi.org/10.1109/ic3ina64086.2024.10732245
- Citations
- 5
- Primary Topic
- Stock Market Forecasting Methods
- Type
- article
- Field-Weighted Citation Impact
- 2.45