PEN: Prediction-Explanation Network to Forecast Stock Price Movement with Better Explainability

Shuqi Li, Weiheng Liao, Yuhan Chen, Rui YanAAAI 2023 · OpenReview

Abstract

Nowadays explainability in stock price movement prediction is attracting increasing attention in banks, hedge funds and asset managers, primarily due to audit or regulatory reasons. Text data such as financial news and social media posts can be part of the reasons for stock price movement. To this end, we propose a novel framework of Prediction-Explanation Network (PEN) jointly modeling text streams and price streams with alignment. The key component of the PEN model is a shared representation learning module that learns which texts are possibly associated with the stock price movement by modeling the interaction between the text data and stock price data with a salient vector characterizing their correlation. In this way, the PEN model is able to predict the stock price movement by identifying and utilizing abundant messages while on the other hand, the selected text messages also explain the stock price movement. Experiments on real-world datasets demonstrate that we are able to kill two birds with one stone: in terms of accuracy, the proposed PEN model outperforms the state-of-art baseline; on explainability, the PEN model is demonstrated to be far superior to attention mechanisms, capable of picking out the crucial texts with a very high confidence.

Introduction

Predicting stock price movement is notoriously difficult due to the high noise-to-signal ratio in financial markets. While deep learning has improved accuracy, most models remain "black boxes"—they might predict a price drop, but they cannot tell a hedge fund manager why it is happening. In the financial sector, explainability is a regulatory and audit requirement. Existing models often struggle with two primary issues: noise from irrelevant chatter in financial text data (like Twitter or Reddit) and alignment, where standard attention mechanisms fail to capture the specific interaction between a piece of news and a subsequent price swing. The Prediction-Explanation Network (PEN) aims to bridge the gap between high-performance models and the need for interpretable, evidence-based financial decisions.

Methodology

The core of the PEN framework is a multi-stage architecture designed to align textual information with market volatility.

The high-level architecture of the PEN framework, illustrating the flow from input streams to prediction outputs.

As shown in Figure 1, the model consists of four main stages:

  1. Shared Representation Learning (SRL): This is the primary innovation. Unlike standard models that process text and price separately, the SRL module models their interaction. It produces a Vector of Salience (VoS)—a weighting system that identifies which specific texts are "salient" (relevant) to the price movement. Within the SRL, a Text Selection Unit (TSU) filters out unimportant messages, while a Text Memory Unit (TMU) helps the model "remember" past news that might still be influencing the market.
  2. Bi-GRU Embedding: This stage processes text inputs to create dense vector representations that capture temporal dependencies in the message corpora.
  3. Deep Recurrent Generation (DRG): To account for the inherent randomness (stochasticity) of the stock market, the authors use a Recurrent Variational Auto-Encoder (VAE). This allows the model to infer latent variables that represent market uncertainty.
  4. Temporal Attention Prediction (TAP): This final stage utilizes a salient regulator—a specific loss function designed to force the model to be "decisive." Instead of spreading attention thinly across many texts, the regulator encourages the model to concentrate its weights on a tiny subset of key information, mimicking how human investors focus on major headlines.

Key Results and Evaluation

The model was evaluated on two distinct real-world datasets: ACL18 (historical prices and Twitter data for 88 US stocks) and DJIA (Dow Jones Industrial Average index using top 25 Reddit WorldNews headlines).

Performance comparison (Accuracy and MCC) of PEN vs. Stocknet across different salient regulator values (λt) on ACL18 and DJIA datasets.

Superior Accuracy

As illustrated in Figure 5, PEN consistently outperforms the state-of-the-art Stocknet baseline. PEN achieved a peak accuracy of 59.89% on ACL18 and 60.51% on DJIA. The results demonstrate that the salient regulator ($\\lambda_t$) effectively balances prediction performance and information concentration.

Human-Level Explainability

In a blind test with three experienced investors, PEN’s top-weighted texts matched human "top picks" 89.3% of the time (Ratio of Relevance), compared to only 54.8% for the previous state-of-the-art attention model (HAN). Furthermore, the model's "Ratio of Top Two" (RTT) was 99.5%, meaning that in nearly every case, the model's prediction was driven by just the top two news items, providing a clear "smoking gun" for its reasoning.

Conclusion

PEN demonstrates that decisiveness in model attention leads to better explainability without sacrificing performance. By forcing the model to pick just one or two salient texts, the researchers made the model's reasoning much easier for human auditors to verify. Future work may explore scaling the SRL module for higher text volumes and integrating more diverse data sources like earnings call transcripts to deepen semantic understanding.

Summary updated

Abstract

Nowadays explainability in stock price movement prediction is attracting increasing attention in banks, hedge funds and asset managers, primarily due to audit or regulatory reasons. Text data such as financial news and social media posts can be part of the reasons for stock price movement. To this end, we propose a novel framework of Prediction-Explanation Network (PEN) jointly modeling text streams and price streams with alignment. The key component of the PEN model is an shared representation learning module that learns which texts are possibly associated with the stock price movement by modeling the interaction between the text data and stock price data with a salient vector characterizing their correlation. In this way, the PEN model is able to predict the stock price movement by identifying and utilizing abundant messages while on the other hand, the selected text messages also explain the stock price movement. Experiments on real-world datasets demonstrate that we are able to kill two birds with one stone: in terms of accuracy, the proposed PEN model outperforms the state-of-art baseline; on explainability, the PEN model are demonstrated to be far superior to attention mechanism, capable of picking out the crucial texts with a very high confidence.
BibTeX
@inproceedings{li2023pen,
  author = {Shuqi Li and Weiheng Liao and Yuhan Chen and Rui Yan},
  title = {{PEN: Prediction-Explanation Network to Forecast Stock Price Movement with Better Explainability}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2023},
  url = {https://openreview.net/forum?id=18flgYiv0N},
}
Figure