AIIN-PROGRESS

Autonomous AI Trading Floor

Multi-Agent LLM Trading System with Governed Execution

Built a multi-agent AI trading floor that runs unattended on a schedule. Each cycle, five specialized GLM analysts independently assess the market from their domain — macro regime, news sentiment, technical structure, portfolio risk, and historical trade memory. Their briefings feed a Desk Chief LLM that synthesizes consensus, weighs disagreements, and emits a structured trade plan. A deterministic risk governor then re-validates every action against hard limits (ATR stops, 2:1 R/R, concentration caps, kill switches) before submitting bracket orders to Alpaca. The AI decides WHAT to trade; the risk manager is authoritative on HOW MUCH; the kill switch overrides everything. Includes a real-time Dockerized dashboard with 7 tabs tracking equity, performance, AI decision history, strategies, positions, trades, and analysis.

Autonomous AI Trading Floor - Image 1
1 / 5

The Problem

Retail algorithmic trading systems are either fully deterministic (rigid, miss context) or fully LLM-driven (unsafe, hallucinate sizes, ignore risk limits). Neither captures how a real trading desk operates: multiple specialists debating, a chief making the call, and a compliance layer enforcing hard constraints. I wanted to model that workflow — autonomous, context-aware, but risk-governed by hard math, never LLM-interpreted.

The Solution

Designed a multi-agent pipeline: Market Data → Context Builder → 5 Analysts → Desk Chief (GLM) → Risk Governor → Execute. Each analyst runs an independent LLM call with domain-specific prompts and data slices. The Desk Chief reads all five briefings plus the live portfolio state and produces a JSON trade plan with explicit reasoning, consensus notes, and disagreements. A governed executor then re-validates sizing, concentration, and portfolio limits regardless of what the plan says — the chief decides, the executor governs. The entire loop runs on cron via Hermes Agent, delivering compact briefings to Discord after each cycle.

Key Features

Explore the main capabilities and functionality of this project

5-Agent Analyst Panel

Macro, News, Technical, Risk, and Memory analysts each run independent GLM calls with domain-specific prompts, then brief the Desk Chief

Governed Execution

AI decides WHAT to trade; risk governor enforces HOW MUCH — ATR stops, 2:1 R/R, concentration caps, kill switches, all hard math

7 Alpha Strategies

Momentum ROC, mean reversion, volume-price, volatility regime, trend persistence, volume-weighted, and multi-factor — each independently backtested

Real-Time Dashboard

Dockerized FastAPI + React dashboard with 7 tabs: equity curve, performance, AI cycle history, strategies, positions, trades, and analysis

Regime-Aware Sizing

VIX/VIXY + SPY trend drives a 0.25×–1.0× risk multiplier that scales all position sizes — risk-on/off/neutral detected deterministically

Semantic Trade Memory

Supermemory-backed recall of past analyst findings, regime patterns, and lessons — injected as context at the start of each cycle

Technical Challenges

Key challenges faced during development and how they were solved

Technology Stack

Technologies and tools used to build this project

ReactViteRechartsTypeScriptPythonFastAPIGLM 4.7 / 5.2 (Z.AI)SQLite (FTS5)Supermemory (semantic)DockerAlpaca Broker APIFinnhubHermes AgentTelegram BotAlpaca Paper TradingFinnhub Market DataZ.AI GLM Chat CompletionsSupermemory

Lessons Learned

  • Separating "AI decides what" from "risk manager decides how much" is the key to safe LLM-driven trading

  • Multi-agent consensus should act on majority conviction, not unanimity — requiring full agreement causes decision paralysis

  • Signal-flip exits need confirmation bars and earnings grace windows to avoid selling at intraday lows on noise

  • Small samples (N<10) are statistically meaningless — a losing streak is not evidence a strategy is broken

  • Opportunity cost matters: hoarding cash is a failure mode, not safety. The risk manager must flag under-deployment

Interested in Learning More?

I'd love to discuss this project in detail and share insights about the development process.