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)

  1. Efficient capital markets: A review of theory and empirical work (1970)
  2. Using news articles to predict stock price movements (2001)
  3. Hybrid learning to rank for financial event ranking (2021)
  4. Deep learning for event-driven stock prediction (2015)
  5. Diffusion Variational Autoencoder for Tackling Stochasticity in Multi-Step Regression Stock Price Prediction — → 2309.00073
  6. Human-Centric Justification of Machine Learning Predictions. (2017)
  7. Listening to chaotic whispers: A deep learning framework for news-oriented stock trend prediction (2018)
  8. Stock movement prediction from tweets and historical prices (2018)
and 91 more
  1. News or noise? The stock market reaction to different types of company-specific news events (2011)
  2. The black swan: The impact of the highly improbable (2007)
  3. Deep attentive learning for stock movement prediction from social media text and company correlations (2020)
  4. PEN: prediction-explanation network to forecast stock price movement with better explainability (2023)
  5. Explainable machine learning exploiting news and domain-specific lexicon for stock market forecasting (2021)
  6. Knowledge-driven stock trend prediction and explanation via temporal convolutional network (2019)
  7. Temporal Data Meets LLM–Explainable Financial Time Series Forecasting — → 2306.11025
  8. Summarization is (Almost) Dead (2023) — link
  9. On the robustness of chatgpt: An adversarial and out-of-distribution perspective (2023) — link
  10. A survey of large language models (2023) — link
  11. Holistic evaluation of language models (2022) — link
  12. Language models are few-shot learners (2020)
  13. Harnessing the power of llms in practice: A survey on chatgpt and beyond (2023) — link
  14. ChatGPT Informed Graph Neural Network for Stock Movement Prediction — → 2306.03763
  15. Sources of Hallucination by Large Language Models on Inference Tasks (2023) — link
  16. Siren’s Song in the AI Ocean: A Survey on Hallucination in Large Language Models (2023) — link
  17. Toolformer: Language models can teach themselves to use tools (2023) — link
  18. ChemCrow: Augmenting large-language models with chemistry tools (2023) — link
  19. A five-factor asset pricing model (2015)
  20. Factor models, machine learning, and asset pricing (2022)
  21. Training language models to follow instructions with human feedback (2022)
  22. RLAIF: Scaling Reinforcement Learning from Human Feedback with AI Feedback (2023) — link
  23. Chain of hindsight aligns language models with feedback (2023) — link
  24. Lora: Low-rank adaptation of large language models (2021) — link
  25. Textual analysis of stock market prediction using breaking financial news: The AZFin text system (2009)
  26. Using structured events to predict stock price movement: An empirical investigation (2014)
  27. Learning multiple stock trading patterns with temporal routing adaptor and optimal transport (2021)
  28. Explainable text-driven neural network for stock prediction (2018)
  29. Html: Hierarchical transformer-based multi-task learning for volatility prediction (2020)
  30. Temporal relational ranking for stock prediction (2019)
  31. NumHTML: Numeric-Oriented Hierarchical Transformer Model for Multi-task Financial Forecasting (2022)
  32. Modeling the stock relation with graph network for overnight stock movement prediction (2021)
  33. Bloomberggpt: A large language model for finance (2023) — link
  34. PIXIU: A Large Language Model, Instruction Data and Evaluation Benchmark for Finance (2023) — link
  35. FinGPT: Open-Source Financial Large Language Models — → 2306.06031
  36. Can chatgpt forecast stock price movements? return predictability and large language models — → 2304.07619
  37. Can ChatGPT Decipher Fedspeak? (2023)
  38. Fundamental Analysis based Neural Network for Stock Movement Prediction (2022)
  39. BERTopic: Neural topic modeling with a class-based TF-IDF procedure (2022) — link
  40. Roberta: A robustly optimized bert pretraining approach (2019) — link
  41. Simcse: Simple contrastive learning of sentence embeddings (2021) — link
  42. Umap: Uniform manifold approximation and projection for dimension reduction (2018) — link
  43. Density-based clustering based on hierarchical density estimates (2013)
  44. Mining of massive datasets (2011)
  45. Zero-shot information extraction via chatting with chatgpt (2023) — link
  46. InstructUIE: Multi-task Instruction Tuning for Unified Information Extraction (2023) — link
  47. Chain-of-thought prompting elicits reasoning in large language models (2022)
  48. PromptCast: A New Prompt-based Learning Paradigm for Time Series Forecasting (2022)
  49. Forecasting future world events with neural networks (2022)
  50. Reflexion: Language Agents with Verbal Reinforcement Learning (2023) — link
  51. Self-refine: Iterative refinement with self-feedback (2023) — link
  52. Retroformer: Retrospective large language agents with policy gradient optimization (2023) — link
  53. Star: Self-taught reasoner bootstrapping reasoning with reasoning (2022)
  54. Proximal policy optimization algorithms (2017) — link
  55. Sentiment Analysis in the Era of Large Language Models: A Reality Check (2023) — link
  56. In-context instruction learning (2023) — link
  57. LARGE LANGUAGE MODEL-BASED ARTIFICIAL INTELLIGENCE IN THE LANGUAGE CLASSROOM: PRACTICAL IDEAS FOR TEACHING. (2023)
  58. Calibrate before use: Improving few-shot performance of language models (2021)
  59. React: Synergizing reasoning and acting in language models (2022) — link
  60. Learning to summarize with human feedback (2020)
  61. Fine-tuning language models from human preferences (2019) — link
  62. Way off-policy batch deep reinforcement learning of implicit human preferences in dialog (2019) — link
  63. Vicuna: An open-source chatbot impressing gpt-4 with 90%* chatgpt quality (2023)
  64. Judging LLM-as-a-judge with MT-Bench and Chatbot Arena (2023) — link
  65. Auto-encoding variational bayes (2013) — link
  66. Glove: Global vectors for word representation (2014)
  67. A dual-stage attention-based recurrent neural network for time series prediction (2017) — link
  68. Hierarchical attention networks for document classification (2016)
  69. Neural machine translation by jointly learning to align and translate (2014) — link
  70. Universal sentence encoder (2018) — link
  71. Bert: Pre-training of deep bidirectional transformers for language understanding (2018) — link
  72. Relationship between interest rate and stock price: empirical evidence from developed and developing countries (2009)
  73. Enhancing stock movement prediction with adversarial training (2018) — link
  74. The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation (2020)
  75. The Matthews correlation coefficient (MCC) is more reliable than balanced accuracy, bookmaker informedness, and markedness in two-class confusion matrix evaluation (2021)
  76. How close is chatgpt to human experts? comparison corpus, evaluation, and detection (2023) — link
  77. Emergent abilities of large language models (2022) — link
  78. Optimal versus naive diversification: How inefficient is the 1/N portfolio strategy? (2009)
  79. The statistics of Sharpe ratios (2002)
  80. A multitask, multilingual, multimodal evaluation of chatgpt on reasoning, hallucination, and interactivity (2023) — link
  81. NExT-GPT: Any-to-Any Multimodal LLM (2023) — link
  82. Structured, Complex and Time-complete Temporal Event Forecasting (2023) — link
  83. Detecting financial market manipulation with statistical physics tools — → 2308.08683
  84. Jailbroken: How does llm safety training fail? (2023) — link
  85. Explore, Establish, Exploit: Red Teaming Language Models from Scratch (2023) — link
  86. Combating misinformation in the age of llms: Opportunities and challenges (2023) — link
  87. Towards llm-based fact verification on news claims with a hierarchical step-by-step prompting method (2023) — link
  88. Bias and fairness in large language models: A survey (2023) — link
  89. Sex matters: Gender bias in the mutual fund industry (2019)
  90. In-group bias in financial markets (2023)
  91. 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.