Paper: arXiv 2402.03659
Abstract
Explaining stock predictions is generally a difficult task for traditional non-generative deep learning models, where explanations are limited to visualizing the attention weights on important texts. Today, Large Language Models (LLMs) present a solution to this problem, given their known capabilities to generate human-readable explanations for their decision-making process. However, the task of stock prediction remains challenging for LLMs, as it requires the ability to weigh the varying impacts of chaotic social texts on stock prices. The problem gets progressively harder with the introduction of the explanation component, which requires LLMs to explain verbally why certain factors are more important than the others. On the other hand, to fine-tune LLMs for such a task, one would need expert-annotated samples of explanation for every stock movement in the training set, which is expensive and impractical to scale. To tackle these issues, we propose our Summarize-Explain-Predict (SEP) framework, which utilizes a self-reflective agent and Proximal Policy Optimization (PPO) to let a LLM teach itself how to generate explainable stock predictions in a fully autonomous manner. The reflective agent learns how to explain past stock movements through self-reasoning, while the PPO trainer trains the model to generate the most likely explanations from input texts. The training samples for the PPO trainer are also the responses generated during the reflective process, which eliminates the need for human annotators. Using our SEP framework, we fine-tune a LLM that can outperform both traditional deep-learning and LLM methods in prediction accuracy and Matthews correlation coefficient for the stock classification task. To justify the generalization capability of our framework, we further test it on the portfolio construction task, and demonstrate its effectiveness through various portfolio metrics.
Complexity vs Empirical Score
- Math Complexity: 3.0/10
- Empirical Rigor: 8.0/10
- Quadrant: Street Traders — practical and empirical, lighter on theory
Why this score: The paper’s primary innovation lies in a novel RL/agent-based framework (SEP) rather than dense mathematical theory, focusing on LLM application and training dynamics. It is highly empirical, featuring a specific dataset, real-world portfolio construction task, backtest-ready metrics like Sharpe Ratio and MCC, and a public GitHub repository for code.
Research Flowchart
flowchart TD A["Research Goal: Generate Explainable Stock Predictions<br>without expensive human annotation"] --> B["Key Methodology: SEP Framework<br>Summarize-Explain-Predict"] B --> C["Data Input: Chaotic Social Texts<br>+ Historical Stock Prices"] C --> D["Process 1: Self-Reflective Agent<br>Generates reasoning samples via self-reasoning"] C --> E["Process 2: Proximal Policy Optimization PPO<br>Trains LLM on self-generated explanations"] D --> F["Computational Core: Fine-tuned LLM"] E --> F F --> G["Outcome: High-Performance Explainable Predictor<br>Outperforms traditional models & LLMs in accuracy"] F --> H["Application: Portfolio Construction<br>Validated via effective portfolio metrics"]
Cited References (99)
- Efficient capital markets: A review of theory and empirical work (1970)
- Using news articles to predict stock price movements (2001)
- Hybrid learning to rank for financial event ranking (2021)
- Deep learning for event-driven stock prediction (2015)
- Diffusion Variational Autoencoder for Tackling Stochasticity in Multi-Step Regression Stock Price Prediction — → 2309.00073
- Human-Centric Justification of Machine Learning Predictions. (2017)
- Listening to chaotic whispers: A deep learning framework for news-oriented stock trend prediction (2018)
- Stock movement prediction from tweets and historical prices (2018)
and 91 more
- News or noise? The stock market reaction to different types of company-specific news events (2011)
- The black swan: The impact of the highly improbable (2007)
- Deep attentive learning for stock movement prediction from social media text and company correlations (2020)
- PEN: prediction-explanation network to forecast stock price movement with better explainability (2023)
- Explainable machine learning exploiting news and domain-specific lexicon for stock market forecasting (2021)
- Knowledge-driven stock trend prediction and explanation via temporal convolutional network (2019)
- Temporal Data Meets LLM–Explainable Financial Time Series Forecasting — → 2306.11025
- Summarization is (Almost) Dead (2023) — link
- On the robustness of chatgpt: An adversarial and out-of-distribution perspective (2023) — link
- A survey of large language models (2023) — link
- Holistic evaluation of language models (2022) — link
- Language models are few-shot learners (2020)
- Harnessing the power of llms in practice: A survey on chatgpt and beyond (2023) — link
- ChatGPT Informed Graph Neural Network for Stock Movement Prediction — → 2306.03763
- Sources of Hallucination by Large Language Models on Inference Tasks (2023) — link
- Siren’s Song in the AI Ocean: A Survey on Hallucination in Large Language Models (2023) — link
- Toolformer: Language models can teach themselves to use tools (2023) — link
- ChemCrow: Augmenting large-language models with chemistry tools (2023) — link
- A five-factor asset pricing model (2015)
- Factor models, machine learning, and asset pricing (2022)
- Training language models to follow instructions with human feedback (2022)
- RLAIF: Scaling Reinforcement Learning from Human Feedback with AI Feedback (2023) — link
- Chain of hindsight aligns language models with feedback (2023) — link
- Lora: Low-rank adaptation of large language models (2021) — link
- Textual analysis of stock market prediction using breaking financial news: The AZFin text system (2009)
- Using structured events to predict stock price movement: An empirical investigation (2014)
- Learning multiple stock trading patterns with temporal routing adaptor and optimal transport (2021)
- Explainable text-driven neural network for stock prediction (2018)
- Html: Hierarchical transformer-based multi-task learning for volatility prediction (2020)
- Temporal relational ranking for stock prediction (2019)
- NumHTML: Numeric-Oriented Hierarchical Transformer Model for Multi-task Financial Forecasting (2022)
- Modeling the stock relation with graph network for overnight stock movement prediction (2021)
- Bloomberggpt: A large language model for finance (2023) — link
- PIXIU: A Large Language Model, Instruction Data and Evaluation Benchmark for Finance (2023) — link
- FinGPT: Open-Source Financial Large Language Models — → 2306.06031
- Can chatgpt forecast stock price movements? return predictability and large language models — → 2304.07619
- Can ChatGPT Decipher Fedspeak? (2023)
- Fundamental Analysis based Neural Network for Stock Movement Prediction (2022)
- BERTopic: Neural topic modeling with a class-based TF-IDF procedure (2022) — link
- Roberta: A robustly optimized bert pretraining approach (2019) — link
- Simcse: Simple contrastive learning of sentence embeddings (2021) — link
- Umap: Uniform manifold approximation and projection for dimension reduction (2018) — link
- Density-based clustering based on hierarchical density estimates (2013)
- Mining of massive datasets (2011)
- Zero-shot information extraction via chatting with chatgpt (2023) — link
- InstructUIE: Multi-task Instruction Tuning for Unified Information Extraction (2023) — link
- Chain-of-thought prompting elicits reasoning in large language models (2022)
- PromptCast: A New Prompt-based Learning Paradigm for Time Series Forecasting (2022)
- Forecasting future world events with neural networks (2022)
- Reflexion: Language Agents with Verbal Reinforcement Learning (2023) — link
- Self-refine: Iterative refinement with self-feedback (2023) — link
- Retroformer: Retrospective large language agents with policy gradient optimization (2023) — link
- Star: Self-taught reasoner bootstrapping reasoning with reasoning (2022)
- Proximal policy optimization algorithms (2017) — link
- Sentiment Analysis in the Era of Large Language Models: A Reality Check (2023) — link
- In-context instruction learning (2023) — link
- LARGE LANGUAGE MODEL-BASED ARTIFICIAL INTELLIGENCE IN THE LANGUAGE CLASSROOM: PRACTICAL IDEAS FOR TEACHING. (2023)
- Calibrate before use: Improving few-shot performance of language models (2021)
- React: Synergizing reasoning and acting in language models (2022) — link
- Learning to summarize with human feedback (2020)
- Fine-tuning language models from human preferences (2019) — link
- Way off-policy batch deep reinforcement learning of implicit human preferences in dialog (2019) — link
- Vicuna: An open-source chatbot impressing gpt-4 with 90%* chatgpt quality (2023)
- Judging LLM-as-a-judge with MT-Bench and Chatbot Arena (2023) — link
- Auto-encoding variational bayes (2013) — link
- Glove: Global vectors for word representation (2014)
- A dual-stage attention-based recurrent neural network for time series prediction (2017) — link
- Hierarchical attention networks for document classification (2016)
- Neural machine translation by jointly learning to align and translate (2014) — link
- Universal sentence encoder (2018) — link
- Bert: Pre-training of deep bidirectional transformers for language understanding (2018) — link
- Relationship between interest rate and stock price: empirical evidence from developed and developing countries (2009)
- Enhancing stock movement prediction with adversarial training (2018) — link
- The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation (2020)
- The Matthews correlation coefficient (MCC) is more reliable than balanced accuracy, bookmaker informedness, and markedness in two-class confusion matrix evaluation (2021)
- How close is chatgpt to human experts? comparison corpus, evaluation, and detection (2023) — link
- Emergent abilities of large language models (2022) — link
- Optimal versus naive diversification: How inefficient is the 1/N portfolio strategy? (2009)
- The statistics of Sharpe ratios (2002)
- A multitask, multilingual, multimodal evaluation of chatgpt on reasoning, hallucination, and interactivity (2023) — link
- NExT-GPT: Any-to-Any Multimodal LLM (2023) — link
- Structured, Complex and Time-complete Temporal Event Forecasting (2023) — link
- Detecting financial market manipulation with statistical physics tools — → 2308.08683
- Jailbroken: How does llm safety training fail? (2023) — link
- Explore, Establish, Exploit: Red Teaming Language Models from Scratch (2023) — link
- Combating misinformation in the age of llms: Opportunities and challenges (2023) — link
- Towards llm-based fact verification on news claims with a hierarchical step-by-step prompting method (2023) — link
- Bias and fairness in large language models: A survey (2023) — link
- Sex matters: Gender bias in the mutual fund industry (2019)
- In-group bias in financial markets (2023)
- Leveraging multiple relations for fashion trend forecasting based on social media (2021)
6 of 99 cited works are in the corpus; resolved via arXiv source bundles, Semantic Scholar and OpenAlex. Corpus-wide: 2518 linked papers.