Deep Learning to Enhance the Accuracy and Lag-time of Time Series Data Forecasting

Authors

  • Napatr Chongkol Department of Computer Engineering, College of Engineering and Technology, Dhurakij Pundit University, Bangkok 10210, Thailand
  • Tanun Jaruvitayakovit Department of Computer Engineering, College of Engineering and Technology, Dhurakij Pundit University, Bangkok 10210, Thailand

DOI:

https://doi.org/10.65205/jcct.2026.e3550

Keywords:

Time Series Forecasting, Gold Price, LSTM, CNN, Trend-Based Data Grouping

Abstract

Time series forecasting is crucial in the present, applied in areas such as weather forecasting, finance, and beyond. Gold price forecasting is highly complex due to significant influences from economic factors. Although current studies have explored gold price forecasting using deep learning models, issues of prediction lag persist, affecting the accuracy of directional forecasts. To address this problem, this research focuses on developing a gold price time series forecasting model with improved accuracy and reduced prediction lag. This is achieved by combining the strengths of the LSTM (Long Short-Term Memory) model, which excels at learning long-term dependencies in data, and the CNN (Convolutional Neural Network) model, which efficiently extracts spatial features from data. Additionally, a data grouping method based on price trend characteristics is employed, allowing the model to learn specific patterns of each trend type appropriately. This reduces lag caused by delayed responses to actual data changes and enhances the accuracy of gold price forecasts in both numerical value and directional movement. Consequently, the model demonstrates strong potential for effective application in real-world financial trading decisions. This study uses gold price data from January 2014 to July 2025, totaling 2,943 days. Price trends are classified into three groups uptrend, sideways and downtrend. Four models are trained, which are LSTM, CNN, LSTM_G3, and CNN_G3. The most suitable model for each group is then selected to create the LSTM+CNN_G3 model. The results show that the LSTM+CNN_G3 model achieves the lowest overall MAE (Mean Absolute Error) at 17.68 US dollars and the highest overall MPM (Movement Prediction Metric) at 54.08%, outperforming the baseline LSTM and CNN models that do not use data grouping. This demonstrates that the grouping method effectively reduces prediction lag. In a gold trading simulation, the LSTM+CNN_G3 model yields the highest profit of 1,870 US dollars, representing a 101.87% return on capital. These findings indicate that grouping data by price trends combined with selecting appropriate architectures can improve accuracy and reduce lag, enabling the model to be effectively applied in real-world financial markets.

Downloads

Download data is not yet available.

References

Bahri, M. Z., & Vahidnia, S. (2022, November 16-18). Time Series Forecasting Using Smoothing Ensemble Empirical Mode Decomposition and Machine Learning Techniques. 2022 International Conference on Electrical, Computer, Communications and Mechatronics Engineering, 1–6. Institute of Electrical and Electronics Engineers. https://doi.org/10.1109/ICECCME55909.2022.9988336

Chen, L., & Fan, X. (2025). TIC-FusionNet: A Multimodal Deep Learning Framework with Temporal Decomposition and Attention-Based Fusion for Time Series Forecasting. PLOS One, 20(10), e0333379. https://doi.org/10.1371/journal.pone.0333379

Chen, W., Hussain, W., Cauteruccio, F., & Zhang, X. (2024). Deep Learning for Financial Time Series Prediction: A State-of-the-Art Review of Standalone and Hybrid Models. Computer Modeling in Engineering & Sciences, 139(1), 187–224. https://doi.org/10.32604/cmes.2023.031388

Das, P., & Barman, S. (2025). Perspective Chapter: An Overview of Time Series Decomposition and Its Applications. In Sloboda, B. W., & Quah, C.-H. (Eds), Business, Management and Economics (1-15). IntechOpen. https://doi.org/10.5772/intechopen.1009268

Giantsidi, S., & Tarantola, C. (2025). Deep Learning for Financial Forecasting: A Review of Recent Trends. International Review of Economics & Finance, 104, 104719. https://doi.org/10.1016/j.iref.2025.104719

Investing.Com. (2025). Historical XAU/USD Exchange Rates. https://th.investing.com/currencies/xau-usd-historical-data (In Thai)

Krungthai. (2021). Gold Wallet, an Online Gold Trading Platform that Enables Real-Time Gold Buying, Selling, and Withdrawal Orders Through the Paotang Application. https://krungthai.com/th/krungthai-update/promotion-detail/843 (In Thai)

Li, J., Song, L., Wu, D., Shui, J., & Wang, T. (2023). Lagging Problem in Financial Time Series Forecasting. Neural Computing and Applications, 35(28), 20819–20839. https://doi.org/10.1007/s00521-023-08879-1

Lin, Y., Liu, S., Yang, H., & Wu, H. (2021). Stock Trend Prediction Using Candlestick Charting and Ensemble Machine Learning Techniques with a Novelty Feature Engineering Scheme. IEEE Access, 9, 101433–101446. https://doi.org/10.1109/ACCESS.2021.3096825

Mehtab, S., Sen, J., & Dasgupta, S. (2020, November 5-7). Robust Analysis of Stock Price Time Series Using CNN and LSTM-Based Deep Learning Models. 2020 4th International Conference on Electronics, Communication and Aerospace Technology, 1481–1486. Institute of Electrical and Electronics Engineers. https://doi.org/10.1109/ICECA49313.2020.9297652

Ortu, M., Uras, N., Conversano, C., Bartolucci, S., & Destefanis, G. (2022). On Technical Trading and Social Media Indicators for Cryptocurrency Price Classification Through Deep Learning. Expert Systems with Applications, 198, 116804. https://doi.org/10.1016/j.eswa.2022.116804

Samanta, S., Pratama, M., Sundaram, S., & Srikanth, N. (2020, July 19-24). A Dual Network Solution (DNS) for Lag-Free Time Series Forecasting. 2020 International Joint Conference on Neural Networks, 1–8. Institute of Electrical and Electronics Engineers. https://doi.org/10.1109/IJCNN48605.2020.9207022

TP, K. N., & Sultana, S. (2024, November 7-9). Advanced Techniques for Daily Gold Price Forecasting in India Through Statistical Analysis and Predictive Modeling. 2024 8th International Conference on Computational System and Information Technology for Sustainable Solutions, 1–6. Institute of Electrical and Electronics Engineers. https://doi.org/10.1109/CSITSS64042.2024.10816779

Widiputra, H., Mailangkay, A., & Gautama, E. (2021). Multivariate CNN‐LSTM Model for Multiple Parallel Financial Time‐Series Prediction. Complexity, 2021(1), 9903518. https://doi.org/10.1155/2021/9903518

Downloads

Published

24-08-2026

How to Cite

Chongkol, N., & Jaruvitayakovit, T. (2026). Deep Learning to Enhance the Accuracy and Lag-time of Time Series Data Forecasting. Journal of Computer and Creative Technology, 4(2), e3550. https://doi.org/10.65205/jcct.2026.e3550