IDEAS home Printed from https://ideas.repec.org/a/plo/pone00/0319776.html
   My bibliography  Save this article

TCN-QV: an attention-based deep learning method for long sequence time-series forecasting of gold prices

Author

Listed:
  • Yishuai Yang

Abstract

Accurate prediction of gold prices is crucial for investment decision-making and national risk management. The time series data of gold prices exhibits random fluctuations, non-linear characteristics, and high volatility, making prediction extremely challenging. Various methods, from classical statistics to machine learning techniques like Random Forests, Convolutional Neural Networks (CNN), and Recurrent Neural Networks (RNN), have achieved high accuracy, but they also have inherent limitations. To address these issues, a model that combines Temporal Convolutional Networks (TCN) with Query (Q) and Keys (K) attention mechanisms (TCN-QV) is proposed to enhance the accuracy of gold price predictions. The model begins by employing stacked dilated causal convolution layers within the TCN framework to effectively extract temporal features from the sequence data. Subsequently, an attention mechanism is introduced to enable adaptive weight distribution according to the information features. Finally, the predicted results are generated through a dense layer. This method is used to predict the time series data of gold prices in Shanghai. The optimized model demonstrates a substantial improvement in Mean Absolute Error (MAE) compared to the baseline model, achieving reductions of approximately 5.47% in the least favorable case and up to 33.69% in the most favorable scenario across four experimental datasets. Additionally, the model is tested across different time steps and shows satisfactory performance in long sequence predictions. To validate the necessity of the model components, this paper conducts ablation experiments to confirm the significance of each segment.

Suggested Citation

  • Yishuai Yang, 2025. "TCN-QV: an attention-based deep learning method for long sequence time-series forecasting of gold prices," PLOS ONE, Public Library of Science, vol. 20(5), pages 1-24, May.
  • Handle: RePEc:plo:pone00:0319776
    DOI: 10.1371/journal.pone.0319776
    as

    Download full text from publisher

    File URL: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0319776
    Download Restriction: no

    File URL: https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0319776&type=printable
    Download Restriction: no

    File URL: https://libkey.io/10.1371/journal.pone.0319776?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Liu, Qingfu & Tao, Zhenyi & Tse, Yiuman & Wang, Chuanjie, 2022. "Stock market prediction with deep learning: The case of China," Finance Research Letters, Elsevier, vol. 46(PA).
    2. Yifei Zhao & Jianhong Chen & Hideki Shimada & Takashi Sasaoka, 2023. "Non-Ferrous Metal Price Point and Interval Prediction Based on Variational Mode Decomposition and Optimized LSTM Network," Mathematics, MDPI, vol. 11(12), pages 1-16, June.
    3. Li, Yang & Du, Qingfeng, 2024. "Oil price volatility and gold prices volatility asymmetric links with natural resources via financial market fluctuations: Implications for green recovery," Resources Policy, Elsevier, vol. 88(C).
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Christian Fieberg & Daniel Metko & Thorsten Poddig & Thomas Loy, 2023. "Machine learning techniques for cross-sectional equity returns’ prediction," OR Spectrum: Quantitative Approaches in Management, Springer;Gesellschaft für Operations Research e.V., vol. 45(1), pages 289-323, March.
    2. Zhu, Xuehong & Zhang, Shishi & Ding, Qian, 2024. "Does extreme climate change drive the connectedness among global gold markets? Evidence from TVP-VAR and causality-in-quantiles techniques," Resources Policy, Elsevier, vol. 91(C).
    3. Naseh Majidi & Mahdi Shamsi & Farokh Marvasti, 2022. "Algorithmic Trading Using Continuous Action Space Deep Reinforcement Learning," Papers 2210.03469, arXiv.org.
    4. Guo, Wei & Liu, Qingfu & Luo, Zhidan & Tse, Yiuman, 2022. "Forecasts for international financial series with VMD algorithms," Journal of Asian Economics, Elsevier, vol. 80(C).
    5. Cakici, Nusret & Fieberg, Christian & Metko, Daniel & Zaremba, Adam, 2023. "Machine learning goes global: Cross-sectional return predictability in international stock markets," Journal of Economic Dynamics and Control, Elsevier, vol. 155(C).
    6. Arthur Emanuel de Oliveira Carosia & Ana Estela Antunes Silva & Guilherme Palermo Coelho, 2025. "Predicting the Brazilian Stock Market with Sentiment Analysis, Technical Indicators and Stock Prices: A Deep Learning Approach," Computational Economics, Springer;Society for Computational Economics, vol. 65(4), pages 2351-2378, April.
    7. Ma, Tian & Sheng, Haoyun & Wang, Yuejie, 2024. "Noisy market, machine learning and fundamental momentum," Pacific-Basin Finance Journal, Elsevier, vol. 86(C).
    8. Gao, Wang & Jin, Xiaoman & Zhang, Hongwei & He, Miao, 2025. "The asymmetric response of higher-order moments of precious metals to energy shocks and financial stresses: Evidence from time-frequency connectedness approach," Energy Economics, Elsevier, vol. 142(C).
    9. Ma, Yilin & Wang, Yudong & Wang, Weizhong & Zhang, Chong, 2023. "Portfolios with return and volatility prediction for the energy stock market," Energy, Elsevier, vol. 270(C).
    10. Kshitij Sharma & Yogesh K. Dwivedi & Bhimaraya Metri, 2024. "Incorporating causality in energy consumption forecasting using deep neural networks," Annals of Operations Research, Springer, vol. 339(1), pages 537-572, August.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:plo:pone00:0319776. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: plosone (email available below). General contact details of provider: https://journals.plos.org/plosone/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.