Implementation of Machine Learning for Stock Price Prediction Using the LSTM Algorithm
DOI:
https://doi.org/10.62205/hfvfmj88Keywords:
Long Short-Term Memory, Stock Price Prediction , Bank Central Asia, Time Series Analysis, Machine LearningAbstract
This research focuses on predicting BCA stock prices using a Long Short-Term Memory (LSTM) model. Historical daily closing prices of BCA from February 2023 to October 2024 were sourced from Yahoo Finance and analyzed using Python. The data were preprocessed with MinMaxScaler and split into training (80%) and testing (20%) sets. Optimal model parameters were determined through Grid Search, resulting in an LSTM model with 150 units, 100 epochs, a batch size of 64, and a learning rate of 0.001. The model achieved an MSE of 23,365.97, an RMSE of 152.86, an MAE of 112.96, and an R² of 0.6170. Prediction visualizations revealed that the LSTM model successfully captured stock price trends. These results highlight the effectiveness of LSTM in analyzing complex time series patterns, offering reasonably accurate forecasts for supporting investment decisions.
Downloads
Published
Issue
Section
License
Copyright (c) 2024 Media Journal of Information System and Informatic
This work is licensed under a Creative Commons Attribution 4.0 International License.