Vibe-Trading: The Open-Source AI Trading Agent With 22,000+ GitHub Stars That Turns Natural Language Into Trading Strategies
Vibe-Trading is a free, open-source AI-powered trading agent from HKU that lets you build, backtest, and deploy trading strategies using natural language — supporting stocks, crypto, and forex with 460+ built-in alpha factors.
Building a trading strategy used to require months of coding, expensive data subscriptions, and deep knowledge of financial markets. In 2026, an open-source project called Vibe-Trading has completely changed that equation — letting developers describe strategies in natural language and have an AI agent handle everything from data collection to backtesting to live execution.
Created by the HKU Data Intelligence Lab (HKUDS) at the University of Hong Kong, Vibe-Trading has exploded to 22,347 GitHub stars in just a few months, making it one of the fastest-growing open-source projects of the year. Here's why developers, traders, and AI enthusiasts are paying attention.
What Is Vibe-Trading?
Vibe-Trading is a self-hosted AI trading agent that combines large language models (LLMs) with professional-grade trading infrastructure. Think of it as having a quantitative analyst, a data engineer, and a portfolio manager — all wrapped into a single open-source tool you can run on your laptop.
The core idea is simple: you describe what you want in plain English ("find undervalued tech stocks with strong momentum and low volatility"), and the AI agent translates that into a fully backtestable, deployable trading strategy complete with risk management, position sizing, and execution logic.
# Install Vibe-Trading in one command
pip install vibe-trading-ai
# Start the interactive agent
vibe-trading
# Or launch the web dashboard
vibe-trading serve --port 8080
Under the hood, Vibe-Trading uses a FastAPI backend with a React frontend, connects to 18+ free market data sources (plus premium options via QVeris), and supports multiple LLM providers including OpenAI, Anthropic, DeepSeek, and NVIDIA NIM.
Key Features That Set Vibe-Trading Apart
1. Natural Language Strategy Building
Instead of writing Python code for moving average crossovers or factor models, you simply describe your strategy idea. The AI agent handles:
- Data collection — automatically fetches historical data from Yahoo Finance, Binance, Tushare, and more
- Feature engineering — selects relevant indicators from 460+ built-in alpha factors
- Backtesting — runs historical simulations with transaction costs, slippage, and survivorship bias
- Optimization — tunes parameters using walk-forward analysis to avoid overfitting
You: "Build me a mean-reversion strategy for S&P 500 stocks that buys when RSI drops below 30 and sells when it recovers above 70, with a 2% stop loss."
Vibe-Trading: [Fetches S&P 500 data, implements RSI strategy, runs 5-year backtest...]
"Strategy shows 12.3% annualized return with Sharpe ratio 1.4. Would you like me to optimize entry/exit thresholds?"
2. Shadow Account for Paper Trading
One of Vibe-Trading's most thoughtful features is the Shadow Account system. Before any strategy touches real money, it runs in a shadow environment that mirrors your broker account — tracking positions, P&L, and execution quality without risking capital.
The shadow account includes:
- Realistic slippage and commission modeling
- Market impact simulation for large orders
- Daily performance attribution and risk metrics
- Automatic alerts when strategy behavior deviates from backtests
This isn't just paper trading — it's a scientific validation layer that helps you understand whether your strategy works in live market conditions before committing real funds.
3. 460+ Built-In Alpha Factors
Vibe-Trading ships with one of the largest open-source collections of alpha factors:
- Alpha101 — WorldQuant's famous 101 formulaic alphas
- Qlib158 — Microsoft's quantitative research factors
- Fundamental factors — PIT-safe SEC data with filed-date anchoring
- Academic factors — Frazzini-Pedersen betting-against-beta and more
- Custom factors — register your own with IC/Sharpe decay monitoring
The Strategy Development Manager tracks factor performance over time, automatically detecting when factors lose their edge and suggesting replacements.
4. Multi-Market Support
Vibe-Trading isn't limited to US stocks. It supports:
- US Equities — NYSE, NASDAQ via Alpaca, Interactive Brokers
- Chinese A-shares — via Tushare and Mootdx
- Indian Equities — NSE/BSE with T+1 delivery and STT modeling
- Crypto — spot and perpetual futures via Binance, OKX
- Forex — via OANDA and Interactive Brokers
Real-World Example: Building a Crypto Momentum Strategy
Let's walk through a practical example. Say you want to build a momentum-based crypto trading bot:
Step 1: Describe your strategy
You: "I want a crypto strategy that goes long on the top 5 coins by 30-day momentum, rebalances weekly, and uses a 5% trailing stop."
Step 2: Vibe-Trading builds and backtests
- Fetches 2 years of hourly data for top 50 coins from Binance
- Implements momentum ranking with volatility adjustment
- Runs backtest with 0.1% trading fees and realistic slippage
Step 3: Review results
"Backtest results: 89% annualized return, max drawdown 34%, Sharpe 2.1.
Warning: High correlation with BTC (0.94). Consider adding stablecoin hedge."
Step 4: Deploy to shadow account
- Strategy runs for 2 weeks in shadow mode
- Tracks execution quality vs. theoretical signals
Step 5: Go live (with guardrails)
- Connect to Binance API with read-only keys first
- Enable trading with position size limits and kill switch
This entire workflow — from idea to live trading — takes about an hour instead of weeks of custom development.
Security-First Architecture
Given that Vibe-Trading handles real money and sensitive API keys, the team has invested heavily in security:
- AST-hardened backtest sandbox — generated code runs in a restricted environment that blocks network access, subprocess calls, eval(), and environment variable access
- SSRF protection — media and URL handling rejects internal network targets
- Docker hardening — read-only rootfs, dropped capabilities, resource limits
- Audit trail — every trade decision is logged with full reasoning chain
- Kill switch — instant shutdown across all positions and pending orders
In July 2026, the project completed an external security audit addressing all 10 findings — a rare level of transparency for an open-source project handling financial transactions.
The IM Channel Ecosystem
Vibe-Trading can deliver research and alerts through 16+ messaging platforms:
- Telegram, Slack, Discord, Matrix
- WhatsApp, Signal
- QQ, WeChat, Feishu/Lark, DingTalk
- Microsoft Teams, Email
- Custom WebSocket adapters
This means your AI trading agent can send you a message like: "AAPL triggered buy signal at $187.50. Position: 100 shares. Stop loss: $183.75." — directly to your phone.
Key Benefits
- Free and open-source — no subscription fees, no proprietary lock-in
- Self-hosted — your data and API keys never leave your machine
- 460+ alpha factors — one of the largest open-source factor libraries
- Multi-LLM support — works with OpenAI, Anthropic, DeepSeek, local models
- Shadow trading — validate strategies in realistic conditions before risking capital
- Multi-market — stocks, crypto, forex across US, China, India, and more
- 16+ IM integrations — get alerts wherever you are
- Security-hardened — sandboxed execution, audit trails, kill switches
- MCP server — integrate with Claude, Cursor, or any MCP-compatible AI tool
- Active community — 22,000+ stars, daily updates, Discord support
Getting Started
# Basic installation
pip install vibe-trading-ai
# Configure your LLM provider
vibe-trading config --provider openai --api-key sk-...
# Start interactive mode
vibe-trading
# Or launch the web UI
vibe-trading serve
# Connect to Alpaca for paper trading
vibe-trading broker connect alpaca --paper
The project's official documentation includes beginner tutorials in multiple languages, API references, and a comprehensive cookbook of strategy examples.
Frequently Asked Questions
Is Vibe-Trading really free?
Yes. Vibe-Trading is completely free and open-source under the Apache 2.0 license. You only pay for your chosen LLM provider (OpenAI API costs, etc.) and any premium data sources you opt into.
Can I use Vibe-Trading for real trading?
Yes, but the team strongly recommends using the Shadow Account system first to validate strategies in realistic conditions. When you're ready, you can connect to brokers like Alpaca, Interactive Brokers, or Binance — with built-in position limits and kill switches for safety.
Do I need programming experience?
Basic command-line comfort helps, but the natural language interface means you don't need to write Python code. You describe strategies in plain English, and the AI handles implementation. However, advanced users can write custom factors and strategies in Python.
What LLM providers are supported?
Vibe-Trading supports OpenAI (GPT-4o, GPT-5), Anthropic (Claude), DeepSeek, NVIDIA NIM, Google Gemini, Zhipu GLM, Kimi, and any OpenAI-compatible API. You can also use local models via Ollama for fully offline operation.
How is this different from ChatGPT for trading?
ChatGPT can discuss trading concepts, but Vibe-Trading is a complete trading infrastructure. It fetches real market data, runs professional backtests with transaction costs, manages live positions, and integrates with brokers. Think of it as the difference between talking about cooking and having a fully equipped kitchen.
Is my data safe?
Yes. Vibe-Trading is self-hosted, meaning all data stays on your machine. API keys are stored locally in encrypted .env files. The backtest sandbox prevents generated code from accessing the network or environment variables.
Can I build custom strategies?
Absolutely. Beyond natural language descriptions, you can register custom Python factors, implement complex portfolio logic, and use the Strategy Development Manager to track performance over time. The 460+ built-in factors serve as templates and building blocks.