Optimasi Hyperparameter N-BEATS Menggunakan Optuna untuk Prediksi Harga Saham BBCA
Abstract
Stock price prediction is crucial for supporting informed investment decisions due to the high volatility of stock prices. One of the key challenges in deep learning–based stock price prediction is determining the right hyperparameters. This research aimed to assess whether hyperparameter tuning with Optuna can enhance the N-BEATS model performance for predicting the stock price of PT Bank Central Asia Tbk. Historical stock price data were used and chronologically divided into training, validation, and testing sets. The efficacy of the models was measured using MAPE, RMSE, and R². The results showed that hyperparameter optimization using Optuna considerably enhanced the performance of N-BEATS, achieving a MAPE of 1.27%, which outperformed the standard N-BEATS model (1.44%) and the LSTM model (1.41%). This study proved that a systematic hyperparameter optimization approach can improve the performance of stock price forecasting models.
Keyword: N-BEATS; Optuna; Stock; Predict; BBCA
Abstrak
Prediksi harga saham menjadi aspek penting dalam mendukung penentuan keputusan investasi karena fluktuasi harga saham yang tinggi. Salah satu tantangan utama dalam pemodelan prediksi harga saham berbasis deep learning adalah penentuan hyperparameter yang tepat. Penelitian ini bertujuan untuk mengevaluasi efektivitas optimasi hyperparameter menggunakan Optuna dalam meningkatkan kinerja model N-BEATS untuk prediksi harga saham PT Bank Central Asia Tbk. Data historis harga saham digunakan dan dibagi secara kronologis menjadi data latih, validasi, dan uji. Evaluasi kinerja akhir dilakukan menggunakan metrik MAPE, RMSE, dan R². Hasil penelitian menunjukkan bahwa optimasi hyperparameter dengan Optuna mampu meningkatkan kinerja N-BEATS dengan nilai MAPE sebesar 1.27% dibandingkan dengan N-Beats standar (MAPE 1.44%) dan LSTM (MAPE 1.41%). Penelitian ini menunjukkan bahwa pendekatan optimasi hyperparameter yang sistematis efektif dalam meningkatkan kinerja model prediksi harga saham.
Keywords
References
M. Hani’ah, M. Z. Abdullah, W. I. Sabilla, S. Akbar, and D. R. Shafara, “Google Trends and Technical Indicator based Machine Learning for Stock Market Prediction,” Matrik J. Manajemen, Tek. Inform. dan Rekayasa Komput., vol. 22, no. 2, pp. 271–284, 2023, doi: https://doi.org/10.30812/matrik.v22i2.2287.
Bursa Efek Indonesia, “SID Baru Bertambah 2,5 Juta, Investor Pasar Modal Tembus 17 Juta,” Regional Development Information System (RDIS) - Bursa Efek Indonesia, 2025. https://rdis.idx.co.id/id/news/sid-baru-bertambah-2-5-juta-investor-pasar-modal-tembus-17-juta (accessed Dec. 31, 2025).
Bursa Efek Indonesia, “Menutup Tahun Penuh Prestasi, Pasar Modal Indonesia Optimis Menyongsong Tahun 2026,” Siaran Pers PT Bursa Efek Indonesia (PR No: 113/BEI.SPR/12-2025), 2025. https://www.idx.co.id/id/berita/siaran-pers/2531 (accessed Dec. 31, 2025).
M. H. Zein, N. Yudistira, and P. P. Adikara, “Indonesian Stock Price Prediction Using Neural Basis Expansion Analysis for Interpretable Time Series Method,” J. Inf. Commun. Technol., vol. 23, no. 3, pp. 361–392, 2024, [Online]. Available: https://e-journal.uum.edu.my/index.php/jict/article/view/20874
X. Fan, C. Tao, and J. Zhao, “Advanced stock price prediction with xLSTM-based models: Improving long-term forecasting,” in 2024 11th International Conference on Soft Computing & Machine Intelligence (ISCMI), 2024, pp. 117–123. [Online]. Available: https://api.semanticscholar.org/CorpusID:275956611
M. R. Almasah and W. A. E. Prabowo, “Implementasi Deep Neural Network untuk Prediksi Harga Saham PT Bank Central Asia Tbk,” J. Ris. Komput., vol. 12, no. 2, pp. 129–139, 2025, doi: https://doi.org/10.30865/jurikom.v12i2.8544.
Z. Pangestika and B. P. Josaphat, “Predicting Stock Price Using Convolutional Neural Network and Long Short Term Memory (Case Study: Stock of BBCA),” J. Indones. Math. Soc., vol. 31, no. 1, pp. 1–18, 2025, doi: https://doi.org/10.22342/jims.v31i1.1512.
F. T. Samuelly and Y. Nataliani, “Prediksi Pergerakan Harga Saham Bank Mandiri Menggunakan Metode Support Vector Regression dan Algoritma Grid Search,” Jutisi J. Ilm. Tek. Inform. dan Sist. Inf., vol. 14, no. 3, pp. 1441–1451, 2025, doi: http://dx.doi.org/10.35889/jutisi.v14i3.3206.
B. N. Oreshkin, D. Carpov, N. Chapados, and Y. Bengio, “N-BEATS: Neural basis expansion analysis for interpretable time series forecasting,” arXiv, pp. 1–31, 2020, doi: https://doi.org/10.48550/arXiv.1905.10437.
T. Akiba, S. Sano, T. Yanase, T. Ohta, and M. Koyama, “Optuna: A Next-generation Hyperparameter Optimization Framework,” in Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Anchorage, 2019, pp. 2623–2631. doi: https://doi.org/10.1145/3292500.3330701.
Y. Liu, C. Zhong, Q. Ma, Y. Jiang, and C. Zhang, “The S & P 500 Index Prediction Based on N-BEATS,” in Proceedings of the 2nd International Academic Conference on Blockchain, Information Technology and Smart Finance (ICBIS 2023), 2023, vol. 2, pp. 923–929. doi: 10.2991/978-94-6463-198-2.
G. Asmat and K. M. Maiyama, “Bitcoin Price Prediction Using N-BEATs ML Technique,” EAI Endorsed Trans. Scalable Inf. Syst., vol. 12, no. 2, pp. 1–8, 2025, doi: https://doi.org/10.4108/eetsis.9006.
B. S. Naik et al., “Stock Price Forecasting using N-Beats Deep Learning Architecture,” J. Sci. Res. Reports, vol. 30, no. 9, pp. 483–494, 2024, doi: 10.9734/jsrr/2024/v30i92373.
M. N. Riswanda, W. Syaifullah, and J. Saputra, “Prediction of Inflation Rate in East Java Using the N-BEATS Model and Optuna Optimization Prediksi Laju Inflasi di Jawa Timur Menggunakan Model N-BEATS dan Optimasi Optuna,” MALCOM Indones. J. Mach. Learn. Comput. Sci., vol. 5, no. 3, pp. 1049–1060, 2025, doi: https://doi.org/10.57152/malcom.v5i3.2141.
M. Rizki, A. E. Danneswara, Y. D. Aprilia, M. F. R. Al Fajri, Y. Hendrian, and S. L. Kinanti, “Prediksi Harga Saham Bank BRI dan Bank BCA dengan Menggunakan Model LSTM,” J. Artif. Intell. Digit. Bus., vol. 4, no. 2, pp. 4554–4560, 2025, doi: https://doi.org/10.31004/riggs.v4i2.1264.
Haeruddin, E. Noersasongko, Purwanto, and Muljono, “A Multi-Model Framework for Rainfall Forecasting: Evaluating Performance Model Statistical, Machine Learning, and Deep Learning Methods,” in 2025 International Conference on Smart Computing, IoT and Machine Learning (SIML), 2025, pp. 1–6. doi: 10.1109/siml65326.2025.11080798.
T. Tan, H. Sama, G. Wijaya, and O. E. Aboagye, “Studi Perbandingan Deteksi Intrusi Jaringan Menggunakan Machine Learning: (Metode SVM dan ANN),” J. Teknol. dan Inf., vol. 13, no. 2, pp. 152–164, 2023, doi: https://doi.org/10.34010/jati.v13i2.10484.
M. K. Najib and S. Nurdiati, “Pemodelan Deret Waktu Menggunakan Non-linear Autoregressive Neural Network: Studi Kasus Prediksi Harga Saham Mandiri,” Jambura J. Math., vol. 7, no. 2, pp. 213–220, 2025, doi: https://doi.org/10.37905/jjom.v7i2.33397.
R. N. Silalahi and Muljono, “Perbandingan Kinerja Metode Linear Regression, LSTM dan GRU Untuk Prediksi Harga Penutupan Saham Coca-Cola,” Komputika J. Sist. Komput., vol. 13, no. 2, pp. 201–211, 2024, doi: https://doi.org/10.34010/komputika.v13i2.12265.
N. J. Santoso and F. Firdausillah, “N-Beats Optimization With K-Fold Cross-Validation for Stock Market Price Prediction in Indonesia,” Eduvest - J. Univers. Stud., vol. 5, no. 11, pp. 13520–13530, 2025, doi: https://doi.org/10.59188/eduvest.v5i11.52367.
H. Yin, “Enhancing Directional Accuracy in Stock Closing Price Value Prediction Using a Direction-Integrated MSE Loss Function,” in Proceedings of the 1st International Conference on Data Analysis and Machine Learning - Volume 1: DAML, 2023, pp. 119–126. doi: 10.5220/0012810200003885.
M. Barua, T. Kumar, K. Raj, and A. M. Roy, “Comparative Analysis of Deep Learning Models for Stock Price Prediction in the Indian Market,” FinTech, vol. 3, no. 4, pp. 551–568, 2024, doi: https://doi.org/10.3390/fintech3040029
How To Cite This :
Refbacks
- There are currently no refbacks.










