Model Artificial Neural Network (NARX) untuk Prediksi Harga Emas sebagai Dasar Pengambilan Keputusan Investasi di Tengah Ketidakpastian Ekonomi
DOI:
https://doi.org/10.47747/snfmi.v4i1.3831Abstract
Gold prices are an investment instrument influenced by various macroeconomic factors; consequently, their market efficiency is dynamic and not always perfect. The US dollar exchange rate and interest rates are key factors affecting gold prices in the global market. This study develops a prediction model for gold closing prices using an Artificial Neural Network with a Nonlinear Autoregressive Exogenous (NARX) architecture. The model incorporates gold’s opening, high, and low prices, the USD/IDR exchange rate, and Bank Indonesia’s benchmark interest rate as exogenous variables. The dataset consists of daily time-series data from January 2, 2023, to July 1, 2026, comprising 802 observations. We determined model parameters through a trial-and-error approach, varying the number of delays, the number of neurons in the hidden layer, and three training algorithms: Levenberg-Marquardt, Bayesian Regularization, and Scaled Conjugate Gradient. The results indicate that the optimal configuration is achieved with 4 delays, the Bayesian Regularization algorithm, and 10 neurons, yielding a Mean Squared Error of 235,031,460.78. Accuracy evaluation using the Mean Absolute Percentage Error (MAPE) resulted in 0.671 percent, classified as "highly accurate", with a coefficient of determination of 0.9993. These findings show that the NARX model can predict gold closing prices with a very high degree of accuracy, making it a useful tool for investors making investment decisions amid economic uncertainty.
References
Alkhatib, K., Khazaleh, H., Alkhazaleh, H. A., Alsoud, A. R., & Abualigah, L. (2022). A new stock price forecasting method using active deep learning approach. Journal of Open Innovation: Technology, Market, and Complexity, 8(2), 96. https://doi.org/10.3390/joitmc8020096
Ballesteros, M. A. A., & Miranda, E. A. M. (2024). Stock market forecasting using a neural network through fundamental indicators, technical indicators and market sentiment analysis. Computational Economics. https://doi.org/10.1007/s10614-024-10711-4
Bank Indonesia. (2026). BI-Rate. Diakses pada [tanggal akses Anda], dari https://www.bi.go.id/id/statistik/indikator/bi-rate.aspx
Chaudhuri, T. D., & Ghosh, I. (2016). Artificial neural network and time series modeling based approach to forecasting the exchange rate in a multivariate framework. arXiv preprint. https://doi.org/10.48550/arXiv.1607.02093
Dhafer, A. H., Nor, F. M., Alkawsi, G., Al-Othmani, A. Z., Shah, N. R., Alshanbari, H. M., Khairi, K. F. B., & Baashar, Y. (2022). Empirical analysis for stock price prediction using NARX model with exogenous technical indicators. Computational Intelligence and Neuroscience, 2022, 9208640. https://doi.org/10.1155/2022/9208640
García-Gonzalo, E., García-Nieto, P. J., Fidalgo Valverde, G., Riesgo Fernández, P., Sánchez Lasheras, F., & Suárez Gómez, S. L. (2024). Hybrid DE-optimized GPR and NARX/SVR models for forecasting gold spot prices: A case study of the global commodities market. Mathematics, 12(7), 1039. https://doi.org/10.3390/math12071039
Gbadamosi, S. L., Nwulu, N. I., & Akinola, S. O. (2024). Exploring the effectiveness of a multilayer neural network model for gold price prediction. Przegląd Elektrotechniczny, 100(3), 157 sampai 161. https://doi.org/10.15199/48.2024.03.28
Guo, Y., Li, C., Wang, X., & Duan, Y. (2024). Gold price prediction using two-layer decomposition and XGBoost optimized by the whale optimization algorithm. Computational Economics. https://doi.org/10.1007/s10614-024-10736-9
Hafezi, R., & Akhavan, A. (2018). Forecasting gold price changes: Application of an equipped artificial neural network. AUT Journal of Modeling and Simulation, 50(1), 71 sampai 82. https://doi.org/10.22060/miscj.2018.13508.5074
Investing.com. (2026). Gold futures historical data [and/or USD/IDR historical data]. Diakses pada [tanggal akses Anda], dari https://www.investing.com
Kamalov, F. (2020). Forecasting significant stock price changes using neural networks. Neural Computing and Applications, 32(23), 17655 sampai 17667. https://doi.org/10.1007/s00521-020-04942-3
Kelley, J., & Hagan, M. T. (2024). Comparison of neural network NARX and NARMAX models for multi-step prediction using simulated and experimental data. Expert Systems with Applications, 237, 121437. https://doi.org/10.1016/j.eswa.2023.121437
Kristoufek, L., & Vosvrda, M. (2016). Gold, currencies and market efficiency. Physica A: Statistical Mechanics and its Applications, 449, 27 sampai 34. https://doi.org/10.1016/j.physa.2015.12.075
Lu, W., Li, J., Li, Y., Sun, A., & Wang, J. (2020). A CNN-LSTM-based model to forecast stock prices. Complexity, 2020, 6622927. https://doi.org/10.1155/2020/6622927
Man, Y. C., & Kynor, R. (2023). A review of gold pricing: Real interest rate and U.S. dollar index. Journal of Student Research, 12(3). https://doi.org/10.47611/jsrhs.v12i3.5028
Orimoloye, L. O., Sung, M. C., Ma, T., & Johnson, J. E. (2020). Comparing the effectiveness of deep feedforward neural networks and shallow architectures for predicting stock price indices. Expert Systems with Applications, 139, 112828. https://doi.org/10.1016/j.eswa.2019.112828
Pangestika, Z., & Josaphat, B. P. (2025). Predicting stock price using convolutional neural network and long short term memory (case study: Stock of BBCA). Journal of the Indonesian Mathematical Society, 31(1), 1 sampai 12. https://doi.org/10.22342/jims.v31i1.1512
Rojas-Hernández, R., Fernández-Anaya, G., Carrasco-Ochoa, J. A., & Martínez-Trinidad, J. F. (2022). NARX neural networks models for prediction of standardized precipitation index in central Mexico. Atmosphere, 13(8), 1254. https://doi.org/10.3390/atmos13081254
Saini, A., Singh, R. K., & Sinha, P. (2025). Forecasting gold price using hybrid deep neural network LSTM-autoencoder. Discover Artificial Intelligence, 5, 281. https://doi.org/10.1007/s44163-025-00464-w
Sedighi, M., Jahangirnia, H., Gharakhani, M., & Farahani Fard, S. (2019). A novel hybrid model for stock price forecasting based on metaheuristics and support vector machine. Data, 4(2), 75. https://doi.org/10.3390/data4020075
Tapbun, D., Taninpong, P., & Thumronglaohapun, S. (2026). Daily gold bar price forecasting in Thailand using nonlinear autoregressive network technique with exogenous factors. KKU Science Journal, 54(2), 333 sampai 343. https://doi.org/10.14456/kkuscij.2026.24