Submitted:
30 October 2025
Posted:
31 October 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Methodology
2.1. Overview
2.2. Data and Preprocessing
2.3. Problem Framing and Experimental Setup
- Training & validation 2012–2017, test 2018.
- Training & validation 2015–2020, test 2021.
- Training & validation 2018–2023, test 2024.
2.4. Models
2.4.1. Statistical Models
- , , .
- , , .
2.4.2. Deep Learning Models
2.5. Evaluation Metrics
2.6. Implementation
3. Results
3.1. Overview
3.2. Statistical Models
3.2.1. SARIMA
3.2.2. Exponential Smoothing via ETS
3.3. Deep Learning Models
3.3.1. TFT
3.3.2. Hybrid TFT - GNN
3.4. Comparative Summary
4. Discussion
4.1. Statistical Models
4.2. TFT
4.3. TFT-GNN Hybrid
4.4. Summary
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| AAPL | Apple Inc. |
| AG-STFT | Adaptive Gaussian Short-Term Fourier Transform |
| CNN | Convolutional Neural Network |
| ETS | Exponential Smoothing (Error, Trend, Seasonal) Model |
| ETF | Exchange-Traded Fund |
| GAT | Graph Attention Network |
| JPM | JPMorgan Chase & Co. |
| MACD | Moving Average Convergence Divergence |
| NVDA | NVIDIA Corporation |
| OHLCV | Open, High, Low, Close, Volume |
| Coefficient of Determination | |
| RMSE | Root Mean Squared Error |
| RSI | Relative Strength Index |
| SARIMA | Seasonal Autoregressive Integrated Moving Average |
| SPY | SPDR S&P 500 ETF Trust |
| TFT | Temporal Fusion Transformer |
| TFT-GNN | Temporal Fusion Transformer with Graph Neural Network integration |
Appendix A. Hyperparameter Tuning
Appendix A.1. TFT Model
- Encoder and Decoder Layers: Number of stacked LSTM layers in the encoder and decoder modules. Deeper layers increase model capacity but risk overfitting.
- Hidden Layer Size: Dimensionality of the model’s internal layers, influencing its representational capacity.
- Attention Heads: Number of parallel attention mechanisms in the multi-head attention block; additional heads capture diverse patterns at higher computational cost.
- Static Embedding Size: Dimensionality of learned embeddings for static covariates.
- Time-Varying Embedding Size: Dimensionality of learned embeddings for time-varying features such as lagged prices or technical indicators.
- Variable Selection: Boolean flag indicating whether to use input variable selection networks for dynamic feature relevance estimation.
- Attention Window: Number of past time steps accessible to the temporal attention mechanism.
Appendix A.2. TFT-GNN Model
- Apple Supply Chain and Related: AAPL, AMD, TSM, AVGO, ASML, QCOM, TXN, MU, NXPI, KLAC, LRCX, ADI, AMAT, MCHP
- Big Tech Peers: GOOGL, MSFT, AMZN, META, NFLX, ORCL, SONY, CRM, ADBE
- Financials: JPM, MS, BAC, BLK, GS, WFC, SCHW, BK, AXP, COF, MET
- Semiconductors: NVDA, AMD, TSM, ASML, QCOM, MU, TXN, NXPI, KLAC, LRCX
- Healthcare: UNH, JNJ, PFE, MRK, LLY, TMO, BMY, NVO
- Automotive: TSLA, F, GM, HMC, TM
- Consumer: WMT, HD, COST, PG, KO, MCD, TGT, PEP
- Exchange-Traded Funds (ETFs): SPY, QQQ, DIA, IWM, XLK, XLF, XLE, XLI, XLV, XLY, XLP, VNQ, IYR, VGT, VTI, VUG, VTV, IWF, IWD, ITOT
- Node Features: Input features for each stock (e.g., OHLCV, RSI, MACD).
- Hidden Channels: Dimensionality of intermediate node embeddings.
- Number of GAT Layers: Controls network depth; deeper models capture higher-order relations but risk over-smoothing.
- Attention Heads: Number of attention mechanisms applied per layer.
- Dropout Rate, Learning Rate, and Optimizer: Standard training hyperparameters.
Appendix B. Code Repository
Appendix C. Table of Results

References
- Lara-Benítez, P.; Carranza-García, M.; Riquelme, J.C. An experimental review on deep learning architectures for time series forecasting. International journal of neural systems 2021, 31, 2130001. [Google Scholar] [CrossRef]
- Lynch, S. Python for Scientific Computing and Artificial Intelligence; Chapman and Hall/CRC, 2023. [Google Scholar]
- Lynch, S. Dynamical Systems with Applications using MATLAB, 3rd ed.; Springer Nature, 2025. [Google Scholar]
- Olorunnimbe, K.; Viktor, H. Ensemble of temporal Transformers for financial time series. Journal of Intelligent Information Systems 2024, 62, 1087–1111. [Google Scholar] [CrossRef]
- Jiang, W. Applications of deep learning in stock market prediction: recent progress. Expert Systems with Applications 2021, 184, 115537. [Google Scholar] [CrossRef]
- Ajiga, D.I.; Adeleye, R.A.; Tubokirifuruar, T.S.; Bello, B.G.; Ndubuisi, N.L.; Asuzu, O.F.; Owolabi, O.R. Machine learning for stock market forecasting: a review of models and accuracy. Finance & Accounting Research Journal 2024, 6, 112–124. [Google Scholar] [CrossRef]
- Kehinde, T.; Chan, F.T.; Chung, S.H. Scientometric review and analysis of recent approaches to stock market forecasting: Two decades survey. Expert Systems with Applications 2023, 213, 119299. [Google Scholar] [CrossRef]
- NASDAQ. Nasdaqtraded.txt – NASDAQ Symbol Directory. https://www.nasdaqtrader.com/dynamic/SymDir/nasdaqtraded.txt. Accessed: 23/04/2025.
- Box, G.E.; Jenkins, G.M.; Reinsel, G.C.; Ljung, G.M. Time series analysis: forecasting and control; John Wiley & Sons, 2015. [Google Scholar]
- Brown, R.G. Exponential smoothing for predicting demand; Little, 1956. [Google Scholar]
- Brown, R. Statistical Forecasting for Inventory Control; McGraw-Hill, 1959. [Google Scholar]
- Gardner Jr, E.S. Exponential smoothing: The state of the art. Journal of forecasting 1985, 4, 1–28. [Google Scholar] [CrossRef]
- Hyndman, R.J.; Koehler, A.B.; Snyder, R.D.; Grose, S. A state space framework for automatic forecasting using exponential smoothing methods. International Journal of forecasting 2002, 18, 439–454. [Google Scholar] [CrossRef]
- Lim, B.; Arık, S.Ö.; Loeff, N.; Pfister, T. Temporal fusion transformers for interpretable multi-horizon time series forecasting. International Journal of Forecasting 2021, 37, 1748–1764. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. Advances in neural information processing systems 2017, 30. [Google Scholar]
- Scarselli, F.; Gori, M.; Tsoi, A.C.; Hagenbuchner, M.; Monfardini, G. The graph neural network model. IEEE transactions on neural networks 2008, 20, 61–80. [Google Scholar] [CrossRef]
- Patel, M.; Jariwala, K.; Chattopadhyay, C. A Systematic Review on Graph Neural Network-based Methods for Stock Market Forecasting. ACM Computing Surveys 2024, 57, 1–38. [Google Scholar] [CrossRef]
- Velickovic, P.; Cucurull, G.; Casanova, A.; Romero, A.; Lio, P.; Bengio, Y.; et al. Graph attention networks. stat 2017, 1050, 10–48550. [Google Scholar]
- Feng, F.; He, X.; Wang, X.; Luo, C.; Liu, Y.; Chua, T.S. Temporal relational ranking for stock prediction. ACM Transactions on Information Systems (TOIS) 2019, 37, 1–30. [Google Scholar] [CrossRef]
- Hu, X. Stock price prediction based on temporal fusion transformer. In Proceedings of the 2021 3rd International Conference on Machine Learning, Big Data and Business Intelligence (MLBDBI). IEEE; 2021; pp. 60–66. [Google Scholar]
- Wang, J.; Zhang, S.; Xiao, Y.; Song, R. A review on graph neural network methods in financial applications. arXiv 2021, arXiv:2111.15367. [Google Scholar] [CrossRef]
- Sun, Z. Comparison of trend forecast using ARIMA and ETS Models for S&P500 close price. In Proceedings of the Proceedings of the 2020 4th international conference on E-Business and Internet; 2020; pp. 57–60. [Google Scholar]
- Schmidt, F. Generalization in generation: A closer look at exposure bias. arXiv 2019, arXiv:1910.00292. [Google Scholar] [CrossRef]
- Simeunović, J.; Schubnel, B.; Alet, P.J.; Carrillo, R.E. Spatio-temporal graph neural networks for multi-site PV power forecasting. IEEE Transactions on Sustainable Energy 2021, 13, 1210–1220. [Google Scholar] [CrossRef]
- Yu, B.; Yin, H.; Zhu, Z. Spatio-temporal graph convolutional networks: A deep learning framework for traffic forecasting. arXiv 2017, arXiv:1709.04875. [Google Scholar]
- Liu, T.; Liang, L.; Che, C.; Liu, Y.; Jin, B. A transformer-based framework for temporal health event prediction with graph-enhanced representations. Journal of Biomedical Informatics 2025, 104826. [Google Scholar] [CrossRef] [PubMed]
- Kautkar, H.; Das, S.; Gupta, H.; Ghosh, S.; Kanjilal, K. Leveraging an integrated first and second moments modeling approach for optimal trading strategies: Evidence from the Indian pharma sector in the pre- and post-COVID-19 era. Journal of Forecasting 2025, 70046. [Google Scholar] [CrossRef]
- Shi, Z.; Ibrahim, O.; Hashim, H.I.C. A novel hybrid HO-CAL framework for enhanced stock index prediction. International Journal of Advanced Computer Science and Applications 2025, 333–342. [Google Scholar] [CrossRef]
- Huang, Y.; Pei, Z.; Yan, J.; Zhou, C.; Lu, X. A combined adaptive Gaussian short-term Fourier transform and Mamba framework for stock price prediction. Engineering Applications of Artificial Intellgence 2025, 112588. [Google Scholar] [CrossRef]







| Model | RMSE (↓) | (↑) | Horizon | Interpretability | Compute Time |
|---|---|---|---|---|---|
| SARIMA | Weekly | Low | Moderate | ||
| ETS | Daily | Moderate | Low | ||
| TFT | Daily | High | High | ||
| TFT-GNN | Daily | High | Very high |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).