I started building this bot in December 2024. Back then it was a simple script: fetch OHLCV, compute RSI, ask an LLM "buy or sell?".
A year and a half later, it's a multi-agent system with chart vision, vector memory, bull/bear internal debate, adversarial awareness, self-writing rules, and seven specialized AI agents that maintain the codebase itself.
Here's what changed — and why you should care if you're building with LLMs.
What's New Since v1
🧠 Bull vs Bear Debate (Single Prompt, Zero Extra Cost)
TradingAgents (UCLA/MIT) does this with separate agents. My bot does both sides in ONE prompt — the LLM argues the bull case, then the bear case, then decides. No extra API calls. Better signals.
🎯 EV Framework — Solving the Optiver Problem
Optiver found LLMs fail at expected value maximization. My bot computes EV from real trade history, market conditions, and risk profiles. It doesn't guess — it calculates.
❌ Falsification Check
Before every signal, the LLM must name a price level that would prove it wrong. If it can't — rejected. This one check improved signal quality more than prompt tweaks.
🔮 Vector Memory (ChromaDB)
Every closed trade embedded with 15+ metadata fields. Semantic similarity search retrieves the top 5 most similar past trades. Time-decay ensures recency matters. The bot literally remembers what happened last time this setup appeared.
📰 Zero-Cost Sentiment
Reddit via free JSON, X/Twitter via Nitter, RSS feeds from CoinDesk/CoinTelegraph/Decrypt. No API keys. RAG index for relevance scoring.
🛡️ 7 AI Agents Maintaining the Code
.ai/ directory with seven specialized agents — each with a prompt, journal, and scope. They've produced real commits, real tests, real improvements.
Quick Start
git clone https://github.com/qrak/LLM_trader.git
cd LLM_trader
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp keys.env.example keys.env # free Google Gemini API key
python start.py # dashboard → http://localhost:8000
Enter fullscreen mode Exit fullscreen mode
*Built in Wrocław, Poland by a warehouse worker who codes at night. No university degree. Just passion.
0 Comments
Log in to join the conversation.No comments yet. Be the first to share your thoughts.