StockMem: An Event-Reflection Memory Framework for Stock Forecasting
StockMem: An Event-Reflection Memory Framework for Stock Forecasting
StockMem is a novel event-reflection memory framework designed for stock price prediction using large language models (LLMs). It addresses the limitations of general-purpose memory architectures in financial domains by converting unstructured online news into structured, temporally-aware event knowledge. The framework consists of two main components: an event memory that extracts, merges, and tracks events over time to capture incremental information (ΔInfo) reflecting market expectation discrepancies, and a reflection memory that learns causal relationships between event sequences and stock price movements, forming a retrievable experience base. During inference, the system retrieves historically similar event sequences using a hierarchical similarity metric (combining type-level and group-level Jaccard coefficients) and LLM-based filtering, then synthesizes recent events, incremental information, and retrieved experiences to predict price direction.
Experiments on four technology stocks from the CSMAR database demonstrate that StockMem consistently outperforms state-of-the-art memory-augmented models (FinMem, MemGPT, MemP, Zep) in accuracy and Matthews correlation coefficient. Ablation studies confirm the importance of structured event representation over text summaries or cluster opinions, the critical role of incremental information from event tracking, and the effectiveness of cross-company historical pattern matching. The framework also provides strong interpretability by clearly tracing the information chain affecting stock prices, enhancing transparency and trustworthiness in financial decision-making.
Highlights
- 1Proposes StockMem, a dual-layer event-reflection memory framework for stock prediction using LLMs.
- 2Converts unstructured financial news into structured temporal event knowledge bases with incremental information.
- 3Introduces a sequence-level similarity retrieval mechanism for analogical reasoning across companies.
- 4Achieves superior prediction accuracy and interpretability compared to existing memory-augmented models.
- 5Validates the importance of event tracking and cross-company pattern matching through ablation studies.
Methods
- MEvent extraction, merging, and tracking using LLMs with vector-based coarse clustering and fine-grained judgment.
- MConstruction of reflection memory by analyzing causal relationships between event sequences and stock price movements.
- MHierarchical similarity retrieval combining type-level and group-level Jaccard coefficients with LLM-based filtering.
- MInference by synthesizing recent event sequences, incremental information, and historical reference experiences.
Results
- RStockMem outperforms FinMem, MemGPT, MemP, and Zep on ACC and MCC across four stocks (e.g., iFlytek ACC 0.6253 vs. best baseline 0.5763).
- RStructured event representation significantly outperforms text summaries and cluster opinions (Avg_ACC 0.5748 vs. 0.4655 and 0.4378).
- RRemoving incremental information (ΔInfo) reduces Avg_ACC from 0.5748 to 0.4058, confirming its critical role.
- RCross-company sequence matching (Avg_ACC 0.5748) outperforms same-company only (0.5686) and recent-period reference (0.4077).
- RThe framework provides explainable predictions by tracing event evolution and identifying key information chains.
Analyze Paper
Generate insights from "StockMem: An Event-Reflection Memory Framework for Stock For...".