Abstract
Financial time series prediction requires researchers to detect dynamic market indicator relationships while also predicting short-term market trends that are either positive or negative. Conventional LSTM (cLSTM) models face limitations when identifying multiple complex relationships between their input data points. Our work adds Price-to-Earnings (PE) and Price-to-Book (PB), Volatility Index (VIX), and Sentiment Score to the standard Open, Close, Volume features to enhance prediction accuracy levels. We introduce two enhanced Extended Long Short-Term Memory (xLSTM) architectures: (i) xLSTMcg, which implements cross-gating, and (ii) xLSTMeg, which employs exponential gating to improve information flow between feature channels. We compare categorical versus feature-based loss functions and apply ensemble techniques—bagging, boosting, and stacking—to optimize our bidirectional fused models. Furthermore, our study also evaluates the stability of models on validation dataset. The bidirectional configurations produced superior results compared to unidirectional configuration by 2% to 3%. Through the experiment, xLSTMeg model achieved 86.2% accuracy, but when combined within a stacking ensemble, yielded an accuracy of 91.2% with area-under-the-curve (AUC) of 0.95. The obtained results of xLSTMeg showed better performance than both cLSTM and xLSTMcg models. Additionally, our study meets regulatory standards by maintaining less than a 5% performance difference between experimental and external validation dataset. Integrating advanced gating mechanisms with ensemble fusion significantly enhances LSTM-based financial forecasts, delivering robust performance under varied market conditions. This framework lays a solid foundation for future market-forecasting research and supports more effective trading decisions and risk-management strategies.













Similar content being viewed by others
Data avaliability
The data used in this manuscript is proprietary to AtheroPoint LLC, and is not publicly available.
Abbreviations
- ACCU:
-
Accuracy
- AUC:
-
Area-under-the-curve
- AUGU:
-
Augmentation
- Bi:
-
Bi-directional
- CL:
-
Categorical Cross-Entropy Loss
- CLSTM:
-
Conventional Long Short-Term Memory
- DL:
-
Deep Learning
- EDL:
-
Ensemble Deep Learning
- EML:
-
Ensemble Machine Learning
- ET:
-
Extra Trees
- F1:
-
F1-Score
- FL:
-
Feature Loss
- GB:
-
Gradient Boosting
- GNB:
-
Gaussian Naïve Baise
- LR:
-
Linear Regression
- LSTM:
-
Long Short-Term Memory
- MoE:
-
Margin of Error
- NSE:
-
National Stock Exchange
- P/B:
-
Price to Book ratio
- P/E:
-
Price to Earnings Ratio
- PA:
-
Power Analysis
- PREC:
-
Precision
- RF:
-
Random Forest
- RNN:
-
Recurrent Neural Network
- ROC:
-
Receiver Operator Characteristic
- SENS:
-
Sensitivity
- SML:
-
Solo Machine Learning
- SMOTE:
-
Synthetic Minority Oversampling Technique
- SVM:
-
Support Vector Machine
- Uni:
-
Uni-directional
- VADAR:
-
Valence Aware Dictionary and sEntiment Reasoner
- VIX:
-
Volatility Index
- xLSTMcg:
-
Extended Long Short-Term Memory with Cross Gates
- xLSTMeg:
-
Extended Long Short-Term Memory with exponential Gates
- L CL :
-
Categorical Cross-Entropy Loss
- N:
-
Total number of samples
- yᵢ:
-
Ground truth label for sample i
- aᵢ:
-
Predicted probability
- ŷ i :
-
Predicted feature value for sample
- y i true :
-
Ground truth feature value for sample i
- xₜ:
-
New input on time t
- iₜ:
-
Input Gate on time t
- fₜ:
-
Forgot Gate on time t
- cₜ₋₁:
-
Memory before time t
- Wx:
-
Learning weight matrices for the state x
- B:
-
Bias
- ⨀:
-
Element wise-multiplication
- cₜ:
-
Current memory
- oₜ:
-
Output Gate at time t
- σ:
-
Sigmoid Function
- hₜ:
-
Hidden State
- tan:
-
Tangent Function
- (i):
-
Represent the i th cell
- ĉₜ:
-
Candidate cell state
- Cross:
-
Cross influence
- exp:
-
Exponential Function
- TPd:
-
True Positives for Deep Learning
- TNd:
-
True Negative for Deep Learning
- FPd:
-
False Positives for Deep Learning
- FNd:
-
False Negative for Deep Learning
- AUC:
-
Area-under-the-curve
- ∫(t):
-
Integral Function at time t
References
Agarwal A, Vats S, Agarwal R, Ratra A, Sharma V, Gopal L (2023) Sentiment Analysis in Stock Price Prediction: A Comparative Study of Algorithms, in 2023 10th International Conference on Computing for Sustainable Global Development (INDIACom), pp. 1403–1407. [Online]. Available: https://ieeexplore.ieee.org/abstract/document/10112565 Accessed: Feb. 17, 2025.
Beck M, et al. (2024) xLSTM: Extended Long Short-Term Memory, arXiv. https://doi.org/10.48550/ARXIV.2405.04517.
Bhatt S, Ghazanfar M, Amirhosseini M (2023b) Sentiment-driven cryptocurrency price prediction: a machine learning approach utilizing historical data and social media sentiment analysis. Machine Learning and Appl: an Int J (MLAIJ) 10(2/3):2/3. https://doi.org/10.5121/mlaij.2023.10301
Bhatt S, Ghazanfar M, Amirhosseini M (2023) Machine Learning based Cryptocurrency Price Prediction using historical data and Social Media Sentiment, in Computer Science & Information Technology (CS & IT), Sydney, Australia: AIRCC Publishing Corporation, pp. 1–11. [Online]. Available: https://aircconline.com/csit/abstract/v13n10/csit131001.html Accessed: Feb. 17, 2025.
Biswas M et al (2019) State-of-the-art review on deep learning in medical imaging. Front Biosci (Landmark Ed) 24(3):392–426. https://doi.org/10.2741/4725
Business News Today: Read Latest Business news, India Business News Live, Share Market & Economy News | The Economic Times. [Online]. Available: https://economictimes.indiatimes.com/?from=mdr Accessed: Apr. 29, 2025.
Campisi G, Muzzioli S, De Baets B (2024) A comparison of machine learning methods for predicting the direction of the US stock market on the basis of volatility indices. Int J Forecast 40(3):869–880. https://doi.org/10.1016/j.ijforecast.2023.07.002
Chen Z, Li C, Sun W (2020) Bitcoin price prediction using machine learning: an approach to sample dimension engineering. J Comput Appl Math 365:112395. https://doi.org/10.1016/j.cam.2019.112395
Cheng Z et al. (2020) Refined Gate: A Simple and Effective Gating Mechanism for Recurrent Units, arXiv. https://doi.org/10.48550/ARXIV.2002.11338.
Daradkeh MK (2022) A hybrid data analytics framework with sentiment convergence and multi-feature fusion for stock trend prediction. Electronics 11(2):250. https://doi.org/10.3390/electronics11020250
Department of Finance, Henry W. Bloch School of Management, University of Missouri,Kansas City, USA and Z. Ahmadirad, “The Effects of Bitcoin ETFs on Traditional Markets: A Focus on Liquidity, Volatility, and Investor Behavior,” rr, Jul. 2024, https://doi.org/10.52845/currentopinion.v4i3.317.
Deng Y, Bao F, Kong Y, Ren Z, Dai Q (2017) Deep direct reinforcement learning for financial signal representation and trading. IEEE Trans Neural Netw Learn Syst 28(3):653–664. https://doi.org/10.1109/tnnls.2016.2522401
Deshmukh Y, Saratkar D, Tiwari Y (2019) Stock market prediction using machine learning. Int J Advanced Res in Comput Commun Engineer 8(1):31–35. https://doi.org/10.17148/IJARCCE.2019.8107
Dubey AK et al (2023) Ensemble deep learning derived from transfer learning for classification of COVID-19 patients on hybrid deep-learning-based lung segmentation: a data augmentation and balancing framework. Diagnostics (Basel) 13(11):1954. https://doi.org/10.3390/diagnostics13111954
Dudek G, Pelka P, Smyl S (2022) A hybrid residual dilated LSTM and exponential smoothing model for midterm electric load forecasting. IEEE Trans Neural Netw Learning Syst 33(7):2879–2891. https://doi.org/10.1109/TNNLS.2020.3046629
Erdfelder E, Faul F, Buchner A (1996) GPOWER: a general power analysis program. Behav Res Methods Instrum Comput 28(1):1–11. https://doi.org/10.3758/BF03203630
Gers FA, Schmidhuber J, Cummins F (2000) Learning to forget: continual prediction with LSTM. Neural Comput 12(10):2451–2471. https://doi.org/10.1162/089976600300015015
Gunawan AEK, Wibowo A (2023) Stock price movement classification using ensembled model of long short-term memory (LSTM) and random forest (RF). JOIV : Int J Inform Visualization 7(4):2255. https://doi.org/10.62527/joiv.7.4.1640
Haarnoja T, Zhou A, Abbeel P, Levine S (2018) Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor, arXiv. https://doi.org/10.48550/ARXIV.1801.01290.
Henrique BM, Sobreiro VA, Kimura H (2019) Literature review: machine learning techniques applied to financial market prediction. Expert Syst Appl 124:226–251. https://doi.org/10.1016/j.eswa.2019.01.012
Johri AM et al (2022) Deep learning artificial intelligence framework for multiclass coronary artery disease prediction using combination of conventional risk factors, carotid ultrasound, and intraplaque neovascularization. Comput Biol Med 150:106018. https://doi.org/10.1016/j.compbiomed.2022.106018
Khanna NN et al (2022) Cardiovascular/stroke risk stratification in diabetic foot infection patients using deep learning-based artificial intelligence: an investigative study. JCM 11(22):6844. https://doi.org/10.3390/jcm11226844
Konstantonis G et al (2022) Cardiovascular disease detection using machine learning and carotid/femoral arterial imaging frameworks in rheumatoid arthritis patients. Rheumatol Int 42(2):215–239. https://doi.org/10.1007/s00296-021-05062-4
Koukaras P, Nousi C, Tjortjis C (2022) Stock market prediction using microblogging sentiment analysis and machine learning. Telecom 3(2):2. https://doi.org/10.3390/telecom3020019
Kuang P-C (2021) Measuring information flow among international stock markets: an approach of entropy-based networks on multi time-scales. Physica A Stat Mech Appl 577:126068. https://doi.org/10.1016/j.physa.2021.126068
Lacasta A, Morales-Hernández M, Brufau P, García-Navarro P (2014) Simulation of PID control applied to irrigation channels. Procedia Eng 70:978–987. https://doi.org/10.1016/j.proeng.2014.02.109
Landi F, Baraldi L, Cornia M, Cucchiara R (2021) Working memory connections for LSTM. Neural Netw 144:334–341. https://doi.org/10.1016/j.neunet.2021.08.030
Lei K, Zhang B, Li Y, Yang M, Shen Y (2020) Time-driven feature-aware jointly deep reinforcement learning for financial signal representation and algorithmic trading. Expert Syst Appl 140:112872. https://doi.org/10.1016/j.eswa.2019.112872
Lu Y, Salem FM (2017) Simplified gating in long short-term memory (LSTM) recurrent neural networks, in 2017 IEEE 60th International Midwest Symposium on Circuits and Systems (MWSCAS), Boston, MA, USA: IEEE. pp. 1601–1604. https://doi.org/10.1109/MWSCAS.2017.8053244.
Maqbool J, Aggarwal P, Kaur R, Mittal A, Ganaie IA (2023) Stock prediction by integrating sentiment scores of financial news and MLP-regressor: a machine learning approach. Procedia Comput Sci 218:1067–1078. https://doi.org/10.1016/j.procs.2023.01.086
Merikhipour M, Khanmohammadidoustani S, Abbasi M (2025) Transportation mode detection through spatial attention-based transductive long short-term memory and off-policy feature selection. Expert Syst Appl 267:126196. https://doi.org/10.1016/j.eswa.2024.126196
Mnih V et al (2015) Human-level control through deep reinforcement learning. Nature 518(7540):529–533. https://doi.org/10.1038/nature14236
Nabi RM, Saeed SAM, Harron H (2020) A novel approach for stock price prediction using gradient boosting machine with feature engineering (GBM-wFE). Kurdistan J Appl Res 5(1):1. https://doi.org/10.24017/science.2020.1.3
Nabipour M, Nayyeri P, Jabani H, Mosavi SSA (2020) Predicting stock market trends using machine learning and deep learning algorithms via continuous and binary data; a comparative analysis. IEEE Access 8:150199–150212. https://doi.org/10.1109/ACCESS.2020.3015966
N. S. E. India, “NSE - National Stock Exchange of India Ltd,” NSE India. [Online]. Available: https://www.nseindia.com Accessed: Apr. 29, 2025.
Odusami BO, Akinsomi O (2024) Diversifying and hedging REIT portfolios with cryptocurrencies: evidence from global and regional REIT indices. Int Rev Financ Anal 94:103329. https://doi.org/10.1016/j.irfa.2024.103329
Patel J, Shah S, Thakkar P, Kotecha K (2015) Predicting stock and stock price index movement using trend deterministic data preparation and machine learning techniques. Expert Syst Appl 42(1):259–268. https://doi.org/10.1016/j.eswa.2014.07.040
Paul S et al (2022) Bias investigation in artificial intelligence systems for early detection of Parkinson’s disease: a narrative review. Diagnostics 12(1):166. https://doi.org/10.3390/diagnostics12010166
Qu H, Zhang Z A Time Series Data Augmentation Method based on SMOTE,” in 2024 36th Chinese Control and Decision Conference (CCDC), May 2024, pp. 5336–5341. https://doi.org/10.1109/CCDC62350.2024.10587816.
Saba L et al (2021) Ultrasound-based internal carotid artery plaque characterization using deep learning paradigm on a supercomputer: a cardiovascular disease/stroke risk assessment system. Int J Cardiovasc Imaging 37(5):1511–1528. https://doi.org/10.1007/s10554-020-02124-9
Salton GD, Kelleher JD (2018) Persistence pays off: Paying Attention to What the LSTM Gating Mechanism Persists, 2018, arXiv. https://doi.org/10.48550/ARXIV.1810.04437.
Salem FM (2022) Gated RNN: The Long Short-Term Memory (LSTM) RNN. Recurrent Neural Networks. Springer International Publishing, Cham, pp 71–82. https://doi.org/10.1007/978-3-030-89929-5_4
Sanagala SS et al (2021) Ten fast transfer learning models for carotid ultrasound plaque tissue characterization in augmentation framework embedded with heatmaps for stroke risk stratification. Diagnostics 11(11):2109. https://doi.org/10.3390/diagnostics11112109
Sharaf M, Hemdan EE-D, El-Sayed A, El-Bahnasawy NA (2023) An efficient hybrid stock trend prediction system during COVID-19 pandemic based on stacked-LSTM and news sentiment analysis. Multimed Tools Appl 82(16):23945–23977. https://doi.org/10.1007/s11042-022-14216-w
She J, Gong S, Yang S, Yang H, Lu S (2022) Xigmoid: An Approach to Improve the Gating Mechanism of RNN, in 2022 International Joint Conference on Neural Networks (IJCNN), Padua, Italy: IEEE, pp. 1–10. https://doi.org/10.1109/IJCNN55064.2022.9892346.
Shobayo O, Adeyemi-Longe S, Popoola O, Ogunleye B (2024) Innovative sentiment analysis and prediction of stock price using FinBERT, GPT-4 and logistic regression: a data-driven approach. Big Data Cogn Comput 8(11):11. https://doi.org/10.3390/bdcc8110143
Sinha N, Kumar MAG, Joshi AM, Cenkeramaddi LR (2023) DASmcc: data augmented SMOTE multi-class classifier for prediction of cardiovascular diseases using time series features. IEEE Access 11:117643–117655. https://doi.org/10.1109/ACCESS.2023.3325705
Silver D, Lever G, Heess N, Degris T, Wierstra D, Riedmiller M (2014) Deterministic Policy Gradient Algorithms, in Proceedings of the 31st International Conference on Machine Learning, PMLR, pp. 387–395. [Online]. Available: https://proceedings.mlr.press/v32/silver14.html Accessed: May 01, 2025.
Skandha SS (2020) 3-D optimized classification and characterization artificial intelligence paradigm for cardiovascular/stroke risk stratification using carotid ultrasound-based delineated plaque: Atheromatic™ 2.0. Comput Biol Med 125:103958. https://doi.org/10.1016/j.compbiomed.2020.103958
Skandha SS et al (2022) A hybrid deep learning paradigm for carotid plaque tissue characterization and its validation in multicenter cohorts using a supercomputer framework. Comput Biol Med 141:105131. https://doi.org/10.1016/j.compbiomed.2021.105131
Suri J et al (2022a) COVLIAS 2.0-cXAI: cloud-based explainable deep learning system for COVID-19 lesion localization in computed tomography scans. Diagnostics 12(6):1482. https://doi.org/10.3390/diagnostics12061482
Suri JS et al (2022b) A powerful paradigm for cardiovascular risk stratification using multiclass, multi-label, and ensemble-based machine learning paradigms: a narrative review. Diagnostics 12(3):722. https://doi.org/10.3390/diagnostics12030722
Suri JS et al (2022) Deep learning paradigm for cardiovascular disease/stroke risk stratification in Parkinson’s disease affected by COVID-19: a narrative review. Diagnostics 12(7):1543. https://doi.org/10.3390/diagnostics12071543
Taghian M, Asadi A, Safabakhsh R (2022) Learning financial asset-specific trading rules via deep reinforcement learning. Expert Syst Appl 195:116523. https://doi.org/10.1016/j.eswa.2022.116523
Teji JS, Jain S, Gupta SK, Suri JS (2022) NeoAI 1.0: machine learning-based paradigm for prediction of neonatal and infant risk of death. Comput Biol Med 147:105639. https://doi.org/10.1016/j.compbiomed.2022.105639
Vaswani A et al. (2017) Attention is All you Need, in Advances in Neural Information Processing Systems, Curran Associates, Inc., [Online]. Available: https://proceedings.neurips.cc/paper/2017/hash/3f5ee243547dee91fbd053c1c4a845aa-Abstract.html Accessed: Apr. 17, 2025.
Wang S, Qu Z, Gao L (2024) Multi-spatial pyramid feature and optimizing focal loss function for object detection. IEEE Trans Intell Veh 9(1):1054–1065. https://doi.org/10.1109/TIV.2023.3282996
Weerakody PB, Wong KW, Wang G, Ela W (2021) A review of irregular time series data handling with gated recurrent neural networks. Neurocomputing 441:161–178. https://doi.org/10.1016/j.neucom.2021.02.046
Wei X, Tian Y, Li N, Peng H (2024) Evaluating ensemble learning techniques for stock index trend prediction: a case of China. Port Econ J 23(3):505–530. https://doi.org/10.1007/s10258-023-00246-1
Yang J, Li P, Cui Y, Han X, Zhou M (2025) Multi-sensor temporal fusion transformer for stock performance prediction: an adaptive Sharpe ratio approach. Sensors 25(3):976. https://doi.org/10.3390/s25030976
Yu S et al (2024) Prediction of myocardial infarction using a combined generative adversarial network model and feature-enhanced loss function. Metabolites 14(5):5. https://doi.org/10.3390/metabo14050258
Zhang X, Liu S, Zheng X (2021) Stock price movement prediction based on a deep factorization machine and the attention mechanism. Mathematics 9(8):800. https://doi.org/10.3390/math9080800
Zhang Q, Zhang Y, Yao X, Li S, Zhang C, Liu P (2024) A dynamic attributes-driven graph attention network modeling on behavioral finance for stock prediction. ACM Trans Knowl Discov Data 18(1):1–29. https://doi.org/10.1145/3611311
Zhang H, Sun A, Jing W, Zhen L, Zhou JT, Goh RSM (2021a) Natural Language Video Localization: A Revisit in Span-based Question Answering Framework IEEE Trans Mach. Intell Pattern Anal. https://doi.org/10.1109/TPAMI.2021.3060449
Zhao C, Li F, Peng Z, Zhou X, Zhuge Y (2023) A structured multi-head attention prediction method based on heterogeneous financial data. PeerJ Comput Sci 9:e1653. https://doi.org/10.7717/peerj-cs.1653
Zhong X, Enke D (2019) Predicting the daily return direction of the stock market using hybrid machine learning algorithms. Financ Innov 5(1):24. https://doi.org/10.1186/s40854-019-0138-0
Zhang Q, Liu J, Tian D, Yue H (2021) Application of Stacking ensemble learning in option implied volatility, in 2021 2nd International Conference on Artificial Intelligence and Computer Engineering (ICAICE), Nov. 2021, pp. 623–627. https://doi.org/10.1109/ICAICE54393.2021.00123.
Funding
This research received no external funding.
Author information
Authors and Affiliations
Contributions
Conceptualization: Y.S.; S.G.; N.G.; E.T.; and J.S.S.; resources, Y.S.; S.G. N.G.; N.N.K.; and M.A.M.; and J.S.S.; writing—original draft preparation, Y.S; V.R.; P.A.; V.K.; and S.N.; writing—review and editing Y.S.; N.G.; E.T.; and R.S.; supervision, P.A.; V.K.; S.N.; L.S.; and J.S.S.; All authors have read and agreed to the published version of the manuscript.
Corresponding author
Ethics declarations
Conflict of interests
The authors have no conflicts of interest to declare.
Ethical approval
This article does not contain any studies with human participants or animals performed by any of the authors.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Sharma, Y., Gupta, S., Gupta, N. et al. StockAI 3.0: Ensemble fusion paradigms using novel gating mechanism in long short-term memory architectures for forecasting sentiment-based stock trends. Soft Comput 29, 5803–5829 (2025). https://doi.org/10.1007/s00500-025-10901-8
Received:
Accepted:
Published:
Version of record:
Issue date:
DOI: https://doi.org/10.1007/s00500-025-10901-8