Submitted:
17 July 2025
Posted:
17 July 2025
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Literature Review
2.1. Traditional Time Series Models and Deep Learning Baselines
2.2. Single Models with Decomposition Methods or Advanced Techniques
2.3. Hybrid Models
2.4. Sentiment Analysis
2.5. Limitations of Existing Research and Our Contributions
- Inability to adapt to different market regimes: Static ensembling approaches, such as [12], fails to adjust to varying market conditions, making them impractical for real-time financial forecasting.
- By making use of SnowNLP and Word2Vec, a domain-specific financial sentiment dictionary (16,673 entries) is proposed for investor forum sentiment analysis, which achieves 97.35% classification accuracy and surpasses generic lexicons in capturing market specialized terminology.
- In addition, a heterogeneous model framework is designed that integrates Support Vector Regression (SVR) for linear trend capture and three Transformer variants for nonlinear dependency modeling.
- Finally, comprehensive experiments are performed to validate the performance of our DQN-Hybrid Transformer-SVR Ensemble framework (DQN-HTS-EF) across a diverse portfolio of financial datasets, including Bitcoin, China United Network Communications (China Unicom), CSI 100 Index, Amazon (AMZN), and corn futures. This multi-asset design—encompassing RMB-denominated equities, USD-denominated tech stocks, cryptocurrency, and agricultural commodities—enables rigorous testing of cross-regime generalization.
3. Materials and Methods
3.1. Framework Overview
- Domain-Specific Sentiment Dictionary Construction
- 2.
- Sentiment Feature Extraction for Forum Titles
- 3.
- Dynamic Model Ensembling via DRL
3.2. Data Acquisition and Data Preprocessing
3.2.1. Financial Trading Data
3.2.2. Textual Sentimental Data
3.3. Financial Domain-Specific Sentiment Dictionary Construction
3.3.1. Dictionary Construction Using Sentiment Analysis
3.3.2. Dictionary Expansion Using Word Embedding
3.4. Market and Sentiment Data Fusion for Model Prediction
3.5. The Proposed DQN-HTS-EF Model Architectures
3.5.1. SVR Model for Smooth Market
3.5.2. Transformer Models for Moderate-to-Volatile Market
3.5.3. DQN for Adaptive Prediction Selection
4. Results
4.1. Dataset Information
4.2. Performance Validation of Sentiment Scoring
4.2.1. Evaluation Metrics and Results
4.2.2. Sentiment Scoring Comparison and Examples
4.2.3. Cross-Commodity Validation
4.2.4. Regression Analysis of the Sentiment Score - Closing Price Relationship
4.3. Model Performance and Comparison
4.3.1. Evaluation Metrics
4.3.2. Performance Evaluation on CSI 100 Index
4.3.3. Performance Evaluation on Corn Futures
4.3.4. Performance Evaluation on China Unicom Stock
4.3.5. Performance Evaluation on Amazon Stock
4.4. Forecasting Performance Across Time
4.4.1. Prediction Across Time on CSI 100 Index
4.4.2. Prediction Across Time on Corn Futures
4.4.3. Prediction Across Time on China Unicom Stock
4.4.4. Prediction Across Time on Amazon Stock
4.4.5. Statistical Validation
4.5. Further Analysis
4.5.1. SHAP Analysis Sentiment Scores and Model Predictions
4.5.2. Comparison with Alternative Ensemble Strategies
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
| AMZN | Amazon |
| ARIMA | Autoregressive Integrated Moving Average |
| BiLSTM | Bidirectional Long Short-Term Memory |
| BO | Bayesian Optimization |
| CEEMDAN | Complete Ensemble Empirical Mode Decomposition with Adaptive Noise |
| CNN | Convolutional Neural Network |
| CSI | China Securities Index |
| CST | China Standard Time |
| DRL | Deep Reinforcement Learning |
| DQN | Deep Q-Network |
| DQN-HTS-EF | DQN-Hybrid Transformer-SVR Ensemble framework |
| ECA | Efficient Channel Attention |
| FIVMD | Fast Iterative Variational Mode Decomposition |
| FN | False Negatives |
| FP | False Positives |
| GARCH | Generalized Autoregressive Conditional Heteroskedasticity |
| GC-CNN | Graph Convolutional Neural Network |
| GRU | Gated Recurrent Unit |
| GWO | Grey Wolf Optimizer |
| LSTM | Long Short-Term Memory |
| MA | Moving Average |
| MAE | Mean Absolute Error |
| MAPE | Mean Absolute Percentage Error |
| MDPI | Multidisciplinary Digital Publishing Institute |
| MLP | Multilayer Perceptron |
| MSE | Mean Square Error |
| NMSE | Negative Mean Squared Error |
| NLP | Natural Language Processing |
| PPO | Proximal Policy Optimization |
| regex | Regular Expression |
| RL | Reinforcement Learning |
| RMB | Renminbi Currency |
| RMSE | Root Mean Square Error |
| RNN | Recurrent Neural Network |
| SHAP | SHapley Additive exPlanations |
| SOTA | State-Of-The-Art |
| SSA-BIGRU | Sparrow Search Algorithm-Bidirectional Gated Recurrent Unit |
| SVM | Support Vector Machine |
| SVR | Support Vector Regression |
| TP | True Positives |
| USD | US Dollar |
| VMD-SE-GRU | Variational Mode Decomposition-Squeeze-and-Excitation Gated Recurrent Unit |
References
- Tetlock, P.C. Giving Content to Investor Sentiment: The Role of Media in Stock Markets. J. Finance 2007, 62, 1139–1168. [Google Scholar] [CrossRef]
- Lu, Y. Investor Sentiment and Stock Price Change: Evidence from CSI 500 Index. E-Commerce Lett. 2025, 14, 836–846. [Google Scholar] [CrossRef]
- Box, G.E.; Jenkins, G.M. Time Series Analysis: Forecasting and Control, 1st ed.; Holden-Day: San Francisco, CA, USA, 1970. [Google Scholar]
- Bollerslev, T. Generalized Autoregressive Conditional Heteroskedasticity. J. Econometrics 1986, 31, 307–327. [Google Scholar] [CrossRef]
- Lin, Y.; et al. Forecasting the Realized Volatility of Stock Price Index: A Hybrid Model Integrating CEEMDAN and LSTM. Expert Syst. Appl. 2022, 206, 117736. [Google Scholar] [CrossRef]
- Wang, Y.; et al. A Study of Futures Price Forecasting with a Focus on the Role of Different Economic Markets. Information 2024, 15, 817. [Google Scholar] [CrossRef]
- Li, J.; Zhang, H.; Wang, Y.; et al. A Novel Secondary Decomposition Method for Forecasting Crude Oil Price with Twitter Sentiment. Energy 2023, 268, 126345. [Google Scholar] [CrossRef]
- Xu, Y.; Cohen, S.B. Stock Movement Prediction from Tweets and Historical Prices. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Melbourne, Australia, 15–20 July 2018; Association for Computational Linguistics: Stroudsburg, PA, USA, 2018; pp. 1970–1979. [Google Scholar]
- Chen, W.; Jiang, M.; Zhang, W.-G.; Chen, Z. A Novel Graph Convolutional Feature Based Convolutional Neural Network for Stock Trend Prediction. Inf. Sci. 2021, 556, 67–94. [Google Scholar] [CrossRef]
- Kabir, M.R.; Bhadra, D.; Ridoy, M.; Milanova, M. LSTM–Transformer-Based Robust Hybrid Deep Learning Model for Financial Time Series Forecasting. Sci 2025, 7, 7. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.; Polosukhin, I. Attention Is All You Need. Advances in Neural Information Processing Systems 2017, 30, 5998–6008. [Google Scholar]
- Tsantekidis, A.; Li, Y.; Zhang, X.; et al. Diversity-Driven Knowledge Distillation for Financial Trading Using Deep Reinforcement Learning. Neural Networks 2021, 140, 249–263. [Google Scholar] [CrossRef] [PubMed]
- Wang, J.; Liu, J.; Jiang, W. An Enhanced Interval-Valued Decomposition Integration Model for Stock Price Prediction Based on Comprehensive Feature Extraction and Optimized Deep Learning. Expert Syst. Appl. 2023, 243, 122891. [Google Scholar] [CrossRef]
- Mahmoodzadeh, A.; Nejati, H.R.; Mohammadi, M.; Ibrahim, H.H.; Rashidi, S.; Rashid, T.A. Forecasting Tunnel Boring Machine Penetration Rate Using LSTM Deep Neural Network Optimized by Grey Wolf Optimization Algorithm. Expert Syst. Appl. 2022, 209, 118303. [Google Scholar] [CrossRef]
- Li, Z.Q.; Li, D.S.; Sun, T.S. A Transformer-Based Bridge Structural Response Prediction Framework. Sensors 2022, 22, 3100. Shen, B.; Yang, S.; Gao, X.; Li, S.; Ren, S.; Chen, H. A Novel CO₂-EOR Potential Evaluation Method Based on BO-LightGBM Algorithms Using Hybrid Feature Mining. SSRN Electron. J. 2022, 222, 211427. [CrossRef]
- Hochreiter, S.; Schmidhuber, J. Long Short-Term Memory. Neural Computation 1997, 9, 1735–1780. [Google Scholar] [CrossRef] [PubMed]
- Cho, K.; Van Merriënboer, B.; Gulcehre, C.; Bahdanau, D.; Bougares, F.; Schwenk, H.; Bengio, Y. Learning Phrase Representations Using RNN Encoder-Decoder for Statistical Machine Translation. arXiv 2014. [Google Scholar] [CrossRef]
- Connor, J.; Martin, R.; Atlas, L. Recurrent Neural Networks and Robust Time Series Prediction. IEEE Trans. Neural Netw. 1994, 5, 240–254. [Google Scholar] [CrossRef] [PubMed]
- Graves, A.; Schmidhuber, J. Framewise Phoneme Classification with Bidirectional LSTM and Other Neural Network Archi-tectures. Neural Netw. 2005, 18, 602–610. [Google Scholar] [CrossRef] [PubMed]
- Xu, Y.; Chhim, L.; Zheng, B.; Nojima, Y. Stacked Deep Learning Structure with Bidirectional Long-Short Term Memory for Stock Market Prediction. In Neural Computing for Advanced Applications, Kyoto, Japan, 12–14 October 2020; Springer: Cham, Switzerland, 2020; pp. 33–44. [Google Scholar]
- Nelson, D.M.Q.; Pereira, A.C.M.; de Oliveira, R.A. Stock Market’s Price Movement Prediction with LSTM Neural Net-works. In Proceedings of the 2017 International Joint Conference on Neural Networks (IJCNN), Anchorage, AK, USA, 14–19 May 2017; IEEE: New York, NY, USA, 2017; pp. 1419–1426. [Google Scholar]
- Zhang, S.; Luo, J.; Wang, S.; Liu, F. Oil Price Forecasting: A Hybrid GRU Neural Network Based on Decomposition–Reconstruction Methods. Expert Syst. Appl. 2023, 218, 119617. [Google Scholar] [CrossRef]
- Chen, Y.; Fang, R.; Liang, T.; Sha, Z.; Li, S.; Yi, Y.; Zhou, W.; Song, H. Stock Price Forecast Based on CNN-BiLSTM-ECA Model. Sci. Program. 2021, 2021, 2446543. [Google Scholar] [CrossRef]
- Loughran, T.; McDonald, B. When Is a Liability Not a Liability? J. Finance 2011, 66, 35–68. [Google Scholar] [CrossRef]
- Umer, M.; Awais, M.; Muzammul, M. Stock Market Prediction Using Machine Learning (ML) Algorithms. ADCAIJ Adv. Distrib. Comput. Artif. Intell. J. 2019, 8, 97–116. [Google Scholar] [CrossRef]
- Omoware, J.M.; Abiodun, O.J.; Wreford, A.I. Predicting Stock Series of Amazon and Google Using Long Short-Term Memory (LSTM). Asian Res. J. Curr. Sci. 2023, 5, 205–217. [Google Scholar]
- Mnih, V.; Kavukcuoglu, K.; Silver, D.; et al. Human-Level Control through Deep Reinforcement Learning. Nature 2015, 518, 529–533. [Google Scholar] [CrossRef] [PubMed]
- Brown T; et al. Language Models are Few-shot Learners, Advances in Neural Information Processing Systems, Virtual Conference, Dec. 2020, Vol. 33, pp. 1877-1901.
- Fitria, T.N. QuillBot as an online tool: Students’ alternative in paraphrasing and rewriting of English writing Englisia. J. Lang. Educ. Humanit. 2021, 9, 183–196. [Google Scholar] [CrossRef]
- Arshed, M.A.; Gherghina, Ș.C.; Dur-E-Zahra; Manzoor, M. Prediction of Machine-Generated Financial Tweets Using Ad-vanced Bidirectional Encoder Representations from Transformers. Electronics 2024, 13, 2222. [Google Scholar] [CrossRef]
- Sun, F.; Belatreche, A.; Coleman, S.; McGinnity, T.M. Pre-Processing Online Financial Text for Sentiment Classification: A Natural Language Processing Approach. In IEEE Computational Intelligence for Financial Engineering and Economics 2014, London, UK, 21–23 April 2014; IEEE: New York, NY, USA, 2014. [Google Scholar] [CrossRef]
- Mikolov, T.; Chen, K.; Corrado, G.; Dean, J. Efficient Estimation of Word Representations in Vector Space. International Con-ference on Learning Representations, Scottsdale, Arizona, USA, May 2013, pp. 1–12.
- Yan, R.; Jin, J.; Han, K. Reinforcement Learning for Deep Portfolio Optimization. Electronic Research Archive 2024, 32, 5176–5200. [Google Scholar] [CrossRef]
- Nayak, G.H.H.; Patra, M.R.; Swain, R.K. Transformer-Based Deep Learning Architecture for Time Series Forecasting. Softw. Impacts 2024, 22, 100716. [Google Scholar] [CrossRef]
- Mnih, V.; Kavukcuoglu, K.; Silver, D.; Graves, A.; Antonoglou, I.; Wierstra, D.; Riedmiller, M. Playing Atari with Deep Rein-forcement Learning, Neural Information Processing Systems Deep Learning Workshop 2013, pp. 1–9.
- Eastmoney Stock Bar. Available online: https://guba.eastmoney.com/ (accessed on 19 June 2025).
- Jieba Documentation. Available online: https://github.com/fxsjy/jieba (accessed on 19 June 2025).
- Li, S.; Zhao, Z.; Hu, R.; Li, W.; Liu, T.; Du, X. Analogical Reasoning on Chinese Morphological and Semantic Relations. Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers) 2018, Volume 2, 138–143, Melbourne, Australia; Association for Computational Linguistics: 2018. URL: https://aclanthology.org/P18-2023/. [CrossRef]
- Maslyuk-Escobedo, S.; Rivera-López, A.; Suárez-Bastida, J.A. News Sentiment and Jumps in Energy Spot and Futures Markets. Pacific-Basin Finance J. 2016, 38, 228–250. [Google Scholar] [CrossRef]
- Sen, D.; Deora, B.S.; Vaishnav, A. Explainable Deep Learning for Time Series Analysis: Integrating SHAP and LIME in LSTM-Based Models. J. Inf. Syst. Eng. Manag. 2025, 10. e-ISSN: 2468-4376. [Google Scholar] [CrossRef]
- Hu, J.; Cen, Y.; Wu, C. Automatic Construction of Domain Sentiment Dictionary Based on Deep Learning: A Case Study of Financial Domain. Data Analysis and Knowledge Discovery 2018, 2, 95–102. [Google Scholar] [CrossRef]






| Commodities | Related Works for the Dataset |
Start Date and End Date |
Train Test Split Ratio |
Test Data Duration |
Important Global Events During Test Period |
|---|---|---|---|---|---|
| CSI 100 Stock Index | [13] | 2024.01.02– 2024.12.31 |
Russia–Ukraine war | ||
| Corn Futures | [6] | 2020.01.01– 2024.12.31 |
80%:20% (969:243) |
||
| China Unicom Stock | [10] | ||||
| AMZN Stock | [10] | 2017.05.25– 2023.04.05 |
70%:30% (1034:442) |
2021.07.06– 2023.04.05 |
COVID-19 pandemic |
| Commodities | Number of Forum Titles |
Number of Positive Labels (%) |
Number of Negative Labels (%) |
Overall Accuracy (%) |
|---|---|---|---|---|
| CSI 100 Stock Index | 92,184 | 52.57 (48,459) | 9.52 (8,774) | 97.00 |
| Corn Futures | 135,110 | 42.23 (57,055) | 15.75 (21,285) | 97.35 |
| China Unicom Stock | 153,023 | 53.91 (82,491) | 11.12 (16,857) | 97.16 |
| AMZN Stock | 7,382 | 77.43 (5,716) | 6.18 (456) | 90.53 |
| Dataset with Sentiment Score |
Regression Coefficient (Constant) |
Regression Coefficient (Sentiment Score) |
t-value (Constant) |
t-value (Sentiment Score) |
|---|---|---|---|---|
| CSI 100 Stock Index | 6382.353 | 26.888 | 59.624 | 0.105 |
| Corn Futures | 2631.048 | -327.564 | 132.487 | -4.703 |
| China Unicom Stock | 4.541 | -0.488 | 53.235 | -2.450 |
| AMZN Stock | 98.443 | 26.526 | 59.057 | 9.910 |
| Model | MAPE | RMSE | MAE |
|---|---|---|---|
| SVR [13] | 10.9925 | 469.6172 | 393.2344 |
| GRU [13] | 7.8870 | 415.6537 | 353.2755 |
| LSTM [13] | 7.0536 | 382.5686 | 313.8541 |
| FIVMD-LSTM [13] | 2.772 | 154.6032 | 116.5628 |
| GWO-LSTM [14] | 6.0828 | 326.4571 | 265.3836 |
| CEEMDAN-LSTM [5] | 5.2485 | 296.3123 | 233.4450 |
| SSA-BIGRU [2] | 13.6878 | 545.2107 | 501.1394 |
| VMD-SE-GRU [22] | 3.316 | 192.8174 | 148.9184 |
| Proposed DQN-HTS-EF | 2.027 | 148.7959 | 106.9365 |
| Model | MAPE | RMSE | MAE |
|---|---|---|---|
| TCN [6] | 2.532 | 85.720 | 70.128 |
| GRU [6] | 2.347 | 78.946 | 65.015 |
| LSTM [6] | 2.093 | 74.215 | 59.657 |
| SCINet [6] | 1.634 | 55.404 | 45.190 |
| Proposed DQN-HTS-EF | 1.075 | 30.835 | 24.826 |
| Model | MSE | RMSE | MAE |
|---|---|---|---|
| CNN [9] | 0.037 | 0.193 | 0.134 |
| LSTM [18] | 0.036 | 0.189 | 0.128 |
| BiLSTM [19] | 0.035 | 0.189 | 0.132 |
| CNN-LSTM [23] | 0.030 | 0.174 | 0.110 |
| CNN-BiLSTM [23] | 0.029 | 0.170 | 0.110 |
| BiLSTM-ECA [23] | 0.039 | 0.198 | 0.142 |
| CNN-LSTM-ECA [23] | 0.032 | 0.180 | 0.127 |
| CNN-BiLSTM-ECA [23] | 0.028 | 0.167 | 0.103 |
| LSTM-mTrans-MLP [10] | 0.018 | 0.133 | 0.092 |
| Proposed DQN-HTS-EF | 0.012 | 0.108 | 0.075 |
| Model | MAE | MSE | RMSE |
|---|---|---|---|
| Linear regression [25] | 72.47 | 7231.59 | 85.04 |
| Exponential Smoothing [8] | 16.62 | 363.83 | 19.074 |
| LSTM [26] | 14.97 | 418.97 | 20.468 |
| CNN-BiLSTM [23] | 4.518 | 28.478 | 5.336 |
| Proposed DQN-HTS-EF | 4.335 | 28.018 | 5.293 |
| Dataset | Sentiment Score SHAP Importance |
Dominant Model (Highest SHAP Importance) |
Dominant Model SHAP Importance |
|---|---|---|---|
| CSI 100 Stock Index | 0.0378 | Multi-Transformer | 0.1687 |
| Corn Futures | 0.003 | Bi-Transformer | 0.2289 |
| China Unicom Stock | 0.0088 | SVR | 0.1186 |
| AMZN Stock | 0.0367 | Multi-Transformer and SVR (Tied) |
1.5589 / 1.5510 |
| Dataset | Proposed DQN-HTS-EF |
Arithmetic Mean | Weighted Average |
Directional Voting |
|---|---|---|---|---|
| CSI 100 Stock Index | 0.0015 | 0.0087 | 0.0020 | 0.0140 |
| Corn Futures | 0.0008 | 0.0018 | 0.0011 | 0.0036 |
| China Unicom Stock | 0.0117 | 0.0196 | 0.0146 | 0.0287 |
| AMZN Stock | 0.0018 | 0.0025 | 0.0024 | 0.0033 |
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/).