Enhancing stock price forecasting via multi-task learning framework incorporating transformer
Abstract
Stock price prediction is a critical task in financial decision-making, providing essential insights for investors, institutions, and policymakers. Despite significant progress, existing models face two primary limitations: (i) insufficient integration of trading volume as a dynamic component, and (ii) limited capacity of conventional deep learning architectures to capture long-range temporal dependencies. To address these challenges, we propose a novel prediction framework that combines a Transformer-based architecture with a multi-task learning strategy. The model leverages the Transformer’s self-attention mechanism to effectively model complex temporal dependencies in both stock price and trading volume sequences. By introducing trading volume prediction as an auxiliary task, the framework enables joint learning of the evolving dynamics between price and trading activity. This design enhances the model’s representational power and improves forecasting accuracy. Extensive experiments on real-world financial datasets demonstrate that our approach consistently outperforms strong baseline methods, validating its effectiveness in capturing complex dependencies and integrating multiple financial signals.