Skip to main content
QUICK REVIEW

[Paper Review] FinMem: A Performance-Enhanced LLM Trading Agent with Layered Memory and Character Design

Yangyang Yu, Haohang Li|arXiv (Cornell University)|Nov 23, 2023
Stock Market Forecasting MethodsDecision Sciences7 citations
TL;DR

FinMem introduces a modular LLM-based trading agent with profiling, layered memory, and adaptive character design to enhance stock trading performance, enabling memory-driven decision making and rapid adaptation to market cues.

ABSTRACT

Recent advancements in Large Language Models (LLMs) have exhibited notable efficacy in question-answering (QA) tasks across diverse domains. Their prowess in integrating extensive web knowledge has fueled interest in developing LLM-based autonomous agents. While LLMs are efficient in decoding human instructions and deriving solutions by holistically processing historical inputs, transitioning to purpose-driven agents requires a supplementary rational architecture to process multi-source information, establish reasoning chains, and prioritize critical tasks. Addressing this, we introduce extsc{FinMem}, a novel LLM-based agent framework devised for financial decision-making. It encompasses three core modules: Profiling, to customize the agent's characteristics; Memory, with layered message processing, to aid the agent in assimilating hierarchical financial data; and Decision-making, to convert insights gained from memories into investment decisions. Notably, extsc{FinMem}'s memory module aligns closely with the cognitive structure of human traders, offering robust interpretability and real-time tuning. Its adjustable cognitive span allows for the retention of critical information beyond human perceptual limits, thereby enhancing trading outcomes. This framework enables the agent to self-evolve its professional knowledge, react agilely to new investment cues, and continuously refine trading decisions in the volatile financial environment. We first compare extsc{FinMem} with various algorithmic agents on a scalable real-world financial dataset, underscoring its leading trading performance in stocks. We then fine-tuned the agent's perceptual span and character setting to achieve a significantly enhanced trading performance. Collectively, extsc{FinMem} presents a cutting-edge LLM agent framework for automated trading, boosting cumulative investment returns.

Motivation & Objective

  • Motivate the need for autonomous agents that can process multi-source financial data with varying timeliness.
  • Propose FinMem’s three-module architecture (Profiling, Memory, Decision-making) to address memory and interpretability limitations in DRL and prior LLM agents.
  • Demonstrate how layered memory and adaptive character settings improve trading decisions and robustness in volatile markets.
  • Show that FinMem achieves superior trading performance on real-world datasets with limited training data and general-purpose LLMs.

Proposed method

  • Introduce FinMem’s Profiling module to customize agent characteristics and risk inclination.
  • Develop a Memory module with working memory and layered long-term memory for time-sensitive information processing.
  • Define a decision-making module that translates memory-derived insights into trading actions (Buy/Sell/Hold).
  • Employ a novel memory scoring function combining recency, relevancy, and importance across shallow, intermediate, and deep layers.
  • Use top-K memory events from each layer to inform immediate and extended reflections guiding trading decisions.
  • Ground memory updates and retention with a layered decay mechanism and an access-counter to prioritize pivotal events.
Figure 1: The prompt template for FinMem ’s profiling module. It includes two key elements of its character setting: professional background knowledge and three distinct investment risk inclinations. In the self-adaptive risk inclination option, the omitted texts align with the detailed descriptions
Figure 1: The prompt template for FinMem ’s profiling module. It includes two key elements of its character setting: professional background knowledge and three distinct investment risk inclinations. In the self-adaptive risk inclination option, the omitted texts align with the detailed descriptions

Experimental results

Research questions

  • RQ1RQ1: Does FinMem outperform contemporary algorithmic trading agents on real-world data?
  • RQ2RQ2: Are there tasks that challenge other trading algorithms but are manageable by FinMem?
  • RQ3RQ3: Which LLM backbone yields the best performance for FinMem?
  • RQ4RQ4: Do different trader risk inclinations meaningfully differentiate FinMem’s trading performance?
  • RQ5RQ5: Can FinMem effectively filter and prioritize information to inform trading decisions?

Key findings

  • FinMem demonstrates leading trading performance versus representative algorithmic agents on a scalable real-world dataset.
  • FinMem’s memory and profiling modules enable better stratification and leveraging of market insights, improving decision quality.
  • Adjusting backbone LLMs, working memory capacity, and character settings significantly affects trading performance.
  • The dynamic risk inclination feature allows FinMem to adapt to market conditions and mitigate downturns.
  • Ablation studies show FinMem can learn from past trading experiences and evolve its knowledge base through market interaction.
  • The framework achieves robust trading performance with limited training data (days to months) and remains promising with larger datasets and specialized financial LLMs.
Figure 2: Memory module structure of FinMem with a detailed view of components, operations, and workflow. The cognitive architectures of FinMem ’s memory module have two core components – Working Memory and Layered Long-term Memory.
Figure 2: Memory module structure of FinMem with a detailed view of components, operations, and workflow. The cognitive architectures of FinMem ’s memory module have two core components – Working Memory and Layered Long-term Memory.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.