This study employs novel deep learning approaches to accurately forecast gold prices, a critical economic indicator and a prominent safe-haven asset. The research investigates and compares the performance of Recurrent Neural Networks (RNNs) with a Transformer-based model, specifically the Patch Time Series Transformer (PatchTST), for forecasting the complex time series of gold prices, with the aim of demonstrating the superiority of attention-based mechanisms. A three-phase methodology was implemented: (1) data preprocessing, which included removing missing values, normalization, and creating time windows; (2) training the two model categories (RNNs and PatchTST); and (3) evaluating their performance using Root Mean Square Error (RMSE), Mean Absolute Error (MAE), and the Coefficient of Determination (R²). The results indicate that the PatchTST model significantly outperforms the RNN models. By leveraging the self-attention mechanism and processing data in patches, PatchTST more effectively captures complex, long-term dependencies within the gold price time series, achieving higher predictive accuracy. This superiority underscores the efficiency and innovation of transformer-based models for precise economic time series forecasting. By introducing PatchTST as a more accurate tool, this research provides significant scientific added value for analysts and investors in making informed financial decisions. By introducing PatchTST as a more accurate tool, this research provides significant scientific added value for analysts and investors in making informed financial decisions.
Zare Mehrjardi,F. (2026). Presenting a Patch-Based Time Series Transformer Model for Financial Market Forecasting: A Case Study of Gold Price Prediction. (e116728). Artificial Intelligence in Science and Engineering, (), e116728
MLA
Zare Mehrjardi,F. . "Presenting a Patch-Based Time Series Transformer Model for Financial Market Forecasting: A Case Study of Gold Price Prediction" .e116728 , Artificial Intelligence in Science and Engineering, , , 2026, e116728.
HARVARD
Zare Mehrjardi F. (2026). 'Presenting a Patch-Based Time Series Transformer Model for Financial Market Forecasting: A Case Study of Gold Price Prediction', Artificial Intelligence in Science and Engineering, (), e116728.
CHICAGO
F. Zare Mehrjardi, "Presenting a Patch-Based Time Series Transformer Model for Financial Market Forecasting: A Case Study of Gold Price Prediction," Artificial Intelligence in Science and Engineering, (2026): e116728,
VANCOUVER
Zare Mehrjardi F. Presenting a Patch-Based Time Series Transformer Model for Financial Market Forecasting: A Case Study of Gold Price Prediction. AISE, 2026; (): e116728.