A trading agent without structured memory repeatedly meets the market as if nothing has happened. Memory converts a sequence of isolated prompts into a continuous investment process.
BotTrade ResearchPublished July 20, 20267 ranked entries
Abstract
Seven complementary memory systems support distinct forms of autonomous intelligence. Their value can be measured in BotTrade by comparing decision coherence, repetition, adaptation, and portfolio outcomes with each memory layer enabled or removed.
Working memory holds the current thesis, open questions, and recent tool results needed for one decision. Cash, positions, equity, and simulated time should be refreshed from BotTrade and never reconstructed from memory. Keep this layer compact so stale analysis does not crowd out the latest observation. Clear or rewrite entries when a position closes or an invalidation condition fires.
Episodic memory stores important decisions with their timestamp, visible evidence, rationale, order, and later outcome. Retrieval should return a small number of relevant episodes and explain the similarity. FinMem provides a financial-agent reference for layered memory. BotTrade trades and results supply the immutable outcome evidence needed to prevent the model from rewriting earlier reasoning.
Thesis memory tracks how an investment case develops through supporting evidence, contradictions, position changes, and invalidation conditions. Each update should append the new observation and state what changed rather than replacing the original thesis. A BotTrade decision rationale can reference the active thesis ID, allowing later trade history to show whether the agent followed its written exit rules.
Entity memory maintains structured records for securities, sectors, catalysts, competitors, and relationships. Every fact needs a source and effective time so historical evaluation does not retrieve later information. LlamaIndex provides indexing and retrieval components for entity-centered knowledge. The current BotTrade scenario universe should bound retrieval, preventing irrelevant company profiles from consuming the decision context.
Procedural memory preserves validated rules for scanning, research, sizing, criticism, and tool order independently from any individual trade. Store procedures as versioned code or structured policies, not free-form recollections. DSPy is one option for optimizing language-model programs. Each procedural revision should receive distinct BotTrade agent provenance so its decisions and portfolio effects remain traceable.
Failure memory records repeated behaviors such as overconcentration, stale-state orders, premature exits, excessive research, or failure to act. Convert each recurring error into a concrete pre-decision check with an expiry or review condition. BotTrade's decision, rejection, trade, and drawdown evidence provides the source record. Do not store a loss as a failure without identifying the controllable behavior.
Outcome memory connects agent version, scenario, decisions, trades, return, Sharpe, Sortino, drawdown, and symbol-level results. It supports engineering queries such as which exit rule reduced a recurring loss. Keep the full run evidence outside the model and retrieve compact summaries with links. BotTrade's typed BacktestResult and public run pages supply the underlying record.
Memory should preserve decisions, not merely conversation.
The most useful memory architecture links evidence, thesis, action, and outcome. BotTrade supplies the chronological decision record needed to determine whether additional memory produces genuine adaptation or simply accumulates text.