Vibe-Trading: The Open-Source AI Agent Wall Street Doesn't Want You to Know About
What if you could describe a trading strategy in plain English and have an AI agent generate, backtest, and export production-ready code within minutes?
For decades, quantitative trading has been locked behind fortress walls. Citadel, Two Sigma, Renaissance Technologies—these firms spend hundreds of millions on proprietary infrastructure, armies of PhDs, and data pipelines that mere mortals can only dream of accessing. The retail trader? Stuck with basic charting tools, disconnected backtesters, and the sinking feeling that every edge has already been arbitraged away.
But something fundamental is shifting. Large language models have cracked open the black box of code generation. Multi-agent systems can now coordinate complex research workflows. And a small team at HKUDS has just dropped Vibe-Trading—an open-source, multi-agent workspace that turns natural language prompts into fully backtested trading strategies across equities, crypto, futures, and forex.
This isn't a toy. This isn't a spreadsheet with a chatbot glued on top. Vibe-Trading ships with 452 pre-built quant alphas, 29 specialized trading team presets, cross-market composite backtesting, and a Shadow Account feature that diagnoses your actual broker behavior against rule-based alternatives. It exports to TradingView Pine Script, MetaTrader 5, and Chinese TDX platforms. And you can install it with a single pip command.
Ready to see what the future of democratized quantitative research actually looks like?
What Is Vibe-Trading?
Vibe-Trading is an open-source research workspace developed by HKUDS that transforms finance questions into runnable analysis pipelines. Born from the intersection of modern LLM agent architectures and institutional-grade quantitative tooling, it connects natural-language prompts to market data loaders, strategy generation engines, backtest frameworks, and persistent research memory.
The project emerged from HKUDS's broader agent ecosystem, which includes ClawTeam (agent swarm intelligence), NanoBot (ultra-lightweight personal AI), CLI-Anything (making all software agent-native), and OpenSpace (self-evolving AI skills). Vibe-Trading represents the financial markets specialization of this platform—applying multi-agent coordination to the uniquely complex domain of trading strategy research.
What makes Vibe-Trading genuinely disruptive isn't any single feature. It's the integration depth. Most "AI trading tools" stop at generating pseudo-code or basic technical indicators. Vibe-Trading goes further: it grounds agents with fetched market data, validates strategies through multiple statistical frameworks (Monte Carlo, Bootstrap confidence intervals, Walk-Forward analysis), and persists research context across sessions so your agent actually learns your preferences and improves over time.
The project is explicitly designed for research, simulation, and backtesting only—it does not execute live trades. This architectural decision keeps the tool focused on what it does best: generating and validating hypotheses, not gambling with real capital.
Key Features That Separate Vibe-Trading From the Noise
Vibe-Trading packs capabilities that would cost six figures to replicate in proprietary software. Here's what actually matters:
🔍 Self-Improving Trading Agent
The core agent handles natural-language market research, drafts strategies from your descriptions, analyzes files and web content, and maintains persistent memory across sessions. Unlike stateless chatbots, it recalls your risk preferences, preferred asset classes, and successful strategy patterns—evolving into a personalized research assistant.
🐝 Multi-Agent Trading Teams
With 29 preset swarm configurations, you can spin up specialized research teams in seconds. The investment_committee runs bull/bear debates before a portfolio manager makes final calls. The quant_strategy_desk chains screening → factor research → backtest → risk audit. The crypto_trading_desk coordinates funding/basis analysis with liquidation heatmaps and flow monitoring. Each worker agent is grounded with fetched market data, and results stream in real-time with persisted reports.
📊 Cross-Market Data & Backtesting
Vibe-Trading doesn't care about your market silos. It loads A-shares, HK/US equities, crypto, futures, and forex through six data sources with automatic fallback chains: Tushare, yfinance, OKX, AKShare, CCXT, and Futu. The CompositeEngine backtests mixed-market portfolios with shared capital pools and per-market rules—imagine testing a strategy that rotates between CSI 300 constituents and BTC-USDT based on macro signals.
👥 Shadow Account
This is where Vibe-Trading gets psychologically dangerous for your ego. Upload your actual broker journal (supports 同花顺, 东方财富, 富途, and generic CSV), and the agent will:
- Parse your trading behavior with holding days, win rate, PnL ratio, drawdown
- Diagnose four cognitive biases: disposition effect, overtrading, momentum chasing, anchoring
- Extract your implicit rules and backtest them as a formal strategy
- Compare your actual path against the shadow strategy's optimal execution
- Generate an 8-section HTML/PDF report showing exactly how much you left on the table
🧬 Alpha Zoo
452 pre-built cross-sectional alphas across four licensed collections: Microsoft Qlib's 154 factors (Apache-2.0), Kakushadze's 101 Formulaic Alphas, Guotai Junan's 191 short-horizon factors, and Fama-French 5 + Carhart momentum proxies. Each alpha passes an AST purity gate, lookahead-guard tests, and network isolation. Benchmark any zoo on your universe with one CLI command.
Real-World Use Cases Where Vibe-Trading Dominates
1. The Solo Quant Building Their First Systematic Strategy
You've read Advances in Financial Machine Learning. You understand the theory. But translating "train a random forest on 20-day momentum and 5-day reversal features" into production code with proper purged cross-validation? Vibe-Trading handles the scaffolding. Describe your idea, let the agent generate the backtest, then export to vnpy's CtaTemplate or TradingView Pine Script v6.
2. The Crypto Trader Validating Twitter Alpha
Someone tweeted a "funding rate + liquidation cascade" strategy for ETH perps. Before risking capital, you need rigorous backtesting across multiple exchange data sources with proper fee modeling. Vibe-Trading's OKX and CCXT loaders provide clean historical data; the agent generates the strategy code; Monte Carlo and Walk-Forward validation tell you if the edge is real or curve-fit.
3. The A-Share Investor Navigating ST Risks
China's A-share market has unique landmines: ST/*ST delisting risks, suspended trading, PIT (point-in-time) fundamental data requirements. Vibe-Trading's ashare-pre-st-filter skill screens penalty-relevant securities, while Tushare integration provides PIT-safe financial statement fields like income_total_revenue and fina_indicator_roe with proper announcement-date handling.
4. The Research Team Replacing Expensive Bloomberg Terminals
A small fund needs institutional-grade factor research without Bloomberg's $24,000/year price tag. Vibe-Trading's Alpha Zoo provides 452 tested factors with IC and IR statistics. The swarm system runs analyst teams for global macro, earnings research, and technical analysis panels. Reports export to shareable formats. The entire stack runs on a laptop.
5. The Trader Finally Confronting Their Behavioral Demons
You've been trading for years. You think you're good. Vibe-Trading's Shadow Account imports your actual broker history and coldly quantifies every deviation from your own stated rules. The report doesn't lie: "You exited 73% of winning trades before target, held 89% of losers until stop-loss, and missed 4 re-entry signals that your extracted shadow strategy captured." Brutal. Necessary.
Step-by-Step Installation & Setup Guide
Prerequisites
- Python↗ Bright Coding Blog 3.11+ (required for modern typing and asyncio patterns)
- An LLM API key from any supported provider, or Ollama for local execution
- Optional: Docker↗ Bright Coding Blog for zero-setup deployment
One-Line PyPI Install (Fastest Path)
pip install vibe-trading-ai
This installs the package and registers three CLI commands:
| Command | Purpose |
|---|---|
vibe-trading |
Interactive CLI / TUI with live status bar |
vibe-trading serve |
Launch FastAPI web server |
vibe-trading-mcp |
Start MCP server for Claude Desktop, Cursor, etc. |
Initial Configuration
# Interactive .env setup — prompts for provider, API key, model selection
vibe-trading init
This creates agent/.env from the bundled example. Key variables to configure:
# Required: your LLM provider
LANGCHAIN_PROVIDER=deepseek # or openrouter, groq, gemini, ollama, etc.
DEEPSEEK_API_KEY=sk-...
DEEPSEEK_BASE_URL=https://api.deepseek.com
LANGCHAIN_MODEL_NAME=deepseek-v4-pro
# Optional but recommended for network deployments
API_AUTH_KEY=your-strong-random-key
# Optional: Tushare Pro for enhanced A-share fundamentals (AKShare is free fallback)
TUSHARE_TOKEN=your-tushare-token
Docker Deployment (Zero Local Setup)
git clone https://github.com/HKUDS/Vibe-Trading.git
cd Vibe-Trading
cp agent/.env.example agent/.env
# Edit agent/.env with your LLM credentials
docker compose up --build
Access the web UI at http://localhost:8899. The container runs as non-root with localhost-only binding by default.
Web UI Development Setup
# Terminal 1: API server
vibe-trading serve --port 8899
# Terminal 2: Frontend
cd frontend && npm install && npm run dev
Open http://localhost:5899 — the Vite dev server proxies API calls to the backend.
MCP Plugin Integration
For Claude Desktop, add to claude_desktop_config.json:
{
"mcpServers": {
"vibe-trading": {
"command": "vibe-trading-mcp"
}
}
}
21 of 22 MCP tools work with zero API keys — only run_swarm requires LLM access.
REAL Code Examples From the Repository
Example 1: Natural-Language Strategy Backtest
The simplest entry point — describe what you want, let the agent execute:
# Single-command research with automatic tool selection
vibe-trading run -p "Backtest a BTC-USDT 20/50 moving-average strategy for 2024, summarize return and drawdown, then export the report"
Behind the scenes, the agent:
- Loads the
strategy-generateandtechnical-basicskills - Fetches BTC-USDT OHLCV from OKX (free, no key needed)
- Generates Python backtest code with proper signal lag
- Runs the
BacktestEnginewith Sharpe ratio and max drawdown metrics - Emits
run_card.jsonandrun_card.mdfor reproducibility - Exports results to the requested format
The -p flag accepts any natural language prompt. The agent plans which skills, tools, and data sources to invoke — no manual orchestration required.
Example 2: Alpha Zoo Benchmarking
# List available alpha zoos and browse GTJA 191 reversal-themed factors
vibe-trading alpha list --zoo gtja191 --theme reversal --limit 10
# Inspect a specific alpha's formula and source attribution
vibe-trading alpha show gtja191_171
# Benchmark the entire zoo on CSI 300, 2018-2025, showing top 20 by IC
vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025 --top 20
The bench command runs IC (information coefficient) analysis with alive/reversed/dead categorization. Each alpha passes:
- AST purity gate: Ensures no data leakage through future-peeking operations
- Lookahead-guard test: 300-row sentinel detection for temporal integrity violations
pytest-socketnetwork kill-switch: Guarantees offline reproducibility
Results auto-render at vibetrading.wiki/alpha-library/ with per-zoo LICENSE.md attribution.
Example 3: Shadow Account Behavioral Analysis
# Upload your broker export first
vibe-trading --upload trades_export.csv
# Run the full shadow analysis pipeline
vibe-trading run -p "Analyze my trading behavior, extract my shadow strategy, and compare it with my actual trades"
This triggers a 5-step agent workflow:
# Conceptual pipeline (agent-orchestrated, not user-facing code):
# 1. read_document → parse CSV with broker-specific format detection
# 2. analyze_trade_journal → compute holding days, win rate, PnL ratio, drawdown
# 3. extract_shadow_strategy → identify recurring entry/exit patterns as explicit rules
# 4. run_shadow_backtest → simulate extracted rules on historical data
# 5. render_shadow_report → generate HTML/PDF with 8 sections:
# - Rule violations (early exits, missed entries)
# - Counterfactual trades (what shadow would have done)
# - Bias diagnostics (disposition effect, overtrading, etc.)
The extracted rules become a testable, improvable strategy — not just a psychological post-mortem.
Example 4: Multi-Agent Swarm Deployment
# Launch a full investment committee debate on TSLA
vibe-trading --swarm-run investment_committee '{"topic": "Is TSLA a buy at current levels?"}'
# Quant desk: screening → factor research → backtest → risk audit
vibe-trading --swarm-run quant_strategy_desk '{"universe": "S&P 500", "horizon": "3 months"}'
# Crypto-specific analysis with funding, liquidation, and flow coordination
vibe-trading --swarm-run crypto_trading_desk '{"asset": "ETH-USDT", "timeframe": "1w"}'
Swarm runs stream progress in real-time. Each worker receives fetched market data as grounding context. Reports persist automatically for later inspection with vibe-trading --swarm list and vibe-trading --swarm show <run_id>.
Example 5: Programmatic Multi-Factor Signal Composition
from src.skills.multi_factor.zoo_signal_engine import ZooSignalEngine
# Compose a custom multi-factor signal from pre-built alphas
engine = ZooSignalEngine.from_zoo([
"gtja191_171", # GTJA reversal factor
"gtja191_111", # GTJA momentum factor
"gtja191_163" # GTJA volume-price factor
])
# panel: your wide-format OHLCV DataFrame (symbols × dates × fields)
signal = engine.compute_signal(panel)
# signal: cross-sectional z-scored composite ready for portfolio construction
This Python API bypasses natural language entirely for production quant workflows — use the agent for exploration, then drop to code for systematic execution.
Advanced Usage & Best Practices
Model Selection Is Critical
Vibe-Trading is tool-heavy — skills, backtests, memory, and swarms all flow through LLM tool calls. Cheap models will hallucinate answers instead of executing tools. The README explicitly warns against *-nano, *-flash-lite, and distilled variants.
Recommended tiers:
- Best: Claude Opus 4.7, GPT-5.4, Gemini 3.1 Pro — for complex 3+ agent swarms and paper-grade analysis
- Sweet spot: DeepSeek-V4-Pro, Grok-4.20, Qwen3-Max-Thinking — reliable tool-calling at ~1/10 the cost
- Avoid: Any small/distilled variant — tool-calling fails silently
Persistent Memory for Research Velocity
Save your preferences once, benefit forever:
vibe-trading run -p "Remember: I prefer RSI-based strategies, max 10% drawdown, hold period 5–20 days"
Future sessions automatically recall these constraints. The memory system supports CJK characters, Thai, Arabic, Hebrew, and Cyrillic — critical for global market coverage.
Security Hardening for Production Deployments
The v0.1.7 security patch added critical defaults:
- Shell-capable tools gated by
VIBE_TRADING_ENABLE_SHELL_TOOLS=1 - File access restricted to upload/import roots unless
VIBE_TRADING_ALLOWED_FILE_ROOTSis set - API authentication required for non-local clients via
API_AUTH_KEY - Docker runs as non-root with localhost-only ports
Never expose vibe-trading serve to the internet without API_AUTH_KEY set.
Cross-Session Research Continuity
Use /continue <run_id> "refine the strategy" to pick up where you left off. The run_card.json artifacts ensure full reproducibility — share them with collaborators who can replicate your exact backtest environment.
Comparison With Alternatives
| Capability | Vibe-Trading | TradingView | QuantConnect | Jupyter + Zipline | Bloomberg Terminal |
|---|---|---|---|---|---|
| Natural language strategy generation | ✅ Native | ❌ None | ❌ None | ❌ Manual | ❌ None |
| Multi-agent research teams | ✅ 29 presets | ❌ None | ❌ None | ❌ None | ❌ None |
| Cross-market backtesting | ✅ CompositeEngine | ⚠️ Limited | ✅ Multiple | ⚠️ Add-on | ✅ Expensive |
| Pre-built alpha library | ✅ 452 factors | ❌ None | ⚠️ Community | ❌ None | ✅ Proprietary |
| Shadow Account behavioral audit | ✅ Unique | ❌ None | ❌ None | ❌ None | ❌ None |
| Free data sources | ✅ 6 loaders, auto-fallback | ⚠️ Delayed | ⚠️ Limited | ❌ Manual setup | ❌ $24K/year |
| Export to MT5/TradingView/TDX | ✅ All three | ✅ Pine only | ❌ None | ❌ None | ❌ None |
| Open source | ✅ MIT | ❌ Proprietary | ✅ Partial | ✅ Multiple | ❌ Proprietary |
| MCP/AI agent integration | ✅ 22 tools | ❌ None | ❌ None | ❌ None | ❌ None |
| Setup complexity | ⭐ One command | ⭐⭐ Web signup | ⭐⭐⭐ Cloud IDE | ⭐⭐⭐⭐ Manual | ⭐⭐⭐⭐⭐ Sales process |
Vibe-Trading's unique moat: No other platform combines natural language agent orchestration, multi-agent swarm research, behavioral audit against actual trading history, and open-source extensibility in a single package. TradingView wins on charts. Bloomberg wins on data breadth. QuantConnect wins on cloud infrastructure. Vibe-Trading wins on AI-native research velocity.
FAQ
Q: Does Vibe-Trading execute live trades? A: No. It is explicitly designed for research, simulation, and backtesting only. No broker integrations for live execution exist. This is a feature, not a limitation — it keeps the tool focused on hypothesis generation and validation.
Q: Do I need paid data subscriptions to use Vibe-Trading? A: No. AKShare (A-shares, US, HK, futures, forex), yfinance (HK/US equities), and OKX (crypto) are all free with automatic fallback. Tushare Pro enhances A-share fundamentals but is optional.
Q: How does Vibe-Trading prevent data leakage in backtests?
A: Multiple layers: AST purity gates on generated code, 300-row lookahead sentinel tests, pytest-socket network isolation for alpha benchmarks, and PIT (point-in-time) fundamental data handling with proper announcement-date alignment.
Q: Can I use my local LLM instead of cloud APIs?
A: Yes. Ollama is fully supported with no API key required. Set LANGCHAIN_PROVIDER=ollama and configure your local endpoint.
Q: What markets and asset classes are supported? A: A-shares (China), HK equities, US equities, crypto (spot + perps), global futures, forex, and options v2. The CompositeEngine handles mixed-market portfolios with shared capital pools.
Q: How do I contribute new skills or alpha factors?
A: The skill system supports full CRUD operations via skill_writer_tool.py. For alphas, the DCO (Developer Certificate of Origin) workflow accepts community PRs with per-zoo LICENSE.md compliance. Start with issues tagged good first issue.
Q: Is the Shadow Account feature psychologically safe to use? A: It will hurt your ego. The diagnostic is ruthlessly quantitative. But the extracted rules become an improvable strategy baseline — turning painful self-knowledge into actionable edge.
Conclusion
Vibe-Trading represents something rare in the quantitative finance tooling landscape: genuine democratization without dumbing down. It doesn't pretend that a chatbot can replace a PhD in financial engineering. Instead, it gives you the infrastructure that PhDs use — multi-agent research teams, institutional-grade backtesting, behavioral diagnostics, and 452 pre-built alphas — accessible through natural language and installable in seconds.
The Shadow Account feature alone could change how retail traders understand their own performance. The Alpha Zoo puts factor research within reach of anyone with Python installed. And the MCP integration means Vibe-Trading's 22 tools can plug into whatever AI-native workflow you're already building.
Is it perfect? No. The roadmap shows ambitious plans — Research Autopilot, Data Bridge, Options Lab, Portfolio Studio — that will mature over months, not days. But what's shipped today is already more capable than tools costing orders of magnitude more.
The real question isn't whether Vibe-Trading can compete with Bloomberg. It's whether you'd rather spend $24,000/year for data terminals, or zero dollars for an AI agent that generates, backtests, and exports strategies from plain English descriptions — then diagnoses why your actual trading underperforms.
Your move. Clone the repository, run pip install vibe-trading-ai, and ask your first question. The market doesn't wait for permission, and neither should your research.
Disclaimer: Vibe-Trading is for research, simulation, and backtesting only. It is not investment advice. Past performance does not guarantee future results.