vibe-trading
它能做什么
这项技能为 AI 智能体设置并说明 Vibe-Trading 金融工具包。适合希望在同一处进行回测、因子研究和获取行情数据的投资者、分析师和学生。
适用场景
- ✓当你想在股票、加密货币或其他市场上对一个交易想法进行回测的时候。
- ✓当你需要因子分析、期权定价或金融研究支持的时候。
- ✓当你想通过工具设置,把金融工具包连接到你的 AI 助手上的时候。
技能链接
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我设置 Vibe-Trading 工具包,并在几只股票上回测一个简单的移动平均线想法。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会安装该工具包,并将其添加到你的 AI 工具设置中。部分市场的核心研究工具无需 API 密钥即可使用,其他数据源则需要自己的访问权限。然后智能体会运行你要求的回测或分析。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Vibe-Trading
Professional finance research toolkit with AI-powered backtesting (11 engines), multi-agent teams, 90 specialized skills, the Alpha Zoo (478 pre-built quantitative alphas across qlib158 / alpha101 / gtja191 / academic / fundamental with one-line CLI benchmarking), and the Shadow Account loop — extract your implicit trading rules from a journal, backtest them across A股/港股/美股/crypto, then see where they would have served you better.
Setup
pip install vibe-trading-ai
Package name vs commands: The PyPI package is
vibe-trading-ai. Once installed, you get:
Command Purpose vibe-tradingInteractive CLI / TUI vibe-trading serveLaunch FastAPI web server vibe-trading-mcpStart MCP server (for Claude Desktop, OpenClaw, Cursor, etc.)
Add to your agent's MCP config:
{
"mcpServers": {
"vibe-trading": {
"command": "vibe-trading-mcp"
}
}
}
API Key Requirements
Core research MCP tools work with zero API keys for HK/US/Canada/crypto. After pip install, backtesting, market data, factor analysis, options pricing, chart patterns, web search, document reading, trade journal analysis, shadow-account extraction/backtest/report, the Alpha Zoo (478 pre-built alphas), and all 90 skills are ready to use. IBKR tools require a local TWS / IB Gateway session; run_swarm requires an LLM key.
| Feature | Key needed | When |
|---|---|---|
| HK/US/Canada equities & crypto | None | Always free (yfinance / stooq / yahoo + OKX) |
| China A-share data | None | Free via akshare / baostock / tencent / sina / eastmoney fallback (TUSHARE_TOKEN optional for premium quality) |
| Premium US fundamentals/quotes | FINNHUB_API_KEY / ALPHAVANTAGE_API_KEY / TIINGO_API_KEY / FMP_API_KEY |
Only for optional-key providers (graceful fallback to free sources) |
Multi-agent swarm (run_swarm) |
OPENAI_API_KEY + LANGCHAIN_MODEL_NAME |
Swarm spawns internal LLM workers |
What You Can Do
Shadow Account — flagship loop
Feed a CSV broker export (同花顺 / 东财 / 富途 / generic), and the agent will:
analyze_trade_journal— profile your behavior (holding period, win rate, disposition effect, chasing, overtrading, anchoring).extract_shadow_strategy— distill 3-5 if-then rules that describe your profitable roundtrips.run_shadow_backtest— backtest those rules across A/HK/US/crypto and compute delta-PnL vs your realized trades.render_shadow_report— produce an HTML/PDF report (8 sections + charts) with today's matching signals.scan_shadow_signals— list today's symbols that match your shadow's entry cadence (research only).
Backtesting
Create and run quantitative strategies across 11 engines (ChinaA, GlobalEquity, IndiaEquity, KoreaEquity, VietnamEquity, BrazilEquity, Crypto, ChinaFutures, GlobalFutures, Forex, cross-market Composite) plus an options portfolio engine, with 29 market-data sources (auto-detect + ordered fallback; the hosted forex tickerall source is explicit-only):
- HK/US equities via yfinance / stooq / yahoo (free, no API key); optionally via Longbridge historical OHLCV (
longbridge, requires the optional SDK andLONGBRIDGE_APP_KEY/LONGBRIDGE_APP_SECRET/LONGBRIDGE_ACCESS_TOKEN). To force it for a run, set"source": "longbridge"inconfig.json. - Canada equities (TSX/TSXV) via yahoo / yfinance using Yahoo's canonical
<TICKER>.TO(TSX, e.g.TD.TO) or<TICKER>.V(TSXV, e.g.PNG.V) suffixes — free, no API key. The GlobalEquity engine uses CAD identity, whole-share orders, configurable Canadian commission/slippage, and the TSX/TSXV price-increment grid. - India equities (NSE/BSE) via yahoo / yfinance using
<SYMBOL>.NS(NSE, e.g.RELIANCE.NS) or<SCRIP>.BO(BSE, e.g.500325.BO) — free, no API key. TheIndiaEquityEnginemodels T+1 delivery, no overnight shorts (setallow_shortfor intraday), configurable circuit bands, 1-share lots, and the STT/stamp-duty/exchange/GST cost stack. Optionally back-fill from your live broker via theindia_brokersource (Shoonya/Dhan; requires broker login). - Korea equities (KRX: KOSPI/KOSDAQ) via pykrx using
<CODE>.KS(KOSPI, e.g.005930.KS) or<CODE>.KQ(KOSDAQ, e.g.247540.KQ) — free, no API key (pip install "vibe-trading-ai[krx]"; yahoo/yfinance fallback needs no extra). pykrx serves daily bars only (an intraday request falls through to another sour
常见问题
使用它需要 API 密钥吗?
部分核心研究工具对若干市场无需密钥即可使用,但某些数据源和券商工具需要自己的访问权限。
它会安装哪些命令?
一个命令行界面、一个网页服务器启动器,以及供 Claude Desktop 或 Cursor 等 AI 工具使用的 MCP 服务器。
这是投资建议吗?
不是。它是一个研究工具包,在据此做决定之前,任何结果都应该经过核实。
详情
作者的原始描述
Professional finance research toolkit — backtesting (11 engines + benchmark comparison panel), factor analysis, Alpha Zoo (478 pre-built alphas across qlib158/alpha101/gtja191/academic/fundamental), options pricing, 90 finance skills, 30 multi-agent swarm teams, Trade Journal analyzer, and Shadow Account (extract → backtest → render) across 29 market-data sources (tushare, yfinance, okx, binance, akshare, baostock, tencent, mootdx, ccxt, futu, mt5, tickerall, local, eastmoney, sina, stooq, yahoo, pykrx, india_broker, qveris, longbridge, nobitex, wallex, plus optional-key finnhub/alphavantage/t
repo: HKUDS/Vibe-Trading
热度
- GitHub 星标
- 37k
- 排名
- #7494
- 许可证
- MIT
- 更新时间
- 2026/11/1
评论
- …