Abstract:
The stock market's dynamism and complexity make predicting accurate prices a daunting task for investors and analysts. Traditional statistical models struggle with this due to hidden non-linear relationships and time-dependent patterns in financial data. This sparks a rising interest in harnessing the power of machine learning, particularly neural networks, for improved stock price forecasting.This study uses four neural network models - CNN, LSTM, CNN-LSTM, and CNN-BILSTM to predict stock prices. Their performance is evaluated through four metrics: Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), R-squared (R²), and Mean Absolute Percentage Error (MAPE). The US stock price dataset from 1998-2021 was used, the dataset was obtained from Kaggle and was preprocessed by normalizing and scaling. Python was used to train the models, the study then compares the hybrid models (CNN-LSTM and CNN-BILSTM) to their standalone counterparts, aiming to reveal their potential superiority in terms of prediction accuracy and error minimization.Analysis revealed that the hybrid models, particularly CNN-LSTM with its attention mechanism, outperformed their standalone counterparts in predicting stock prices and minimizing errors. CNN-BiLSTM followed closely, demonstrating strong performance as well. While CNN exhibited the lowest RMSE and MAE, its high MAPE suggests limited predictive power. This may be due to CNN's focus on feature extraction rather than temporal dependencies, highlighting the effectiveness of hybrid models in capturing complex market dynamics.