6 AI agents debate bull vs bear before trading stocks — a full day costs just $0.87
OfferBeginning1903 · reddit · 2026-09-30
A Reddit user shared a full writeup of sudo-trade, an open-source multi-agent stock trading system (7k lines of Python, asyncio + event bus):
- Architecture: components never import each other, communicating via an event bus (agent:screened etc.), so brokers (Groww/Zerodha) and paper/live modes can be swapped without touching other code.
- Debate mechanism: when the screener surfaces a stock, BULL and BEAR agents argue for two rounds, and a third "portfolio manager" agent returns strongbuy through strongsell. A single "No vague optimism" prompt line does most of the work — without it you get "strong fundamentals"; with it the bull cites USFDA clearances and the ANDA pipeline while the bear names FDA warning letters and US pricing erosion. Debaters also remember past debates and outcomes per stock.
- Cost control: Claude Opus only for debates and final decisions; research and screening run on cheap models, with a free quantitative pass over 120+ stocks before any LLM call. Per-agent budgets auto-gate, falling back to heuristics on overspend. A full day — 200 LLM calls, 370k tokens, 483 debates, 148+ trades — cost $0.87 against a $50/day budget.
- What didn't work: the consensus engine was uselessly conservative out of the box, returning "hold" at 65% confidence for 15 straight stocks; prompts had to be biased toward action and current positions fed to the master.
- Results: ₹10 lakh → ₹23.66 lakh over 10 volatile simulated days in March 2026, but fills ignore slippage — treat the exact number with suspicion.
More from coding & agent
- The Law of Structural Determinism: Don't Let LLMs Enforce Agent Policies — forevergeeks · 2026-09-30
- Building a 'Gumroad for AI Agents': You Bring the Agent, It Handles the Rest — BLOOD-STROKE · 2026-09-30
- Zero 3D Experience, 88,000 Lines of Code: A Dieselpunk Zeppelin Ride Built with Claude Code — East_Painting_7517 · 2026-09-30
- Matt Pocock to interview poteto live on agent skills and high-velocity software factories — mattpocockuk · 2026-09-30
- mitsuhiko calls for composable tool search in MCP — mitsuhiko · 2026-09-30
- TDX MCP Server ships 41 tools for AI-assisted IT service management via TeamDynamix API — modelcontextprotocol · 2026-09-30