Teaching AI to Trade Stocks Safely Without Losing Its Mind
Original paper: Governed Self-Evolution for Autonomous Investing: A Multi-Agent LLM System with an Invariant Core
"A heavy steam engine's centrifugal ball governor automatically restricts the throttle to prevent explosions regardless of how the engineer adjusts the controls. Similarly, the system's immutable core rules mechanically restrict the AI's trading decisions, ensuring that self-evolution protocols can never override baseline risk management."
As autonomous AI agents begin handling high-stakes real-world tasks like finance and infrastructure, ensuring they can learn and adapt without modifying their foundational safety protocols is critical to preventing catastrophic failures.
- Nine specialized AI agents collaborate to analyze markets and execute trades.
- A protected safety core ensures self-improvement updates cannot breach risk rules.
- Live deployment successfully weathered severe market drawdowns with minimal losses.
📑 Original arXiv Technical Abstract
LLM agents that act on live Web data must combine heterogeneous evidence, remember what they have done and improve from outcomes without weakening their own safeguards. We study this problem in autonomous investing, where every action is irreversible and based on untrusted Web content. We present Steward, a multi-agent LLM system that draws the boundary of self-evolution in its type system. First, nine role-specialised agents decide jointly: four analysts read news feeds, SEC filings, macroeconomic series and market data and emit typed reports, from which a Portfolio Manager sets target positions that a protected Risk Manager audits. Second, a seven-layer shared memory, assembled by code from the system's own record, gives each decision its position context, the market narrative, calibration and the agent's past decisions. Third, the system improves itself by review: code grades every trade and forecast nightly and writes the grades into memory, and each quarter a reflector proposes prompt learnings that a deterministic gate applies reversibly and replay of recorded inputs verifies. All three operate around an invariant core of order arithmetic, risk rules and discipline-agent prompts that no self-edit can reach. In a five-month live deployment (102 trading days, 1,632 LLM calls), the system contained a 24.6% sector drawdown to a 0.3% loss; in replay of its recorded inputs, a single model given the same raw data traded more and lost 1.35 points against the market over five days where the joint design showed no significant loss, and no injected instruction was followed; and a 2015-2026 backtest shows the core alone lowering the maximum drawdown under all 50 random entry policies. The reflector traced the dominant failure to its root cause, and the gate applied a learning that the agent adopted on trigger evenings and on no control evening. Code: https://github.com/yebof/quant-agent
✍️ Are you an author of this paper? Add code/demo links or a note
Help readers explore your work — share your official GitHub repo, Hugging Face weights, affiliation, or a clarification note for our editorial review queue.