Gold Price Forecasting with Long Short Term Memory (LSTM) and ARIMAX Method
Abstract
Gold is very popular investment instrument due to its annual prices increases. In the long term, gold prices follow a nonlinear pattern, but in the short term, there are fluctuations influenced by various factors, including global market dynamics, monetary policy, and overall economic conditions. Therefore, predicting gold prices is an important step in minimizing risk and maximizing profits for investors. In this study, we analyze the performance of two methods for forecasting global gold prices, namely long short term memory (LSTM) and autoregressive integrated moving average with exogenous variables (ARIMAX). Data used is weekly global gold price data from August 1, 2000, to June 1, 2024. The variables used are Close as the dependent variable and Open as the exogenous variable. The data used is stationary data through the differencing process and algorithmic transformation to overcome non-stationarity issues. The best LSTM model uses the Tanh activation function with 30 LSTM units, 10 timesteps, and a dropout of 0.01, resulting in a MAPE value of 5.323%. The best ARIMAX model obtained was the ARIMAX (0,1,1) model, with a MAPE value of 0.55% for the test data and 0.61% for the training data. The research results, indicate that the higher accuracy of ARIMAX reflects its suitability for linear data such as gold prices, but the accuracy of LSTM which is below 10% still performs well for more complex data patterns.
Keywords: gold price; forecasting; LSTM; arimax.
References
M. F. A. Azis, F. Darari, and M. R. Septyandy, “Time series analysis on earthquakes using EDA and machine learning,” in Proc. Int. Conf. Adv. Comput. Sci. Inf. Syst., Indonesia, 2020, https://doi.org/10.1109/ICACSIS51025.2020.9263188.
Z. Berradi and M. Lazzar, “Integration of principal component analysis and recurrent neural network to forecast the stock price of Casablanca Stock Exchange,” Procedia Comput. Sci., vol. 148, pp. 55–61, 2019, https://doi.org/10.1016/j.procs.2019.01.008.
D. Rosadi, Analisis Runtun Waktu dan Aplikasinya dengan R. Yogyakarta: UGM Press, 2014.
K. P. Danukusumo, Implementasi Deep Learning Menggunakan Convolutional Neural Network untuk Klasifikasi Citra Candi Berbasis GPU, Universitas Atma Jaya, Yogyakarta, 2017, https://e-journal.uajy.ac.id/12425/.
A. Géron, Hands-On Machine Learning with Scikit-Learn, Keras and TensorFlow, 2nd ed., O'Reilly Media, 2019.
J. Han, M. Kamber, and J. Pei, Data Mining Concepts and Techniques, 3rd ed., Morgan Kaufmann, USA, 2011, https://doi.org/10.1016/C2009-0-61819-5.
L. Deng, "Deep learning: methods and applications", Foundations and Trends in Signal Processing, vol. 7, no. 3, pp. 197–387, 2014, https://doi.org/10.1561/2000000039.
S. Kusumadewi, Artificial Intelligence (Teknik dan Aplikasinya), Yogyakarta: Graha Ilmu, 2003.
S. Makridakis, S. C. Wheelwright, and R. J. Hyndman, Forecasting: Methods and Applications, 3rd ed., Wiley, 1998, https://doi.org/10.2307/2287014.
Y. Bengio, P. Simard, and P. Frasconi, “Learning long-term dependencies with gradient descent is difficult,” IEEE Trans. Neural Networks, vol. 5, no. 2, pp. 157-166, 1994, https://doi.org/10.1109/72.279181.
R. K. Paul, "ARIMAX-GARCH-WAVELET model for forecasting volatile data," Model Assisted Statistics and Applications, vol. 10, no. 3, pp. 243-252, 2015, https://doi.org/10.3233/MAS-150328.
D. Rosadi, Analisis Ekonometrika dan Runtun Waktu Terapan dengan R. Yogyakarta: ANDI, 2011.
W. W. Wei, Time Series Analysis, Addison Wesley, New York, 2006.
D. Lewis, Industrial and Business Forecasting Methods: A Practical Guide to Exponential Smoothing and Curve Fitting, Butterworth Scientific, London, 1982.
E. J. Levin, A. Montagnoli, and R. E. Wright, Short-run and Long-run Determinants of The Price of Gold, Research Study 32. World Gold Council, 2006, https://strathprints.strath.ac.uk/7215/.
I. Goodfellow, Y. Bengio, and A. Courville, Deep Learning. Cambridge, MA: MIT Press, 2016, https://doi.org/10.4258/hir.2016.22.4.351.
J. Brownlee, Deep Learning for Time Series Forecasting: Predict the Future with MLPs, CNNs and LSTMs in Python. Machine Learning Mastery, 2017.
C. Chatfield, The Analysis of Time Series: An Introduction, 6th ed. Boca Raton, FL: CRC Press, 2003, https://doi.org/10.4324/9780203491683.
J. D. Hamilton, Time Series Analysis, Princeton University Press, 1994, https://doi.org/10.1515/9780691218632.
Refbacks
- There are currently no refbacks.

.jpg)






