Prediksi Harga Penutupan IHSG Menggunakan LSTM dengan Optimizer Adam dan Grid Search Hyperparameter

Authors

  • Nafa Nurhanifah Prodi Statistika, Fakultas Farmasi dan Sains, Universitas Islam Bandung, Indonesia
  • Sutawanir Darwis Prodi Statistika, Fakultas Farmasi dan Sains, Universitas Islam Bandung, Indonesia

DOI:

https://doi.org/10.29313/bcss.v6i2.24596

Keywords:

Long Short-Term Memory (LSTM), Adam, IHSG

Abstract

Abstract. The Indonesia Composite Index (ICI) is the primary indicator of the Indonesian capital market and exhibits highly fluctuating movements, making an accurate forecasting method essential. This study aims to develop a forecasting model for the ICI closing price using the Long Short-Term Memory (LSTM) network with the Adam optimizer and to determine the optimal hyperparameter combination using Grid Search. The data consisted of daily ICI closing prices from January 2020 to June 2026 obtained from Yahoo Finance. The dataset was divided into training (80%) and testing (20%) sets and subsequently normalized using Min-Max Normalization. Hyperparameter optimization was performed by evaluating 81 combinations of sequence length, hidden units, mini-batch size, and epochs. Model performance was evaluated using the Mean Absolute Percentage Error (MAPE) and the coefficient of determination (R²). The results indicate that the best model was achieved with a sequence length of 60, 128 hidden units, a mini-batch size of 16, 100 epochs, and a learning rate of 0.001, resulting in a testing MAPE of 1.0429% and an R² of 0.9839. The model successfully captured the historical patterns of the ICI and generated a 30-trading-day forecast that indicated a gradual upward trend in the closing price. These findings demonstrate that the LSTM model with the Adam optimizer and Grid Search-based hyperparameter optimization provides strong predictive performance for forecasting the ICI closing price.

Keywords: Long Short-Term Memory (LSTM), Adam, ICI.

Abstrak. Indeks Harga Saham Gabungan (IHSG) merupakan indikator utama kondisi pasar modal Indonesia yang memiliki pergerakan fluktuatif sehingga diperlukan metode peramalan yang mampu menghasilkan prediksi secara akurat. Penelitian ini bertujuan mengembangkan model peramalan harga penutupan IHSG menggunakan Long Short-Term Memory (LSTM) dengan optimizer Adam serta menentukan kombinasi hyperparameter terbaik menggunakan Grid Search. Data yang digunakan berupa harga penutupan harian IHSG periode Januari 2020–Juni 2026 yang diperoleh dari Yahoo Finance. Data dibagi menjadi data training (80%) dan testing (20%), kemudian dinormalisasi menggunakan Min-Max Normalization. Optimasi dilakukan terhadap 81 kombinasi hyperparameter yang terdiri atas sequence length, jumlah hidden units, mini batch size, dan epoch. Kinerja model dievaluasi menggunakan Mean Absolute Percentage Error (MAPE) dan koefisien determinasi (R²). Hasil penelitian menunjukkan bahwa kombinasi terbaik diperoleh pada sequence length 60, hidden units 128, mini batch size 16, epoch 100, dan learning rate 0,001 dengan nilai MAPE sebesar 1,0429% dan R² sebesar 0,9839 pada data testing. Model juga mampu mengikuti pola historis IHSG dengan baik dan menghasilkan prediksi 30 hari perdagangan berikutnya yang menunjukkan kecenderungan peningkatan harga penutupan IHSG secara bertahap. Hasil tersebut menunjukkan bahwa model LSTM dengan optimizer Adam dan optimasi Grid Search mampu memberikan performa prediksi yang baik pada data IHSG.

Kata Kunci: Long Short-Term Memory (LSTM), Adam, IHSG.

References

Athanabil, M., Fawazdhia, A., & Rafsanjani, Z. A. (2023). Long Short Term Memory Using Stochastic Gradient Descent and Adam for Stock Prediction. Jurnal Matematika Murni Dan Aplikasi, 8(2), 16–29.
Bergstra, J., & Bengio, Y. (2012). Random Search for Hyper-Parameter Optimization. Journal of Machine Learning Research, 13, 281–305.
Budiarso, Z., Listiyono, H., & Karim, A. (2024). Optimizing LSTM with Grid Search and Regularization Techniques to Enhance Accuracy in Human Activity Recognition. Journal of Applied Data Sciences, 5(4), 2002–2014.
Bursa Efek Indonesia. (2024). Rekor IHSG dan Kapitalisasi Pasar Tertinggi Sepanjang Sejarah di Awal Tahun 2024. https://www.idx.co.id/id/berita/berita/cec4d153-65a9-ee11-b808-005056aec3a4
Clifford, H., Salmon, J., Law, F., & Pattimura, U. (2025). Juridical Analysis of Stock Market Response to Government Economic Policy : The Case of Declining IHSG in Indonesia. TATOHI: Jurnal Ilmu Hukum, 5(3), 138–144.
Darwati, E. (2026). Prediksi IHSG dan Rekomendasi Saham Jumat, 29 Mei 2026. Investor.Id. https://investor.id/market/440569w/prediksi-ihsg-dan-rekomendasi-saham-jumat-29-mei-2026#goog_rewarded
Goodfellow, I., Bengio, Y., & Courville, A. (2016). Deep Learning. MIT Press.
Guido, A. C. M. & S. (2017). Introduction to Machine Learning with Python.
Hochreiter, S., & Schmidhuber, J. (1997). Long short-term memory. Neural Computation, 9(8), 1735–1780. https://doi.org/https://doi.org/10.1162/neco.1997.9.8.1735
Hou, L., Zhu, J., Kwok, J. T., Gao, F., Qin, T., & Liu, T. (2019). Normalization Helps Training of Quantized LSTM. NeurIPS, 1–11.
Kingma, D. P., & Ba, J. (2015). Adam: A method for stochastic optimization. International Conference on Learning Representations (ICLR). https://doi.org/https://doi.org/10.48550/arXiv.1412.6980
Lasijan, T. G., Santoso, R., & Hakim, A. R. (2023). Prediksi Harga Emas Dunia Menggunakan Metode Long-Short Term Memory. Jurnal Gaussian, 12(2), 287–295. https://doi.org/10.14710/j.gauss.12.2.287-295
Malik, A. (2026). Target IHSG 2026 Dipangkas Jadi 7.780, Cermati Rupiah & Kualitas Laba Emiten, Ini Top Picks Sahamnya. Bareksa. https://www.bareksa.com/berita/saham/2026-05-26/target-ihsg-2026-dipangkas-jadi-7780-cermati-rupiah-kualitas-laba-emiten-ini-top-picks-sahamnya
Schmidt, R. M. (2019). Recurrent Neural Networks ( RNNs ): A gentle Introduction and Overview. 1, 1–16. https://arxiv.org/pdf/1912.05911.pdf
Zhou, K.; Wang, W. Y.; Hu, T.; Wu, C. H. (2020). Comparison of time series forecasting based on statistical ARIMA model and LSTM with attention mechanism. Journal of Physics: Conference Series, 1631(1), 012141. https://doi.org/10.1088/1742-6596/1631/1/012141

Published

2026-07-31