Table of Contents
Fetching ...

FinMem: A Performance-Enhanced LLM Trading Agent with Layered Memory and Character Design

Yangyang Yu, Haohang Li, Zhi Chen, Yuechen Jiang, Yang Li, Denghui Zhang, Rong Liu, Jordan W. Suchow, Khaldoun Khashanah

TL;DR

The paper tackles the challenge of processing vast, time-sensitive financial information for automated trading. It introduces FinMem, a memory-augmented LLM agent with Profiling, Memory (Working + Layered Long-Term), and Decision-making modules, enabling adaptive, interpretable trading decisions. Empirical results on real-world data show FinMem outperforms DRL and open-source LLM baselines, with robustness to limited training data and market volatility. The layered memory and dynamic profiling contribute to superior decision quality and demonstrate potential for broader, multi-agent financial systems. This work advances practical, memory-aware AI agents for finance and beyond, enabling faster adaptation to evolving markets.

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 \textsc{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, \textsc{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 \textsc{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, \textsc{FinMem} presents a cutting-edge LLM agent framework for automated trading, boosting cumulative investment returns.

FinMem: A Performance-Enhanced LLM Trading Agent with Layered Memory and Character Design

TL;DR

The paper tackles the challenge of processing vast, time-sensitive financial information for automated trading. It introduces FinMem, a memory-augmented LLM agent with Profiling, Memory (Working + Layered Long-Term), and Decision-making modules, enabling adaptive, interpretable trading decisions. Empirical results on real-world data show FinMem outperforms DRL and open-source LLM baselines, with robustness to limited training data and market volatility. The layered memory and dynamic profiling contribute to superior decision quality and demonstrate potential for broader, multi-agent financial systems. This work advances practical, memory-aware AI agents for finance and beyond, enabling faster adaptation to evolving markets.

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 \textsc{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, \textsc{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 \textsc{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, \textsc{FinMem} presents a cutting-edge LLM agent framework for automated trading, boosting cumulative investment returns.
Paper Structure (23 sections, 6 equations, 11 figures, 5 tables)

This paper contains 23 sections, 6 equations, 11 figures, 5 tables.

Figures (11)

  • 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 provided for the risk-seeking and risk-averse inclinations.
  • 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 3: (1) The decision-making module workflow of the FinMem trading agent retrieves critical memory events to inform specific decisions. (2) LLM prompt template used by FinMem to interact with incoming financial information.
  • Figure 4: The distribution of news in scraped from Alpaca News API for the five stocks in the experiments
  • Figure 5: Cumulative return comparison over time between FinMem and other algorithmic agents across five stocks.
  • ...and 6 more figures