Model Prediksi Harga Saham BJBR Menggunakan Long Short-Term Memory (LSTM) untuk Mendukung Keputusan Investasi
Abstract
Stocks are one of the most popular investment instruments among the public due to their potential for long-term returns through price appreciation and dividend distributions; however, stock price movements are heavily influenced by various factors such as macroeconomic conditions, market sentiment, and corporate actions, making accurate forecasting essential for investors to minimize risk and maximize profit. PT Bank BJB Tbk (ticker code: BJBR), a major bank in Indonesia that operates both conventional and Sharia-based services, has shown high volatility over the past few. Therefore, this research aims to develop a stock price prediction model for BJBR using the Long Short-Term Memory (LSTM) approach, a variant of Recurrent Neural Networks (RNN) well-suited for time series data. Historical closing price data from January 2020 to June 2025 were collected, preprocessed through normalization, dataset division, and transformation into supervised learning format, and then used to train an LSTM model with a two-layer architecture and dropout layers to prevent overfitting. The model was trained using the Adam optimizer and evaluated using metrics such as Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and R-squared (R²). Evaluation results showed that the model achieved a high level of accuracy, with an R² value of 0.9643 on the test data, while visualizations of predicted versus actual prices demonstrated a strong alignment, proving that the LSTM model is effective in capturing temporal patterns in financial time series data and can serve as a valuable tool for data-driven investment decision-making.
Downloads
References
[2] Zhang, G., Eddy Patuwo, B., & Y. Hu, M. (1998). Forecasting with artificial neural networks: The state of the art. International Journal of Forecasting, 14(1), 35–62. https://doi.org/10.1016/S0169-2070(97)00044-7
[3] Tsay, R. S. (2005). Analysis of Financial Time Series (2nd ed.). John Wiley & Sons.
[4] Hochreiter, S., & Schmidhuber, J. (1997). Long Short-Term Memory. Neural Computation, 9(8), 1735–1780. https://doi.org/10.1162/neco.1997.9.8.1735
[5] Kim, H., & Won, D. (2018). Application of LSTM networks for stock price prediction: A case of banking stocks. Journal of Financial Studies, 12(3), 45-67.
[6] Smyl, S. (2020). A hybrid method of exponential smoothing and recurrent neural networks for time series forecasting. International Journal of Forecasting, 36(1), 75–85. https://doi.org/https://doi.org/10.1016/j.ijforecast.2019.03.017
[7] Hundman, K., Constantinou, V., Laporte, C., Colwell, I., & Soderstrom, T. (2018). Detecting spacecraft anomalies using LSTMs and nonparametric dynamic thresholding. Proceedings of the ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 387–395. https://doi.org/10.1145/3219819.3219845
[8 ] Birgham, E. F., & Houston, J. F. (2021). Fundamentals of Financial Management (16th ed.). Cengage Learning.
[9] Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep Learning. The MIT Press.
[10] Patel, J., Shah, S., Thakkar, P., & Kotecha, K. (2014). Predicting stock market index using fusion of machine learning techniques. Expert Systems with Applications, 42. https://doi.org/10.1016/j.eswa.2014.10.031
[11] Zhang, X., & Pinsky, E. (2025). S&P-500 vs. Nasdaq-100 price movement prediction with LSTM for different daily periods. Machine Learning with Applications, 19, 100617.https://doi.org/https://doi.org/10.1016/j.mlwa.2024.100617
[12] Jing, N., Wu, Z., & Wang, H. (2021). A hybrid model integrating deep learning with investor sentiment analysis for stock price prediction. Expert Systems with Applications, 178, 115019. https://doi.org/https://doi.org/10.1016/j.eswa.2021.115019
[13] Ojo, S., Pius, O., Mphahlele, M., & Adisa, J. (2019). Stock Market Behaviour Prediction using Stacked LSTM Networks*. https://doi.org/10.1109/IMITEC45504.2019.9015840
[14] Dinata, I. G., Yudistira, N., & Muflikhah, L. (2023). Indonesian Stock Prices Prediction
[15] Abadi, M., Agarwal, A., Barham, P., Brevdo, E., Chen, Z., Citro, C., ... & Zheng, X. (2016). TensorFlow: Large-scale machine learning on heterogeneous systems. Retrieved from https://www.tensorflow.org/
[15] Kingma, D., & Ba, J. (2014). Adam: A Method for Stochastic Optimization. International Conference on Learning Representations.

This work is licensed under a Creative Commons Attribution 4.0 International License.