HybridFinOracle: A Gated-Fusion Deep Learning Framework for Directional Stock Return Prediction on the Tehran Stock Exchange

Main Article Content

Marzieh Bagherinia Amiri, Heshaam Faili

Abstract

This study introduces HybridFinOracle, a novel hybrid deep learning framework designed to enhance the directional prediction of stock returns on the Tehran Stock Exchange (TSE). Leveraging a comprehensive dataset spanning January 1, 2014, to December 31, 2024, our approach fuses structured financial indicators with qualitative textual information through two dedicated processing streams. The Integrated Time-Series Stream ingests a 30-day sequence of normalized OHLCV data and a set of key, effective technical indicators, alongside 30-day trend and residual vectors derived via classical time-series decomposition. Simultaneously, the NLP Stream processes relevant news texts from the preceding 7 calendar days—collected from 10 leading and widely trusted Persian-language news platforms—filtered by a zero-shot Llama-3 classifier for general and stock-specific impact, and encodes them using a pre-trained ParsBERT-based model, with document embeddings aggregated via global max pooling. A gated fusion mechanism dynamically weights these modalities before final dense layers, while Monte Carlo Dropout provides uncertainty estimates. Hyperparameters are optimized with Bayesian methods (Optuna) to maximize AUC-ROC and F1-score. Empirical evaluation on an unseen test set (10,000 stock-day observations) yields 76.2% directional accuracy and an AUC of 0.835, showing approximately 12% improvement in accuracy over the best baseline model (LSTM), and significantly outperforming logistic regression, SVM, and random-walk baselines. These results demonstrate the framework’s capability to capture complex temporal patterns, market regimes, and sentiment signals, offering a scalable solution for more accurate and robust financial forecasting.

Article Details

Section
Articles