快速判断
- 01这个 Skill 是干嘛的
- 把市场研究、策略构建、实验和交易复盘组织成可追踪的 Agent 工作流。
- 02它能解决什么问题
- 解决交易想法缺少验证链路、研究与执行脱节、结果无法系统复盘的问题。
- 03它适合谁来用
- 适合懂基础交易与风险管理、希望用 Agent 辅助策略研究的人。
<p align="center"> <a href="README.md">English</a> | <b>中文</b> | <a href="README_ja.md">日本語</a> | <a href="README_ko.md">한국어</a> | <a href="README_ar.md">العربية</a> </p>
<p align="center"> <img src="assets/icon.png" width="120" alt="Vibe-Trading Logo"/> </p>
<h1 align="center">Vibe-Trading:你的个人交易智能体</h1>
<p align="center"> <b>一条命令,让你的智能体具备完整交易研究能力</b> </p>
<p align="center"> <a href="https://trendshift.io/repositories/25527" target="_blank"><img src="https://trendshift.io/api/badge/repositories/25527" alt="HKUDS%2FVibe-Trading | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a> </p>
<p align="center"> <img src="https://img.shields.io/badge/Python-3.11%2B-3776AB?style=flat&logo=python&logoColor=white" alt="Python"> <img src="https://img.shields.io/badge/Backend-FastAPI-009688?style=flat" alt="FastAPI"> <img src="https://img.shields.io/badge/Frontend-React%2019-61DAFB?style=flat&logo=react&logoColor=white" alt="React"> <a href="https://pypi.org/project/vibe-trading-ai/"><img src="https://img.shields.io/pypi/v/vibe-trading-ai?style=flat&logo=pypi&logoColor=white" alt="PyPI"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow?style=flat" alt="License"></a> <br> <a href="https://github.com/HKUDS/.github/blob/main/profile/README.md"><img src="https://img.shields.io/badge/Feishu-Group-E9DBFC?style=flat-square&logo=feishu&logoColor=white" alt="Feishu"></a> <a href="https://github.com/HKUDS/.github/blob/main/profile/README.md"><img src="https://img.shields.io/badge/WeChat-Group-C5EAB4?style=flat-square&logo=wechat&logoColor=white" alt="WeChat"></a> <a href="https://discord.gg/6TdQnT5xcF"><img src="https://img.shields.io/badge/Discord-Join-7289DA?style=flat-square&logo=discord&logoColor=white" alt="Discord"></a> </p>
<p align="center"> <a href="https://vibetrading.wiki/">官网</a> · <a href="https://vibetrading.wiki/docs/">文档</a> · <a href="#-news">News</a> · <a href="#-key-features">Features</a> · <a href="#-shadow-account">Shadow Account</a> · <a href="#-demo">Demo</a> · <a href="#-quick-start">Quick Start</a> · <a href="#-examples">Examples</a> · <a href="#-api-server">API / MCP</a> · <a href="#-roadmap">Roadmap</a> · <a href="#-contributing">Contributing</a> </p>
<p align="center"> <a href="#-quick-start"><img src="assets/pip-install.svg" height="45" alt="pip install vibe-trading-ai"></a> </p>
---
📰 News
⚠️ 安全警告: X 账号
VibeTrading_HKU、Virtuals 项目101845及代币合约0x640BDBF77b6447E8b7DB7894cED84BD1c40571f4均非 Vibe-Trading 官方。我们从未发行或背书任何代币或 meme 币。请勿购买、连接钱包或签名。详细说明。
- 2026-07-15 🧮 回测正确性 + Portfolio Studio 核心闭环:10 个 PR 的收口批次让调仓遵守因果且不受代码顺序影响,计入终局平仓成本,以真实成交计算换手率,加入敞口上限,并确保验证输出严格且有限(#530/#531/#532/#540)。历史图表复用实际数据源,重复行情查询不再被静默丢弃,
.env加载后会刷新缓存配置(#535/#544/#554)。Portfolio Studio #456 与配置问题 #541 已关闭,provider 修复 #528/#529 也完成收口;感谢 @YZY0108、@santhreal、@Robin1987China、@xkam7ar、@Marnie0415 和 @marichu99。
- 2026-07-14 🌉 长桥行情数据 + 现代 MCP 传输 + Provider 可靠性:Longbridge 接入历史行情 fallback 层,采用密钥门控、日期窗口分段、严格完整性检查和可选 SDK 依赖;四个中国市场资金流工具新增经过验证的 Tushare fallback,负最终净值也不再导致回测指标崩溃。MCP server 新增 Streamable HTTP,
write_file可安全恢复别名或缺失的路径参数,hypothesis 更新会拒绝不支持的字段,Correlation 请求也已接入认证。NVIDIA NIM 现已成为 Web Settings 和两套 CLI onboarding 的一等 provider,并通过带版本号的兼容 User-Agent 处理报告中的 403;Web Settings 统一写入~/.vibe-trading/.env、迁移 legacy 配置并清晰报告权限错误,修复 DeepSeek 保存阶段的 500(#534,关闭 #516/#524;#528/#529)。感谢 @fanfpy、@asahikiko、@santhreal、@sTunnaSu、@abhishekjaisinghani、@huangcheng、@ShiroKSH、@Meru143、@DIEGOD79 和 @not-knope 提供代码、报告与诊断。
- 2026-07-13 🔒 安全加固:外部审计 10 项发现全部关闭 + 贡献者批次:2026-07-10 外部安全审计(issue #476,讨论区 #468)的全部 10 条发现现已在
main上修复——Docker 多阶段重构 + 摘要锁定基础镜像、AST 硬化的回测沙箱(拦截网络/子进程/eval/os.environ/不安全 open,含嵌套函数体内部)、短生命周期一次性 SSE 认证票据、加固的 Compose(只读根文件系统、丢弃 capabilities、资源限制)、/correlation加认证与限流、安全响应头、哈希锁定依赖等。同时合入:Alpaca 密钥隔离的可选 TAP 模式(#377,感谢 @0xZKnw)、回测指标里的已实现组合换手率(#478,感谢 @Robin1987China)、Frazzini-Pedersen 低贝塔溢价学术因子(Alpha Zoo → 461,#480,感谢 @YogeshModi24)、全部 5 个组合优化器的前视偏差修复(#487,感谢 @YZY0108),以及两个 preflight/provider 配置修复(#479/#484,关闭 #477/#482,感谢 @ananaymital/@Bortlesboat)。
<details> <summary>更早的更新</summary>
- 2026-07-12 🧪 Strategy Development Manager + 贡献者修复批次:新的
strategy-dev-managerskill(第 87 个)把学术论文和券商研报转化为已注册的因子/策略,带持久化 artifact store 和自动化 IC/Sharpe 衰减监控 ——sdm_register/sdm_status/sdm_decay_scan驱动 active → monitoring → decayed → disabled 生命周期,数据存于~/.vibe-trading/(#457,关闭 #455,感谢 @shadowinlife)。同时合入:Correlation 页支持裸 ticker(AAPL,SPY)并走完整 loader fallback 链(#472,关闭 #471,感谢 @yxhuang),localloader 通过 OHLCV 重采样真正支持请求的 interval(#467,感谢 @Shizoqua),Binance USD-M 永续历史数据落地 —— 显式BTC-USDT-PERP路由 + 成交价/标记价分离,作为 #462 的第一片(#470,感谢 @honginp),FastMCP transport import 兼容两种模块布局(#469,感谢 @roberttidball),Requesty 作为 OpenAI 兼容 LLM 网关 provider 上线(#474,感谢 @Thibaultjaigu)。
- 2026-07-11 🚀 v0.1.11 发布(
pip install -U vibe-trading-ai):汇总 0.1.10 以来三周的全部更新——一等公民级印度股票(NSE/BSE)回测、PIT-safe 基本面因子层(Alpha Zoo → 460)、16 个适配器的 IM 通道运行时、端到端定时研究、可选 QVeris 付费数据,以及今天的贡献者批次:turnover-aware 组合优化器(#466,感谢 @Robin1987China)、analyze_image视觉工具 + NapCat DM pairing + IM 媒体读取修复(#464/#463/#465,感谢 @fei-moss)、长桥 Decimal 序列化(#459,感谢 @fanfpy),以及打包 manifest 数量守卫(#461,感谢 @asahikiko)。完整细节:CHANGELOG · release notes。
- 2026-07-10 🇮🇳 印度股票(NSE/BSE)支持 + 环境变量集中化:新增专属
IndiaEquityEngine——T+1 交收、涨跌停熔断带、config 驱动的 STT/印花税/交易所/SEBI/GST 成本栈——配套.NS/.BO符号路由、可选的只读 Shoonya/Dhan 数据桥,255 个 alpha101/qlib158 因子纳入新的equity_inuniverse(#305,感谢 @muku314115)。环境变量统一收进单一 PydanticEnvConfigschema,并新增 AST CI 门禁防止未来os.getenv蔓延(#440,关闭 #438,感谢 @shadowinlife)。另有:提交真实交易 mandate 前的二次确认弹窗与统一错误提示(#453,感谢 @wison1717-maker)、scheduled-research 路由测试(#452,感谢 @Robin1987China),以及 zhipu provider 上 GLM 思考模型不再丢失 reasoning 流(#458)。
- 2026-07-09 🧯 Docker 启动解阻 + provider/CLI 贡献者批次:当 FastAPI route 遍历遇到没有
path的 included-router-like 条目时,Docker/server 启动不再直接崩溃(#450,感谢 @Penn-Live)。同时合入一批排队中的 quick-win 贡献者修复:OKX / Tushare / yfinance 的 loaderfetch()签名已对齐协议(#437,感谢 @shadowinlife),CLI resume prompt 会保留用户输入的第一句话(#448,关闭 #447,感谢 @morluto),Codex OAuth 默认模型更新为openai-codex/gpt-5.4(#446,感谢 @morluto),Kimi for Coding 成为独立 provider(#435,感谢 @yxhuang),opencode provider 映射已接入(#444,感谢 @imsankz),Tushare reference code fence 也从pyhton修成python(#449,感谢 @flash1234pku)。验证包含 focused server/CLI/provider/loader tests、Docker build 和/healthsmoke。
- 2026-07-08 💎 基本面因子层(Phase 1)+ 可选 QVeris 付费数据 + 维护日:PIT-safe 的 SEC 财报数据现在直接进日频因子 panel ——
fund:*面板列、以 filed 日锚定(重述与 YTD 帧防护),新增 4 个质量/价值因子(zoo 现 460 个)。数据路由新增可选付费轨:18 个免费源仍是默认,QVeris 一把 key 解锁 63+ provider,入口 Settings → QVeris 或vibe-trading data mode paid(见下方 QVeris 小节)。另外:api_server模块化收官(1,103 → 371 行,#424 关闭 #331,感谢 @shadowinlife)、回测validation.json不再要求 artifacts 目录预先存在(#429,感谢 @isaveall)、--swarm-run报错更清晰(#428,感谢 @isaveall),以及我们 revert 了导致会话聊天崩溃的 governance stack(#433,感谢 @yxhuang 的精准诊断)。
- 2026-07-07 ✅ 贡献者 PR 批次:合入了排队中的贡献者工作:IM channel timeout 配置(#413,感谢 @SyntaxSawdust)、Alpha Library 社交预览图与入门教程(#396、#393,感谢 @kadaliao)、value-investing skills / tools / committee presets(#407,感谢 @sambazhu)、
trading_place_order的零值 order sizing 字段处理(#417,感谢 @irfanallana-oss),以及 session/API 路径的 timezone-aware UTC timestamp(#397,感谢 @mustafakamal88)。
- 2026-07-06 🧭 Preflight 加固、API route 拆分与中国搜索 fallback:provider preflight 现在不再跟随 redirect(#404,关闭 #402,感谢 @SyntaxSawdust);剩余 API routes 迁入更聚焦的模块(#387,覆盖并取代 #383-#386,感谢 @shadowinlife);中国网络搜索 fallback 接入阿里云 IQS(#408,感谢 @sambazhu)。维护者补改提交加入 no-network fallback tests 并清理 EOF whitespace(fbac74f);main CI 已转绿(run 28780619018)。
- 2026-07-05 ✅ 贡献者 PR 队列收口 + Windows baseline 转绿:今天选定的 4 个 non-draft PR 已合入。A 股 mootdx 批量拉取不再用 bare
except吞掉KeyboardInterrupt/SystemExit,长任务可以被正常Ctrl+C中断(#399,关闭 #398,感谢 @shadowinlife)。Settings route 拆分与依赖安全下限也已按原贡献者 PR 合入并保留 credit(#382、#390,感谢 @shadowinlife 和 @aeonframework)。Windows baseline 兼容性现在隔离 loader cache、让 OAuth cache 权限断言按平台处理、Windows 上跳过一个 fork-only mock test,并让 MCP loopback fixtures 绕过代理(#401,感谢 @Elfsa-Miranda)。验证:4701 passed, 47 skipped。
- 2026-07-04 🧩 API 路由继续拆分、中文入门教程与依赖安全线:IM channel 与 Settings routes 已从
api_server.py迁入src/api/channels_routes.py/src/api/settings_routes.py,延续 #331 的窄切片模块化路径(来自 #379、#382,感谢 @shadowinlife)。Wiki 新增面向非金融读者的中文入门教程(#393,感谢 @kadaliao);Pillow / LangChain / LangGraph 依赖下限也更新到可安装的安全轨道(#390,感谢 @aeonframework)。
- 2026-07-04 🧹 会话与 API 路径的 UTC 时间戳清理:收紧 #395 的时间戳修复——session、goal、channel 与 API 时间戳现在统一输出显式 ISO 格式的时区感知 UTC 值。
- 2026-07-03 🛡️ Robinhood MCP 刷新 + API 模块化 + SSRF 防护:Robinhood Agentic Trading 现在在通用读取、live runner、默认只读 seed 和 mandate-gate 测试中统一使用当前 MCP 工具名;交互式启动也会按 provider loader 的同一顺序识别
.env:~/.vibe-trading/.env→agent/.env→$CWD/.env(#391,关闭 #381 和 #380)。System routes(/health、/correlation、/system/shutdown、/skills、/api)作为下一段 API 模块化窄切片迁入src/api/system_routes.py(#378,感谢 @shadowinlife)。通道媒体 SSRF 防护现在会在 fetch 前拒绝 CGNAT/mesh/non-global 目标和 QQ media redirect-to-internal(#389,感谢 @hobostay)。
- 2026-07-02 ⚡ 因子加速 + 更稳的运行边界:滚动因子热路径现在使用
bottleneck/NumPy 快路径,alpha bench 的进程并行避免反复传输大面板数据,base equity 计算也补上回归覆盖(#376,关闭 #339,原始工作来自 @shadowinlife 的 #342)。上传与 Shadow report 路由已从巨大的api_server.py中拆出,作为 API 模块化的第一刀,同时 #331 继续保持 open(#375,基于 #358,感谢 @shadowinlife)。生成式回测子进程现在只继承 allowlist 环境变量,不再暴露完整父进程 secret surface(#374,关闭 #332);IM 通道也新增/new会话重置,并让 pairing 命令大小写不敏感(#372,关闭 #371,感谢 @shadowinlife)。
- 2026-07-01 🧹 安全打磨 + tracker 清理:收紧 API/Docker/frontend dev 默认值,修稳 Settings channel 与
zh-CN边界,清掉前端依赖/CSP alerts,并关闭过期的 WhatsApp + paper-trading tracker 项(#338、#351、#349、#365、#367、#350、#335、#283)。
- 2026-06-30 💬 IM 通道运行时接入研究交付:Vibe-Trading 现在可把同一套 agent session runtime 接到 16 个内置消息适配器:WebSocket、Telegram、Slack、Discord、Matrix、WhatsApp、Signal、QQ/NapCat、微信/企业微信、飞书/Lark、钉钉、Teams、email、Mochat。CLI(
vibe-trading channels status/start/stop/login/pairing)、REST(/channels/status、/channels/start、/channels/stop、/channels/pairing/command)和 Web UI Settings 面板已覆盖状态、恢复提示、启停与 sender pairing;SDK 型适配器继续通过vibe-trading-ai[telegram]或vibe-trading-ai[channels]等 extras 按需安装(#341)。
- 2026-06-29 🛡️ 实盘交易安全顾问 + Trading 212 只读连接器 + Windows/Gemini 修复:实盘下单守卫现在提供可选的、券商无关的
PreTradeAdvisoryInterface,在记录顾问审查的同时不绕过 mandate gate、kill switch 或审计追踪(#328,关闭 #317,感谢 @shadowinlife)。Trading 212 加入连接器层,支持只读账户、持仓、订单、历史和合约元数据;place_order/cancel_order在有结构性 paper/live 边界之前仍硬拒绝(#321,关闭 #309,感谢 @mvanhorn)。Windows 启动通过<3.0.0约束避免 pandas 3.0Timestamp崩溃(#329,关闭 #324,感谢 @hannibal-lee);Geminithought_signaturedict-history 重放已在main验证修复(#318);.US财务报表现在路由到 SEC EDGAR 而非东方财富(#325);Alpha Library 着陆页获得 cache/date/selector/noscript/DNS-prefetch 加固,更重的 CSP 和社交卡片跟进工作仍在追踪中(#323)。
- 2026-06-28 🧰 跨平台 setup/dev + 运行态与文件工具加固:
vibe-trading setup和vibe-trading dev现在能正确处理 Windows TypeScript 构建、从正确 cwd 启动后端、使用 Vite 的 5899 端口,并在退出时干净关闭子进程(#292,感谢 @digger-yu)。Runtime 状态轮询现在会优雅降级而不是崩溃(#322);MCP OAuth cache key 已做脱敏规范化(#313);OpenAI 默认模型与 Robinhoodagent.json校验进一步收紧(#319、#320,感谢 @mvanhorn);文件工具也补上了独立读/写 roots 与更完整的 sandbox 测试(#299,感谢 @skloxo)。 - 2026-06-27 🧯 内容过滤韧性 + Shadow Account 特征契约清理:事件驱动与 swarm 运行现在会跳过单个 LLM 内容审核命中,在 run card 中提示较高过滤率,并识别 Gemini safety finish reason,而不是让整次分析直接失败(#308,关闭 #307,感谢 @shadowinlife)。Shadow Account 抽取与代码生成现在共用同一个
PRICE_FEATURES契约,并保留四位小数的收益边界,避免规则/codegen 漂移以及prior_5d_return精度损失(#316,感谢 @Robin1987China)。 - 2026-06-26 🎯 Shadow Account 条件入场 + tushare ETF/指数/港股路由:抽取出的 Shadow Account 规则现在会带上 RSI / 前期收益的区间,生成的 SignalEngine 据此按真实条件入场(RSI 落在区间内、前期收益落在区间内),不再盲目复现持仓节奏(#314,承接 #302,感谢 @Robin1987China)。tushare loader 也会把 ETF/LOF 路由到
fund_daily()、指数到index_daily()、港股到hk_daily(),不再一律调用对非股票静默返回空的daily(),并加上每只标的的空结果与部分缺失告警(#315,关闭 #310,感谢 @shadowinlife)。 - 2026-06-25 🧪 严格 validation JSON + 更稳的 agent 上下文:独立回测 validation 现在会在写出
artifacts/validation.json或 CLI stdout 前归一化嵌套的NaN/Infinity,严格 JSON 解析器不再被验证载荷卡住(#306,感谢 @gyx09212214-prog)。Agent prompt 的数据源数量也改为从 loader registry 动态推导,_microcompact()只有在真实 token 压力下才会触发,短运行不会再过早清掉旧工具结果(#296,关闭 #282,感谢 @MarkfuGod)。 - 2026-06-24 🎯 Shadow Account 入场价格上下文 + 中文 UI 响应式本地化 + 局域网鉴权修复:Shadow Account 规则抽取现在能看到 point-in-time 安全的入场上下文——按
buy_dt经 loader registry 读取entry_rsi14与prior_5d_return,离线/无数据时优雅降级(#302,承接 #295,感谢 @Robin1987China)。Web UI 主面板进一步接入响应式英文 / zh-CN 翻译,覆盖图表、聊天、Alpha 因子库、Correlation 与 Run Detail(#301,感谢 @skloxo)。CSRF 加固后,配置了API_AUTH_KEY的远程同源 Web UI 部署现在又能正常 POST / upload,而跨站 mismatch origin 仍会被拦截(#304,感谢 @Hinotoi-agent)。 - 2026-06-23 🛡️ 本地 API CSRF 加固:恶意网页不再能对环回(loopback)API 发起不安全的跨站请求(POST/PUT/DELETE)——CORS 只挡响应读取、挡不住副作用,因此环回 dev-mode 信任现在会在放行之前先对不安全方法应用既有的跨站防护。安全方法与本地 CLI / 非浏览器上传不受影响(#293,感谢 @Hinotoi-agent)。
- 2026-06-22 🔧 Live 授权 OAuth 修复 + Alpha Zoo 标题修复:
connector authorize现在能在长达数分钟的券商登录期间保持 OAuth 握手不断开(可通过VIBE_LIVE_AUTHORIZE_TIMEOUT_SECONDS调整),且重试时不再另起一个抢占式回调服务器,token 终于能正确保存(#281,关闭 #259,感谢 @Robin1987China)。Alpha Zoo 页面不再把 alpha 数量渲染两次(#287,关闭 #286,感谢 @digger-yu)。定时研究也补上了端到端使用文档(#288)。 - 2026-06-21 ⏰ 定时研究执行器 + 报告库 + 回测后归因:定时研究现已端到端跑通——一个默认关闭的后台执行器(
VIBE_TRADING_ENABLE_SCHEDULER)按 interval/cron 到点触发任务并经会话运行时执行(#278,感谢 @mvanhorn,关闭 #254)。新增/reports运行库页面,可列出、搜索、筛选有报告产出的运行,并链接到运行详情 + 对比(#224,感谢 @LemonCANDY42)。此外每次回测后 agent 现在会自动跑分层归因——交易级盈亏 Top 榜、Beta 回归、市场状态(regime)分析与 Monte Carlo 置换检验,按数据可用性与路由条件触发(#280,感谢 @shadowinlife)。 - 2026-06-20 🔬 Research Autopilot 闭环(第三阶段)+ loader OHLC 完整性守卫 + 4 个学术因子:Research Autopilot 现在可端到端跑通 假设 → 信号引擎 → 回测——
scaffold_signal_engine按 runner 契约生成信号引擎,link_autopilot_backtest把回测指标自动回写到假设(68 个工具)(#267)。一道结构性的 OHLC 合法性校验在 loader 边界集中丢弃脏 bar(high < low、非正价格、high/low 未包住 open/close),守护每一个数据源(#274,感谢 @Shizoqua)。同时 academic 学术因子家族从 6 个扩到 10 个——Jegadeesh 反转、George-Hwang 52 周高、Amihud 非流动性、Harvey-Siddique 偏度(456 个因子)(#277,感谢 @Robin1987China)。 - 2026-06-19 🚀 v0.1.10 — 全球数据层:行情数据源从 10 个增至 18 个(免费直连 东方财富 / 新浪 / Stooq / Yahoo + 可选 key 的 Finnhub / Alpha Vantage / Tiingo / FMP,按封禁风险排序 fallback),外加 18 个只读数据工具(资金流、龙虎榜、北向、融资融券、大宗交易、SEC EDGAR + XBRL、财报、期权链、全市场筛选……)覆盖 A股 / 美股 / 港股,全部经 MCP 暴露。本版同时卷入 0.1.9 以来的全部更新——10 个券商连接器、
alpha compare、provider 可靠性大修、可选数据缓存。pip install -U vibe-trading-ai - 2026-06-18 🔬 Research Autopilot 第一阶段 + 本地 Data Bridge 加载器,外加 Discord 安全提示:新增
run_research_autopilot+generate_backtest_config,把假设 → 研究目标 → 回测打通(现 50 个工具),新local加载器直接从你的 CSV / Parquet / DuckDB 文件读 OHLCV(#260、#252,感谢 @Robin1987China),并修了 DeepSeekDSML工具调用解析与一波标识符收敛加固。⚠️ 安全提示:旧社区 Discord 邀请现指向一个我们已无法控制、跑着假冒 Collab.Land 钱包"验证"钓鱼的服务器——已全部移除;唯一官方 Discord 是 HKUDS 服务器(discord.gg/6TdQnT5xcF),我们绝不会要求你连接钱包。 - 2026-06-17 🧩 安装兼容 + Opus/Kimi provider 修复:基础
pip install vibe-trading-ai不再拉取可选的pyharmonics/ta依赖链;谐波形态识别现在放到vibe-trading-ai[harmonic]extra 后面,同时保留内置 fallback 检测器(#250,关闭 #249)。Agent loop 也不再发送 Opus 4.8+ 会拒绝的 assistant-prefill handoff 消息,Kimi/Moonshot 可通过MOONSHOT_USER_AGENT覆盖客户端User-Agent(#248,关闭 #246 和 #204);后续测试已直接覆盖 background-result 与 auto-compact 两条 handoff 路径(#251)。 - 2026-06-16 🛡️ 安全/API 加固 + GLM/Zhipu alias:Settings 写入在配置认证时必须鉴权(#245);API session 中 shell-capable 工具必须显式设置
VIBE_TRADING_ENABLE_SHELL_TOOLS=1才会暴露(#243);配置 API key 后 local shutdown 也要求鉴权(#241);看似 loopback 但不可信的 Host 会被拒绝,而不再被当成本地请求(#242)。运行边角也继续打磨:Web chat 会同步已完成尝试(#236),run card 对非有限指标写出 strict JSON(#238),畸形RSSHUB_TIMEOUT_S/RSSHUB_FETCH_BUDGET_S会安全回退(#240),ddgs retry fallback 已有回归覆盖(#239)。GLM/Zhipu 现在是一等 provider alias,并支持按模型名推断(#247,关闭 #237)。
- 2026-06-15 🧭 Web 搜索韧性 + Web UI 运行连续性修复:
web_search不再因单个引擎被限流而失败——现在按序查询多个免费、免 key 的引擎(DuckDuckGo、Google、Bing、Brave、Mojeek、Yahoo),带重试/退避,把"无结果"当作空答案而非错误,所有引擎都被限流时返回可操作的提示而不是一个干巴巴的 ❌(可用VIBE_TRADING_SEARCH_BACKENDS覆盖引擎列表)(#232,关闭 #231,感谢 @Ethan-sun01)。Web UI 方面,运行过程中切换页面不再卡死——聊天页返回时会重新订阅实时流并回放期间错过的进度(#234)——停止按钮现在会在流式中和工具之间即时生效,而不只是在迭代边界(#235),两个症状一起关闭了 #229(感谢 @kalkinj)。baostock loader 也开始接受原生的sh.601398/sz.000001代码格式,与 tushare 风格的601398.SH并存(#230,感谢 @bhlt)。
- 2026-06-14 📊 按运行记录 token 用量 + Run Detail 图表按需加载:每次 agent 运行现在都会把 provider 上报的 token 用量持久化为运行级的
llm_usage.json——provider/模型、累计总量、逐迭代计数——并附加到/runs/{id}上,这样一次运行结束、实时流消失后,它的 token 成本依然可审计(仅 provider 上报值;不抓 prompt/内容,不估算价格)(#223,感谢 @LemonCANDY42)。Run Detail 页面也不再一上来就加载每个标的的 K 线:默认/runs/{id}响应保持不变,但 UI 现在先渲染运行摘要,再通过可选的?chart_payload=summary/?chart_symbol=模式按需加载每个标的的图表,带有逐标的的加载状态和一个"全部加载 + 进度"控件(#225,感谢 @LemonCANDY42)。两个 loader 修复收尾:yfinance 的排他end边界不再漏掉请求范围内的最后一个交易日——下载调用现在传end + 1 天,而缓存键仍保留原始范围(#226,感谢 @gyx09212214-prog);畸形的CCXT_TIMEOUT_MS/OKX_TIMEOUT_S值现在会告警并回退到默认值,而不是在 import 时抛错、阻塞启动(#227,感谢 @gyx09212214-prog)。 - 2026-06-13 ↩️ 从 CLI 按 ID 恢复历史会话:交互式 CLI 现在会在退出时打印 session-id,并附上可直接复制的
vibe-trading resume <session-id>提示——找某次运行对应的 trace 不再需要靠时间戳去猜agent/sessions/下哪个目录最新。新增的vibe-trading resume <session-id>子命令会重新打开那个确切的会话,并把最近几轮对话回放进 loop;ID 不存在时会立即报错退出,而不是静默开一个空会话(#218,感谢 @zwrong)。 - 2026-06-12 🩺 Provider 可靠性大修——DeepSeek 卡死、Kimi 接入、流式存活:一批 provider 报告——DeepSeek 运行卡在"智能体工作中…"(#208,感谢 @XYWOX)、
reached max iterations掩盖了模型空响应(#203,感谢 @mojianliang)、卡住后 UI 无法恢复(#195,感谢 @mafia23)、Kimi 拒绝客户端(#204,感谢 @liao497)——指向同一个根因:所有 OpenAI 兼容 provider 共用一个 shim,把 DeepSeek/Kimi/Gemini 的协议怪癖全局套用,还静默吞掉流式失败。现在 provider 专属行为收进显式的能力层(capability layer)——reasoning 捕获/回放、Gemini thought signature、KimiUser-Agent、OpenRouter reasoning body 各自只作用于自己的 provider,不再互相污染。纯 reasoning 流式会显示实时 "Reasoning…" 指示而不是一片死寂;流式失败会抛出带上下文的provider_stream_error,瞬态中断自动重试一次(确定性 4xx 立即失败),不再静默降级为慢速非流式调用;模型空响应被如实诊断为empty_model_response而非"max iterations";SSE 心跳不再破坏重连回放;卡死的只读工具会超时退出而不是永远躲在心跳后面。新增vibe-trading provider doctor,一条命令打印脱敏的 provider/模型/包/代理快照,快速定位环境侧假卡死。DeepSeek 用户可通过pip install "vibe-trading-ai[deepseek]"启用官方原生 adapter;kimi-k2.x 的temperature=1要求自动适配——Kimi 链路已对真实 API 完成端到端验证(kimi-k2.6工具调用 + 严格多轮 reasoning 回放)。
- 2026-06-11 🐝 Swarm worker 全面接入 loader 层行情数据:一次 NVDA 投资委员会运行暴露出一串缺口——worker 自己手写 yfinance 脚本、轻信了一根残缺的最新 K 线(有成交量但 OHLC 为空)、
NaN泄漏进非严格 JSON,丢失上下文的续跑 prompt 还被路由到错误的 preset(#198,感谢 @BillDin 出色的诊断和两个修复 PR)。现在 swarm worker 拥有本地get_market_data工具,与 MCP 共用同一套归一化 loader 注册表——严格 JSON、非有限浮点序列化为null——并接入所有行情类 preset(13 个 preset、21 个 worker),prompt 政策引导 OHLCV 工作优先走工具(#199);run_swarm支持显式preset_name,含糊的续跑片段会被直接拒绝,而不是静默回落到equity_research_team(#200)。Grounding 也更聪明:swarm prompt 里裸写的美股代码(如NVDA)会自动提升为NVDA.US(带停用词防误判),worker 从一开始就拿到权威的预取价格。该工具同时进入主 agent 注册表——现在共 48 个工具。另外:Docker 数据现在可以跨更新存活——持久记忆、会话搜索索引、自建 skills、shadow account 和 broker 配置都放进了命名数据卷,docker compose up --build不会再清空它们(#197,感谢 @FlyerJ)。 - 2026-06-10 🐳 Docker 开箱即可访问宿主机 Ollama:容器内的
localhost指向容器自身,默认的OLLAMA_BASE_URL=http://localhost:11434让所有 Docker + Ollama 组合的 LLM 预检直接失败。docker-compose.yml现在默认指向http://host.docker.internal:11434(导出OLLAMA_BASE_URL可覆盖),并加入host-gateway的extra_hosts映射,在 Linux 上与 Docker Desktop 一样开箱即用(#196,感谢 @ShahNewazKhan)。 - 2026-06-09 🔑 从另一台机器打开 Web UI 时的报错更清晰:从非 loopback 客户端(另一台机器、虚拟机宿主机、局域网里的手机)访问聊天且未设
API_AUTH_KEY时,所有敏感接口——发消息、列会话、live 状态——都会返回403,但聊天界面只笼统显示 “Failed to send message, please retry.”。现在发送路径会直接给出真实原因——“Remote API access requires an API key. Add it in Settings, or run the backend on localhost for local-only use.”——README 的 Web UI 配置说明也讲清了 localhost 与局域网的区别以及三种解法(在同一台机器上用localhost访问;设置API_AUTH_KEY并在 Settings 里填一次;或为 Docker Desktop 宿主网关设VIBE_TRADING_TRUST_DOCKER_LOOPBACK=1)(#191,感谢 @mafia23)。 - 2026-06-08 🔧 Gemini 3.x 多轮工具调用修复:补全了 Gemini 3.x 思考模型的修复。6/05 的回传(#176)只覆盖了内存中的历史,而真正的 agent loop 会把历史以 OpenAI 格式的 dict 回放,LangChain 在构建请求前丢掉了每个工具调用的
thought_signature——导致多轮工具调用仍以missing thought_signature报 400。现在它会在invoke与stream共用的唯一入口_convert_input处重新挂回(并行调用——N 个里只有第一个带签名——也已涵盖)(#184,感谢 @ngoanpv)。 - 2026-06-07 🐝 聊天时间线中的实时 swarm 状态:当 agent 启动多智能体 swarm(投资委员会、量化台、风险委员会……)时,聊天界面现在会内联渲染一张状态卡,实时流式展示每个 worker 的状态——等待 / 运行 / 完成 / 失败 / 阻塞 / 重试——与独立 swarm 仪表盘一致的逐 agent 可见性。运行时事件被桥接进会话 SSE 流,且不改动现有的
/swarm/runsAPI;重连或回放历史时,已结束的卡片会从最终的run_swarm结果复原(#188,感谢 @BillDin)。preset 路由也更精准:显式指定的 preset(如investment_committee,带不带下划线均可)现在优先于关键词打分,而裸IV衍生品关键词也不再误匹配 “given” 之类普通单词(#189,感谢 @BillDin)。 - 2026-06-06 ⚖️ Alpha 对比 —— CLI / Web UI / REST / agent 四端齐全:新增
alpha compare,把你手选的一组 Alpha Zoo 因子放在同一 universe 和区间上两两对比,按 IC 均值/标准差、IR、IC>0 比例或样本数排名,并标出每个因子与榜首的差距。不同于整库 bench,它只评估你点名的因子(新增run_bench(only=…)子集过滤),所以对比 3 个因子不会再把整库 191 个全跑一遍。四端共用同一套核心:vibe-trading alpha compare <id1> <id2> … --sort ir(CLI)、Alpha Zoo Web UI 的 Compare 视图(在目录里勾选因子 → 一键对比 + 流式排名表)、POST /alpha/compare+ SSE(REST),以及只读的alpha_compareagent 工具(工具数达 47)。 - 2026-06-05 🇮🇳 Dhan + Shoonya connector(印度)——10 家券商:connector-first 交易层新增 Dhan 与 Shoonya 两个印度券商(NSE/BSE 股票 + F&O),券商总数达到十家。两者均为模拟盘 + 只读——与长桥一样,其 API 不暴露运行时的模拟/正式判别标识,因此
place_order/cancel_order在第一行就硬拒任何非模拟配置(通用规则:无结构性模拟/正式守卫的券商一律封顶模拟盘 + 只读)(#181,收尾 #174)。本轮还修复了 Gemini 2.5 / 3.x 思考模型:每个工具调用的thoughtSignature现在能在 OpenAI 兼容路径上完整回传,多轮 function calling 不再因INVALID_ARGUMENT失败(#176,关闭 #170,感谢 @mvanhorn 与 @jliu6789)。全部 452 个 Alpha Zoo 因子补上了中文 docstring(中文名称/说明/用途)(#180,感谢 @LeeCQiang);前端测试套件(197 个 vitest 用例)加上后端鉴权 / 路径穿越 / CORS 安全测试也进了 CI(#175,感谢 @sambazhu)。 - 2026-06-04 🗃️ 全部 7 个数据源的可选本地缓存:新增
VIBE_TRADING_DATA_CACHE开关,让每个回测 loader——tushare、okx、ccxt、akshare、mootdx、yfinance、futu——把已结算的历史 bar 缓存到~/.vibe-trading/cache(用户主目录,绝不写入仓库),让重复以及长周期 / 跨市场回测跳过网络、避开数据源限流。默认关闭。批量与连接型 loader(yfinance、futu)在缓存全部命中时完全跳过批量下载 / FutuOpenD 连接;结算守卫绝不缓存截止到当天的区间(最后一根 bar 还在形成中);缓存帧与实时拉取的结果逐字节一致(#177,感谢 @mvanhorn)。同时还落地了一份面向 AI / 自动化辅助 PR 的贡献者指南,梳理了安全的本地检查项与高风险的 broker/MCP/凭证操作面(#173)。 - 2026-06-03 🧹 社区 triage + trace 关联:工具调用的 trace 条目现在带上原始
call_id,回放 run trace 时可以把tool_result对回它的tool_call——入参预览仍保持截断,避免 trace 文件膨胀(#168,感谢 @zwrong)。源码注释不再指向外部贡献者找不到的内部文档路径(#166,感谢 @jaleelpersonal)。另外澄清了安装时的langchain-community依赖解析告警只是残留旧包的无害提示、并非安装失败(#167),并把 Gemini 2.5/3.0 函数调用的thoughtSignature往返梳理成一条带完整修复方案的help wanted任务(#170,感谢 @jliu6789)。 - 2026-06-02 🔌 六个新券商 connector(老虎 / 长桥 / Alpaca / OKX / 币安 / 富途):connector-first 交易层在 IBKR(本地)和 Robinhood(MCP)之外,新增一条直连 SDK 传输。每个 connector 都暴露只读的账户 / 持仓 / 订单 / 行情 / 历史,外加模拟账户下单——把你的策略放到这些券商的模拟盘上跑。其中五个(老虎、Alpaca、OKX、币安、富途)还支持在用户提交的 mandate(标的/单量/敞口/杠杆/每日笔数)约束下的有界下单,沿用与 Robinhood 同一套安全模型:用户提交的 mandate、文件级即时 kill switch、fail-closed 的下单前门禁,以及完整审计账本。长桥仅支持模拟盘 + 只读(其 API 不暴露运行时的模拟/正式判别标识)。每一处模拟/正式的区分都是按券商落实的结构性守卫——账户 id 格式、host 隔离、demo 标志或 trade environment。新增
trading_place_order/trading_cancel_order工具;mandate universe 也补上了港股和 A 股资产类别。实验性 / 风险自负。 - 2026-06-01 🚀 v0.1.9 发布(
pip install -U vibe-trading-ai):汇总 0.1.8 以来的全部更新。Connector-first 券商 profile(IBKR 本地只读 TWS / IB Gateway + Robinhood Agentic Trading,受 OAuth、已提交 mandate、order guard、审计账本和即时 halt 约束)。Research Goal 运行时贯通 CLI / REST / MCP / Web。一轮 swarm 升级——实时 reconcile + MCP keepalive、operator 配置的 worker MCP 工具、严格 alpha-bench 随机控制,以及新增retry_run重跑失败/过期 run(现 36 个 MCP 工具)。agent/cli/包重构 + 刷新的终端 UI、mootdx免 token A 股 loader,以及 backtest / agent loop / session 的健壮性增强。--version现在始终与已安装版本一致,修复 0.1.8 漂移(#156)。 - 2026-05-31 🔌 Connector-first 券商架构(IBKR + Robinhood):交易接入现在从可选择的 connector profile 开始,不再拆成分散的券商入口和 live 入口。
vibe-trading connector list/use/check/account/positions/orders/quote/history与 MCPtrading_*工具共享同一个选中的 profile;paper/live 只是该 connector 下的属性。IBKR 可立即通过本地只读 TWS / IB Gateway profile 使用;官方 IBKR 远程 MCP 先作为 OAuthmcp.read探测种子,等待稳定 read 工具名后再映射。Robinhood Agentic Trading 仍是有界 live MCP connector,必须经过 OAuth、已提交 mandate、order guard、审计账本和即时 halt。 - 2026-05-30 🧰 健壮性专项 — backtest、agent loop、session:LLM 生成的 signal engine 现在会在实例化前先过接口预检,提前抓出循环 self-import、缺失
generate()、__init__参数没有默认值、返回类型错误等常见问题,并给出可操作的 JSON 报错而非原始 traceback(#149);后续一并把源码级 AST 校验的报错也走同一套干净的 JSON 信封。agent loop 不再把 50 次迭代全烧光后留下一个没有任何输出的failed状态——它复用 swarm worker 已验证的做法:在迭代预算 80% 处注入 wrap-up nudge,并在最后一次迭代丢掉 tool 定义以强制产出文本答案(#148),且只在中途触发,绝不挤掉 research-goal 上下文。session 消息写入现在每次 append 后flush + fsync,让昂贵的 AI 回复能在写到一半崩溃时存活;读取端则跳过损坏的 JSONL 行(记录前 200 字符以便人工恢复),而不是让整个/messages端点 500(#147)。Web 输入框也修了 IME 回车处理,让中日韩输入法的确认上屏回车不再误触发提交(#146)。 - 2026-05-29 🔐 支持 Robinhood Agentic Trading(可选开启、有界自主):新增对 Robinhood Agentic Trading 的支持(远程 MCP,OAuth)。默认关闭且只读;仅在用户提交的 mandate(标的/单量/敞口/杠杆/每日笔数)内自主交易,配文件级即时 kill switch、抢占式平仓、mandate 自动过期、完整审计账本,以及一个持久自主 runner。无托管、无场所——券商持有资金并执行,我们只中继意图。实验性 / 风险自负。
- 2026-05-28 🧪 Swarm 安全 + 严格 alpha 门 + worker 端 MCP:Swarm DAG 在上游任务失败时阻断下游任务(#145)。新增
run_bench_strict()在 IC 门之上加入同 universe 随机控制 + 训练/测试 OOS 切分,识别只是跟随市场 beta 的伪因子(#143,感谢 @Soli22de)。Swarm worker 现在可以调用 operator 配置的外部 MCP server,信任边界由专项测试固定(#142,感谢 @shadowinlife)。 - 2026-05-27 📊 mootdx A 股数据源 + 输出排版:新增
mootdxloader,走原生通达信 TCP 协议拉 A 股 OHLCV(无需 token,无 IP 速率限制,日线 + 分钟线 25 页 walk-back 分页),在 fallback chain 中位于 tushare 和 akshare 之间(#107)。CCXT loader 现在会读取HTTP_PROXY/HTTPS_PROXY/ALL_PROXY,使 Binance/OKX 公开数据可在受限网络下拉取(#126,感谢 @ruok808)。最终回答的渲染也去掉了 CLI 和 Web 上丑陋的全宽---分隔符:系统提示鼓励 agent 用 markdown 表格和##标题,CLI 渲染端兜底 strip 孤立 HR,前端 chat 气泡隐藏任何漏过去的<hr>(#139,感谢 @sdwxm188)。 - 2026-05-26 ✅ Research Goal 生命周期闭环:Goal 模式现在像真正的任务运行器:Web UI 创建 goal 会创建或绑定 session,并立刻发出 kickoff turn;active goal 可在 Web/API/CLI/MCP 中继续、编辑、取消和完成;agent loop 会按当前 goal snapshot(criteria、evidence、claims、open items)推进,而不是只按最初 prompt。criteria 已 covered 但 goal 仍 active 时,会进入 audit/status 更新,不再静默停住,并用 backend、CLI、MCP 与 frontend events 回归覆盖固定。
- 2026-05-25 🧼 更干净的 Chat UI + composer 工作流:Web UI 现在把注意力留给下一步输入:upload、swarm 和 research-goal 模式都收进 composer 的
+菜单,不再用漂浮面板打断聊天。当前上下文会以紧凑 chip 附在输入框上方,goal 详情只在点击 chip 时原地展开。UI 也移除了旧的自定义 i18n 层,改用直接英文文案;Full Report card 只在真正有报告价值的 run 出现;本地 dev 启动与状态报告也加固,方便稳定做浏览器 smoke test。 - 2026-05-24 🎯 Research Goal runtime:新增 session 级 Research Goal 层,贯通 backend、CLI、API/MCP、SSE 和 Web UI。Goal 会持久化 claim、acceptance criteria、evidence row、budget 与 completion policy;agent tools 可以创建 goal 并追加 evidence;
/goal成为 CLI 入口;REST/MCP 暴露 goal snapshot 和 evidence 写入;SSE 保持 chat client 状态新鲜。后续审计修复锁紧 verified evidence,阻断 agent tool 写入 live-trading 风险层,串起 CLI 创建的 goal 与后续 turn,删除 session 时清理 goal ledger,接上 replay-all,并修复前端跨 session snapshot race。 - 2026-05-23 🖥️ 交互式 CLI 刷新:终端入口现在使用更大的 Vibe-Trading banner、更清晰的 prompt 分隔线、上一轮摘要、运行后耗时,以及 Claude Code 风格的活动轨来展示实时 agent 工作。工具调用、网页/数据抓取、shell 风格动作、Markdown 回答和管道表格都会以更易读的 transcript 渲染;pipe 或非 TTY 运行仍保留适合自动化的纯文本输出。生成的 CLI 截图现在作为本地 artifact 处理,不再提交进 docs,让仓库更轻。
- 2026-05-22 🧭 Swarm 恢复 + MCP keepalive:Swarm 状态现在每次读取都会从实时 task 文件 reconcile,API/MCP/SSE/list 视图可以自动恢复 crash 或过期 run,不再永久停在
running快照。run_swarm在 MCP polling 期间持续发送 progress heartbeat,首帧固定为swarm_started run_id=<id>,方便 transport 掉线后的客户端找回句柄;worker 的 LLM streaming、grounding fetch、tool execution 也都包上了 heartbeat。stale-run reaper 按每个 run 的阈值判断,并从 task 状态推导终态;SwarmToolwait budget 用尽后不再取消仍在跑的 team,MCP 客户端也可以调用reap_stale_runs()显式清理。今天的 DX pass 还同步刷新 provider 默认模型,并把 CI syntax check 对齐到新的agent/cli/包。22 条新回归覆盖 hydrate、终态恢复、stale 回收、keepalive cadence、env 容错和 heartbeat wiring;完整 swarm/MCP 套件 169 passed、4 skipped。 - 2026-05-21 🧱 CLI 包重构:
agent/cli.py(3216 行)拆成agent/cli/包 —— 交互入口、slash 路由、Rich 组件,加_legacy.pyshim 保留所有子命令并 re-export 所有公共符号,cli.cmd_*/cli._INIT_ENV_PATH/cli.Confirm不变。新增 FastAPI middleware:浏览器直开/runs/{id}或/correlation时返回 SPA shell;Vite dev proxy 同步收窄到相同 regex。版本号通过cli/_version.py单一来源(--version与 banner 不再 drift),python -m cli通过__main__.py恢复,chat-gate 收窄使chat --help/chat extra正确走 legacy argparse 而不被新 REPL 吞掉。 - 2026-05-20 🔬 Hypothesis Registry CLI:补齐了 5-16 上线但只有后端的 Hypothesis Registry 的 CLI 侧。
vibe-trading hypothesis list输出 Rich 表格或 JSON(支持--status过滤、--limit);show <id>渲染详情面板,包含已 link 的 run card;invalidate <id> --note "..."把 status 翻成rejected,省略--note时保留原有 invalidation notes。沿用VIBE_TRADING_HYPOTHESES_PATH环境变量,并新增按调用覆盖的--path。22 个新单测覆盖 wiring、JSON 输出、状态过滤、limit、缺 id 报错、备注持久化。 - 2026-05-19 ✨ 工具实时反馈 + 优雅取消:长时间运行的工具(回测、大 PDF、swarm worker)不再看起来卡死。每个工具调用现在会发出 3 秒一次的心跳,以及结构化的阶段进度 ——
run_backtest输出阶段标记(validate/simulate/finalize),read_document在 PDF 上按页打点 / Excel 上按工作表打点,read_url标记fetch/parse。CLI 的 Rich Live 面板渲染 Unicode 转轮、ASCII 进度条、ETA,按工具名最多堆叠 3 个并行工具;前端 chat 新增ToolProgressIndicator,rAF 合并刷新、ARIArole="status"+ 隐藏的原生<progress>供屏幕阅读器使用,已知总数时切换为 determinate 的ProgressRingSVG。CLI 中第一次Ctrl+C现在会调agent.cancel()优雅退出(当前步骤跑完、trace 干净关闭);2 秒内第二次Ctrl+C强制退出。顺手抽出可复用基础件:ProgressBar.tsx和lib/tools.ts(共享工具名 i18n 映射)。 - 2026-05-18 🧹 清理一次 + 3 个潜伏 bug 修复:
CompositeEngine不再把无交易所后缀的中国期货代码(如RB2410)错误路由到GlobalFuturesEngine——_is_china_futures移到共享的_market_hooks模块,产品代码表做了大小写归一并加入非中国交易所守卫,新增 9 条回归用例。session FTS5 索引现在会持久化时间戳,跨 session 搜索可按日期排序;同一改动也修复了 re-upsert 路径每次都用 wall-clock 覆盖started_at的副作用 bug。前端 Vite dev proxy 补上漏配的/alpha,AlphaZoo 页在npm run dev下不再 404。tests/test_e2e_harness_v2.py(真 LLM 的 e2e 套件)现在用VIBE_TRADING_RUN_LIVE_E2E=1做环境门控,CI 不再因为有无 LLM key 而静默切状态。Ruff 为 factor zoo 添加per-file-ignores(3783 → 0 F401 噪音),前端 tsconfig 打开noUnusedLocals/noUnusedParameters做回归护栏,并删掉了 76 个gtja191alpha 文件里没用上的vw = vwap(...)残留。净 -918 行。 - 2026-05-17 🧬 Alpha Zoo v1(0.1.8):内置 452 个量化 alpha,覆盖 4 个 zoo ——
qlib158(Microsoft Qlib 的 Alpha158 特征,Apache-2.0 出处声明)、alpha101(Kakushadze 的 "101 Formulaic Alphas",从 arXiv:1601.00991 论文公式重写)、gtja191(国君证券 2014 短周期交易型因子研报)、academic(Fama-French 5 因子 + Carhart 动量的价格代理实现)。一行 CLI 就能在自己的 universe 上跑横评:vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025。配套设施包括 AST 纯函数门禁、lookahead 防护测试、pytest-socket网络隔离、每个 zoo 一份 LICENSE.md、社区贡献用的 DCO 签名流程;Alpha Library 自动渲染上线 vibetrading.wiki/alpha-library/;Research Lab 同步发布 《191 个 GTJA alpha 哪些在 2026 还能用》。 - 2026-05-16 🧪 研究主干更新:新增后端 Hypothesis Registry,提供
create_hypothesis、update_hypothesis、link_backtest、search_hypotheses;外部内容读取工具现在会附加 warning-only 的security_warnings;Shadow Account 扫描也从旧的日历 phase stub 升级为确定性的 OHLCV 特征评估。 - 2026-05-15 🪪 Run 详情页现在会在 metrics 和 artifacts 旁边渲染 Trust Layer 的 run card,把 2026-05-12 已落地的
run_card.json工作补齐到 UI 一侧。PersistentMemory.add()也根据 #108/#109/#110 的 triage,在长度限制、空 / 纯空白 name、以及 C0/C1 控制字节三条路径上做了加固(#112,感谢 @Teerapat-Vatpitak)。 - 2026-05-14 🌐 公开 Wiki 已上线 vibetrading.wiki,包含 docs、tutorials、Research Lab 和 Alpha Library,并通过 Cloudflare Pages 部署。持久记忆也可以通过 CLI 使用
vibe-trading memory list/show/search/forget检查(#102,感谢 @Teerapat-Vatpitak);记忆 tokenizer/slug 现在支持泰语、阿拉伯语、希伯来语和西里尔文字(#104)。 - 2026-05-13 🧭 Swarm 运行现在会用已获取的市场数据为 worker 提供依据,并生成更清晰的持久化报告(#93,#84)。
- 2026-05-12 🧾 回测现在会随 artifacts 一起输出
run_card.json和run_card.md,便于复现实验研究。 - 2026-05-11 🧭 记忆 slug、swarm 统计与 CLI 预检:持久记忆在生成文件 slug 时会保留 CJK 字符,避免中文/日文/韩文笔记发生静默文件名冲突(#95,感谢 @voidborne-d)。Swarm 运行总量现在优先采用 provider 返回的 token 用量,并保留原有估算作为 fallback(#94,感谢 @Teerapat-Vatpitak)。CLI 运行界面也新增了启动预检,用于发现常见环境问题(#96,感谢 @ykykj)。
- 2026-05-10 🧱 回归护栏与运行元数据:记忆召回现在将下划线视为 token 边界,因此
mcp_wiring_test这类 snake_case 记忆可以匹配 "mcp wiring" 等自然语言查询(#87,感谢 @hp083625)。MCP server 增加了覆盖 initialize →tools/list→tools/call的 subprocess smoke test,以防止首次调用死锁路径回归(#86)。同时还完成了多项低风险加固:Windows 路径敏感测试、API best-effort 异常处理、backtestrun_dirallowed-root 校验,以及 SwarmRun provider/model 元数据(#88,#90,#91,#92,感谢 @Teerapat-Vatpitak)。 - 2026-05-09 🛡️ API 路径加固与 MCP server 稳定性:API run/session 路由现在会在查询前校验 path ID,拒绝包含换行等异常字符的参数,并将该行为纳入 auth/security 回归测试(#80,感谢 @SJoon99)。MCP server 现在会在主线程预热工具注册表再处理
tools/call,避免懒加载工具发现中的首次调用死锁(#85,感谢 @Teerapat-Vatpitak)。Vite dev proxy 也会为非默认后端目标遵循VITE_API_URL(#82,感谢 @voidborne-d)。 - 2026-05-08 🧾 筛选器支持 Tushare 财报字段:A 股日线回测现在可以通过
fundamental_fields请求 PIT-safe 财务报表字段,使信号引擎能够在公告/披露日之后筛选income_total_revenue、income_n_income、balancesheet_total_hldr_eqy_exc_min_int、fina_indicator_roe等带表名前缀的字段(#76,感谢 @mrbob-git)。后续加固让显式财报字段请求在 Tushare enrich 无法运行时快速失败,而不是静默回退到原始价格 bar(#77)。 - 2026-05-07 📈 Tushare fundamentals 与社区 triage:新增面向基本面研究工作流的 point-in-time
TushareFundamentalProvidercontract,并为项目TUSHARE_TOKEN环境路径加入回归覆盖(#74)。社区 triage 也明确了:Vibe-Trading 目前会将快速迭代聚焦在单一 UI 语言;在已内置 DuckDuckGo 支持的web_search时避免添加冗余搜索依赖;非官方托管部署不应被视为 API key 或数据源 token 的可信存放位置。 - 2026-05-06 🚀 v0.1.7 发布(Release notes,
pip install -U vibe-trading-ai):安全边界加固已发布到 PyPI 和 ClawHub,覆盖更安全的 API/read/upload/file/URL/generated-code/shell-tool/Docker 默认行为,同时保持 localhost CLI/Web UI 工作流低摩擦。本周期还包含 Web UI Settings、相关性热力图、OpenAI Codex OAuth、A 股 pre-ST 筛选、交互式 CLI UX、swarm preset 检查、股息分析、开发工作流打磨,以及经审计的前端构建依赖下限。感谢 0.1.7 贡献者,也感谢 lemi9090 (S2W) 的协同安全验证。 - 2026-05-05 🛡️ 安全边界后续加固:完成围绕显式 CORS origins、Settings 凭据指示、Web URL 读取和 Shadow Account 代码生成的剩余安全边界加固,并为每条路径加入回归测试。普通 localhost CLI/Web UI 工作流保持不变;远程部署应继续使用
API_AUTH_KEY和显式可信 origins。 - 2026-05-04 🖥️ 交互式 CLI UX 与 CI 清理:交互模式现在拥有实时底部状态栏,可显示 provider/model、session 时长、最近一次运行延迟和累计工具调用统计;并通过
prompt_toolkit支持 prompt 历史导航和方向键光标编辑(#69)。当prompt_toolkit或 TTY 不可用时,CLI 仍会回退到 Rich prompts。CI 路径期望也已与加固后的 file-import sandbox 和跨平台/tmp解析对齐,使 main 恢复绿色(bb67dc7)。 - 2026-05-03 🛡️ 安全加固补丁:收紧非本地部署的默认 API 认证,保护敏感 run/session/swarm 读取,限制上传与本地文件读取边界,按入口限制 shell-capable 工具,导入前校验生成策略加载,并让 Docker 镜像默认以非 root 用户和 localhost-only 端口发布运行。本地 CLI 和 localhost Web UI 工作流仍保持低摩擦;远程 API/Web 部署应设置
API_AUTH_KEY。 - 2026-05-02 🧭 股息分析与更清晰路线图:新增
dividend-analysisskill,用于收入型股票、派息可持续性、股息增长、股东收益、除息机制和收益率陷阱检查,并由 bundled-skill 回归测试固定。公开路线图现在聚焦即将开展的工作:Research Autopilot、Data Bridge、Options Lab、Portfolio Studio、Alpha Zoo、Research Delivery、Trust Layer 和 Community sharing。 - 2026-05-01 🔥 相关性热力图、OpenAI Codex OAuth 与 A 股 pre-ST 筛选:新的相关性 dashboard/API 会计算滚动收益相关性,并为组合与标的分析渲染 ECharts 热力图(#64)。OpenAI Codex provider 现在通过
vibe-trading provider login openai-codex使用 ChatGPT OAuth,并加入 Settings 元数据和 adapter 回归测试(#65)。新增并加固ashare-pre-st-filterskill,用于 A 股 ST/*ST 风险筛查,包括 Sina 处罚相关性过滤,避免证券账户提及错误抬高 E2 计数(#63)。 - 2026-04-30 ⚙️ Web UI Settings 与 validation CLI 加固:新增 Settings 页面,用于配置 LLM provider/model、base URL、reasoning effort 和数据源凭据,由本地/认证保护的 settings API 与数据驱动的 provider metadata 支撑(#57)。同时加固
python -m backtest.validation <run_dir>,让缺失、空白、格式错误、不存在和非目录输入在 validation 开始前以清晰的面向操作者的信息失败(#60)。 - 2026-04-28 🚀 v0.1.6 发布(
pip install -U vibe-trading-ai):修复pip install/uv tool install后vibe-trading --swarm-presets返回空的问题(#55)—— preset YAML 现在打包在src.swarm包内,并由 6 个回归测试固定。同时 AKShare loader 会将 ETF(510300.SH)和外汇(USDCNH)正确路由到对应 endpoint,并强化 registry fallback。汇总 v0.1.5 以来的所有内容:benchmark comparison panel、/uploadstreaming + size limits、Futu loader(港股 + A 股)、vnpy export skill、安全加固、前端懒加载(688KB → 262KB)。 - 2026-04-27 📊 Benchmark panel 与上传安全:回测输出现在包含 benchmark comparison panel(ticker / benchmark return / excess return / information ratio),并通过 yfinance 支持 SPY、沪深 300 等解析(#48)。此外
/upload会以 1 MB chunk 流式读取请求体,并在超过MAX_UPLOAD_SIZE时中止,在超大/畸形客户端场景下限制内存使用(#53)——由 4 个回归用例固定。 - 2026-04-22 🛡️ 加固与新集成:
safe_path+ journal/shadow tool sandbox 强制路径 containment,MANIFEST.in在 sdist 中包含.env.example/ tests / Docker files,route-level lazy loading 将前端初始 bundle 从 688KB 降到 262KB。另有面向港股与 A 股 equities 的 Futu data loader(#47)和 vnpy CtaTemplate export skill(#46)。 - 2026-04-21 🛡️ Workspace 与文档:相对
run_dir会规范化到 active run dir(#43)。README 使用示例(#45)。 - 2026-04-20 🔌 Reasoning 与 Swarm:所有
ChatOpenAI路径都会保留reasoning_content,Kimi / DeepSeek / Qwen thinking 全链路可用(#39)。Swarm streaming 与干净的 Ctrl+C(#42)。 - 2026-04-19 📦 v0.1.5:发布到 PyPI 与 ClawHub。
python-multipartCVE 下限升级,接入 5 个新 MCP tools(analyze_trade_journal+ 4 个 shadow-account tools),修复pattern_recognition→patternregistry,Docker 依赖对齐,SKILL manifest 同步(22 MCP tools / 71 skills)。 - 2026-04-18 👥 Shadow Account:从券商流水中提取你的策略规则 → 跨市场回测 shadow → 生成 8 节 HTML/PDF 报告,明确展示你错过了多少机会(规则违背、过早离场、错过信号、反事实交易)。新增 4 个工具、1 个 skill,总计 32 tools。Trade Journal + Shadow Account 示例现在已在 Web UI 欢迎页中提供。
- 2026-04-17 📊 Trade Journal Analyzer 与 Universal File Reader:上传券商导出(同花顺/东财/富途/generic CSV)→ 自动生成交易画像(持仓天数、胜率、盈亏比、回撤)+ 4 类行为偏差诊断(处置效应、过度交易、追涨、锚定)。
read_document现在以统一调用分发 PDF、Word、Excel、PowerPoint、图片(OCR)和 40+ 文本格式。 - 2026-04-16 🧠 Agent Harness:跨 session 持久记忆、FTS5 session search、自进化 skills(完整 CRUD)、5 层上下文压缩、read/write tool batching。27 tools,107 个新增测试。
- 2026-04-15 🤖 Z.ai 与 MiniMax:Z.ai provider(#35),MiniMax temperature 修复与模型更新(#33)。13 个 providers。
- 2026-04-14 🔧 MCP 稳定性:修复 stdio transport 下 backtest tool 的
Connection closed错误(#32)。 - 2026-04-13 🌐 跨市场组合回测:新的
CompositeEngine可用共享资金池和分市场规则回测混合市场组合(例如 A 股 + crypto)。同时修复 swarm template variable fallback 和前端 timeout。 - 2026-04-12 🌍 多平台导出:
/pine可一条命令将策略导出到 TradingView(Pine Script v6)、TDX(通达信/同花顺/东方财富)和 MetaTrader 5(MQL5)。 - 2026-04-11 🛡️ 可靠性与 DX:
vibe-trading init.env bootstrap(#19)、预检、运行时数据源 fallback、加固的回测引擎。多语言 README(#21)。 - 2026-04-10 📦 v0.1.4:Docker 修复(#8)、
web_searchMCP tool、12 个 LLM providers、akshare/ccxt依赖。发布到 PyPI 与 ClawHub。 - 2026-04-09 📊 Backtest Wave 2:ChinaFutures、GlobalFutures、Forex、Options v2 engines。Monte Carlo、Bootstrap CI、Walk-Forward validation。
- 2026-04-08 🔧 多市场回测,支持分市场规则、Pine Script v6 导出、5 个数据源自动 fallback。
</details>
---
✨ Key Features
<div align="center"> <table align="center" width="94%" style="width:94%; margin-left:auto; margin-right:auto;"> <tr> <td align="center" width="50%" valign="top"> <img src="assets/feature-self-improving-trading-agent.png" height="130" alt="Self-improving trading agent"/><br> <h3>🔍 自我改进的交易智能体</h3> <div align="left"> • 自然语言市场研究<br> • 策略草稿与文件/网页分析<br> • 由记忆驱动的研究工作流 </div> </td> <td align="center" width="50%" valign="top"> <img src="assets/feature-multi-agent-trading-teams.png" height="130" alt="Multi-agent trading teams"/><br> <h3>🐝 多智能体交易团队</h3> <div align="left"> • 投资、量化、加密与风控团队<br> • 流式进度与持久化报告<br> • Worker 基于已获取的市场数据展开分析 </div> </td> </tr> <tr> <td align="center" width="50%" valign="top"> <img src="assets/feature-cross-market-data-backtesting.png" height="130" alt="Cross-market data and backtesting"/><br> <h3>📊 跨市场数据与回测</h3> <div align="left"> • A 股、港股、美股、加密、期货与外汇<br> • 数据 fallback 与组合回测<br> • PIT 数据、验证与 run cards </div> </td> <td align="center" width="50%" valign="top"> <img src="assets/feature-shadow-account.png" height="130" alt="Shadow Account"/><br> <h3>👥 Shadow Account</h3> <div align="left"> • 券商交易日志行为诊断<br> • 基于规则的 Shadow Account 对比<br> • 可导出的审计报告与策略代码 </div> </td> </tr> </table> </div>
💡 What Is Vibe-Trading?
Vibe-Trading 是一个开源研究工作台,用于把金融问题转化为可运行的分析。它将自然语言提示连接到市场数据加载器、策略生成、回测引擎、报告、导出和持久研究记忆。
它面向研究、模拟和回测——并且在你选择时,可通过你自己授权的券商(如 Robinhood Agentic Trading)进行自主交易。它不托管任何资金,绝不超出你设定的限额交易,且你可随时一键停止。
---
✨ What You Can Do
| 任务 | 输出 |
|---|---|
| 提出交易问题 | 结合工具、数据、文档和可复用 session 上下文的市场研究。 |
| 回测策略想法 | 策略代码、指标、benchmark 上下文、验证 artifacts 和 run cards。 |
| 复盘自己的交易 | 券商日志解析、行为诊断、规则提取和 Shadow Account 对比。 |
| 改进重复研究 | 持久记忆和可编辑 skills 将有用流程变成可复用工作流。 |
| 运行分析师团队 | 面向投资、量化、加密、宏观和风控工作流的多智能体研究评审。 |
| 把研究接入 IM 通道 | 通过 WebSocket、Telegram、Slack、Discord、Matrix、WhatsApp、Signal、QQ/NapCat、微信/企业微信、飞书/Lark、钉钉、Teams、email、Mochat,在 CLI、REST 和 Web UI 中管理同一套 session runtime。 |
| 交付可用成果 | 报告、TradingView Pine Script、TDX、MetaTrader 5、MCP tools,以及可延续的研究 sessions。 |
| 跑预置 alpha zoo 横评 | 461 个 alpha 因子(Qlib 158 + Kakushadze 101 + GTJA 191 + academic + PIT-safe fundamental),一行 CLI 在你选的 universe 上算 IC + IR + alive/reversed/dead 分类 |
---
⚡ Quick Example
pip install vibe-trading-ai
# 自然语言研究
vibe-trading run -p "Backtest a BTC-USDT 20/50 moving-average strategy for 2024, summarize return and drawdown, then export the report"
# 一行 CLI 跑预置 alpha zoo 横评
vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025 --top 20
vibe-trading --upload trades_export.csv
vibe-trading run -p "Analyze my trading behavior, extract my shadow strategy, and compare it with my actual trades"
---
👥 Shadow Account
Shadow Account 从你自己的交易记录出发,而不是从通用策略模板出发。
上传券商导出,让智能体总结你的交易行为,然后将真实交易路径与基于规则的 shadow strategy 进行对比。
| 步骤 | 智能体输出 |
|---|---|
| 1. 读取交易日志 | 解析来自同花顺、东方财富、富途和 generic CSV 格式的券商导出。 |
| 2. 生成行为画像 | 持仓天数、胜率、盈亏比、回撤、处置效应、过度交易、追涨和锚定检查。 |
| 3. 提取你的规则 | 将反复出现的入场/出场行为转化为明确策略画像,而不是空泛总结。 |
| 4. 运行 shadow | 回测提取出的规则,并高亮规则违背、过早离场、错过信号和替代交易路径。 |
| 5. 交付报告 | 生成可检查、可归档或在后续 session 中继续精修的 HTML/PDF 报告。 |
vibe-trading --upload trades_export.csv
vibe-trading run -p "Analyze my trading behavior, extract my shadow strategy, and compare it with my actual trades"
---
🧪 Research Workflow
多数运行都会遵循同一条证据路径:路由请求、加载正确的市场上下文、执行工具、验证输出,并保持 artifacts 可检查。
| 层 | 发生什么 |
|---|---|
| Plan | 选择相关金融 skills、tools、数据源,以及在有帮助时选择 swarm preset。 |
| Ground | 通过可用 loader 拉取 A 股、港股/美股、加密、期货、外汇、文档或网页上下文。 |
| Execute | 生成可测试的策略代码,运行工具,并使用匹配的回测引擎或分析工作流。 |
| Validate | 在适用时加入指标、benchmark comparison、Monte Carlo、Bootstrap、Walk-Forward、run cards 和 warnings。 |
| Deliver | 返回报告、artifacts、tool traces,以及面向 TradingView、TDX、MetaTrader 5、MCP clients 或后续 sessions 的导出。 |
---
📡 数据源与智能 Fallback
一次 get_market_data 调用,19 个免费行情数据源(另有可选付费市场 QVeris)。设 source: "auto"——loader 按符号自动选源,再沿按 被封 IP 风险 排序的同市场链向下走(永不封的公开源在前,限速 / 需 key 的在后)。零配置,无单点故障。
| Source | Markets | Auth | Role |
|---|---|---|---|
tencent · mootdx | A-share | none | never IP-banned (mootdx = 通达信 TCP) |
eastmoney | A / US / HK | none | OHLCV + deep fundamentals & flow tools (throttled) |
baostock · akshare | A (+ US/HK/futures/macro/fx) | none | free fallbacks |
tushare | A / futures / fund / macro | token | richest A-share |
yahoo · sina · stooq | US (/HK) | none | direct chart/quotes/options · K-line to 1984 · EOD CSV |
yfinance | US / HK | none | wrapper |
finnhub · alphavantage · tiingo · fmp | US | key | optional providers |
qveris | 全球多资产 | key · credits | 付费市场 — 一把 key 通 63+ 家(仅显式选用,绝不进 auto 链) |
okx · ccxt | crypto | none | OKX + 100+ exchanges |
futu | HK / A | OpenD | optional local FutuOpenD |
india_broker | 印度(NSE/BSE) | 券商登录 | 只读 Shoonya / Dhan bars,服务 .NS / .BO(fallback 链尾) |
local | any | none | your own CSV / Parquet / DuckDB via local: prefix |
Fallback 链(按被封 IP 风险排序):
- A股 →
tencent·mootdx·eastmoney·baostock·akshare·tushare·local - 美股 →
yahoo·stooq·sina·eastmoney·yfinance·tiingo·fmp·finnhub·alphavantage·akshare·local - 港股 →
eastmoney·yahoo·futu·yfinance·akshare·local - 印度(NSE/BSE) →
yahoo·yfinance·india_broker·local - 加密 →
okx·ccxt·yfinance·local · (期货 / 基金 / 宏观 / 外汇 →tushare/akshare→local)
除 OHLCV 外,18 个只读数据工具深入基本面与资金面——资金流、龙虎榜、北向、两融、大宗交易、股东户数、解禁、板块、研报、新闻、SEC 文件、财务报表、期权链、机构持仓、全市场筛选、代码搜索、宏观——全部经 MCP 暴露。显式 local: 源永不静默 fallback 到网络源。
💎 可选付费数据 — QVeris
<img src="https://www.qveris.com/logo-color.png" alt="QVeris" height="36">
数据可走免费,也可按需上付费。 默认仍是 19 个内置免费源:自动 fallback、无需 key、无成本。通过 QVeris 可用一个 key 解锁 63+ provider、10,000+ capabilities(per QVeris),覆盖期权 Greeks、高级基本面、中国/港股/全球数据、宏观、加密、新闻与 filings;失败调用不扣费。入口在 Settings → QVeris 或 vibe-trading data mode paid。
QVeris 披露:通过 Vibe-Trading 推荐链接 注册可额外获得 1,000 积分,同时支持本项目。
---
🔩 Detailed Capabilities
为保持主 README 易读,详细清单折叠在下方。需要检查可用构件时可展开查看。
<details> <summary><b>Finance Skill Library</b> <sub>9 个类别中的 87 个 skills</sub></summary>
- 📊 87 个专业金融 skills,分布在 9 个类别中
- 🌐 覆盖传统市场、加密与 DeFi
- 🔬 从数据源到量化研究的完整能力链路
| 类别 | Skills | 示例 |
|---|---|---|
| Data Source | 10 | data-routing, tushare, yfinance, okx-market, akshare, mootdx, ccxt, eastmoney, sec-edgar, qveris |
| Strategy | 19 | strategy-generate, cross-market-strategy, technical-basic, candlestick, ichimoku, elliott-wave, smc, multi-factor, ml-strategy |
| Analysis | 21 | factor-research, macro-analysis, global-macro, valuation-model, earnings-forecast, credit-analysis, dividend-analysis |
| Asset Class | 9 | options-strategy, options-advanced, convertible-bond, etf-analysis, asset-allocation, sector-rotation |
| Crypto | 7 | perp-funding-basis, liquidation-heatmap, stablecoin-flow, defi-yield, onchain-analysis |
| Flow | 8 | hk-connect-flow, us-etf-flow, edgar-sec-filings, financial-statement, adr-hshare |
| Tool | 10 | backtest-diagnose, report-generate, pine-script, doc-reader, web-reader, vnpy-export, trade-journal |
| Research | 2 | alpha-zoo, strategy-dev-manager |
| Risk Analysis | 1 | ashare-pre-st-filter |
</details>
<details> <summary><b>自定义数据源</b> <sub>注册你自己的历史 OHLCV loader</sub></summary>
需要一个我们没有内置 loader 的市场或数据商?自己加一个历史 K 线 loader,用 source="<name>" 选用即可。以下步骤会改动包源码,请从 clone 运行(pip install -e .)。
- 编写 loader —— 新建
agent/backtest/loaders/<name>_loader.py,写一个满足
DataLoaderProtocol 的类(duck-typed,无需基类),并打上 @register:
```python import pandas as pd from backtest.loaders.registry import register
@register class DataLoader: name = "mysource" # the value you pass as source= markets = {"us_equity"} # a_share/us_equity/hk_equity/crypto/futures/fund/macro/forex requires_auth = False
def is_available(self) -> bool: return True # token present? network reachable?
def fetch(self, codes, start_date, end_date, *, interval="1D", fields=None): # return {symbol: DataFrame indexed by trade_date, # columns: open, high, low, close, volume} ... ```
- 注册模块 让
@register生效 —— 把"backtest.loaders.<name>_loader"加进
agent/backtest/loaders/registry.py 的 _loader_modules。
- 放行名称 通过配置校验 —— 把
"mysource"加进agent/backtest/runner.py
的 _VALID_SOURCES。
- (可选) 把它放进
registry.py中某个市场的FALLBACK_CHAINS,让
source="auto" 也能命中它。
- 使用 —— 在回测配置里写
source="mysource",或经 CLI / agent 调用。
实时 ticks / 盘口深度不在 loader 范围内 —— loader 层只负责 point-in-time 历史 K 线。实时行情走 broker connector:加密用
okx/binance/ccxt, 股票用futu/tiger。
</details>
<details> <summary><b>Preset Trading Teams</b> <sub>30 个 swarm presets</sub></summary>
- 🏢 30 个开箱即用的智能体团队
- ⚡ 预配置金融工作流
- 🎯 投资、交易与风险管理 presets
| Preset | 工作流 |
|---|---|
investment_committee | 多空辩论 → 风险审查 → PM 最终决策 |
global_equities_desk | A 股 + 港/美股 + 加密研究员 → 全球策略师 |
crypto_trading_desk | Funding/basis + liquidation + flow → 风险经理 |
earnings_research_desk | 基本面 + 预期修正 + options → 财报策略师 |
macro_rates_fx_desk | 利率 + 外汇 + 商品 → 宏观 PM |
quant_strategy_desk | 筛选 + 因子研究 → 回测 → 风险审计 |
technical_analysis_panel | 经典 TA + Ichimoku + harmonic + Elliott + SMC → 共识 |
risk_committee | 回撤 + 尾部风险 + regime review → 审批 |
global_allocation_committee | A 股 + 加密 + 港/美股 → 跨市场配置 |
<sub>另有 20+ 专业 presets,可运行 vibe-trading --swarm-presets 查看全部。
</sub>
</details>
<details> <summary><b>Alpha Zoo</b> <sub>461 个预置 alpha,覆盖 5 个家族</sub></summary>
- 🧬 461 个横截面 alpha,算子层即禁用 lookahead
- 📈 一条 CLI 命令完成 IC + IR + alive/reversed/dead 分类
- 🔬 AST 纯函数门禁 + 300 行 lookahead 哨兵测试 +
pytest-socket网络阻断 - 📦 Qlib 部分附 Apache-2 出处声明;每个 zoo 一份
LICENSE.md,声明公式属于数学内容 - 🤝 社区 PR 走 Developer Certificate of Origin (DCO) 签名流程
| Zoo | 数量 | 来源 | 许可 |
|---|---|---|---|
| qlib158 | 154 | Microsoft Qlib Alpha158(Apache-2.0,锁定 commit) | Apache-2.0 |
| alpha101 | 101 | Kakushadze (2015), "101 Formulaic Alphas", arXiv:1601.00991 | 公式属于数学内容 |
| gtja191 | 191 | 国君证券 (2014)《191 个短周期交易型 alpha 因子》研报 | 公式属于数学内容 |
| academic | 11 | Fama-French 5 因子 + Carhart 动量(基于价格的代理实现) + Jegadeesh reversal + George-Hwang 52-week-high + Amihud illiquidity + Harvey-Siddique skew + Frazzini-Pedersen betting-against-beta | 公开学术文献 |
| fundamental | 4 | PIT 安全的 SEC company facts——盈利收益率、ROE、毛利率因子、资产增长(按 filed-date 锚定) | 公开财务数据 |
运行 vibe-trading alpha list 浏览全部因子,vibe-trading alpha show <id> 查看公式与源码,vibe-trading alpha bench --zoo X --universe Y --period Z 给一整个 zoo 打分。
</details>
🎬 Demo
<div align="center"> <table> <tr> <td width="50%">
https://github.com/user-attachments/assets/4e4dcb80-7358-4b9a-92f0-1e29612e6e86
</td> <td width="50%">
https://github.com/user-attachments/assets/3754a414-c3ee-464f-b1e8-78e1a74fbd30
</td> </tr> <tr> <td colspan="2" align="center"><sub>☝️ 自然语言回测与多智能体 swarm 辩论 — Web UI + CLI</sub></td> </tr> </table> </div>
---
🚀 Quick Start
一行安装(PyPI)
pip install vibe-trading-ai
然后运行第一个研究任务:
vibe-trading init
vibe-trading run -p "Backtest a BTC-USDT 20/50 moving-average strategy for 2024 and summarize return and drawdown"
从旧版本升级? 0.1.10 升级到了 LangChain 1.x。若在 0.1.10 之前的安装上执行
pip install -U vibe-trading-ai后导入报错(例如 langgraph 无法导入),请重建 venv 或运行pip install --force-reinstall vibe-trading-ai。全新安装不受影响。
包名与命令: PyPI 包名是
vibe-trading-ai。安装后会获得三个命令: | 命令 | 用途 | |------|------| |vibe-trading| 交互式 CLI / TUI | |vibe-trading serve| 启动 FastAPI web server | |vibe-trading-mcp| 启动 MCP server(用于 Claude Desktop、OpenClaw、Cursor 等) |
vibe-trading init # interactive .env setup
vibe-trading # launch CLI
vibe-trading serve --port 8899 # launch web UI
vibe-trading-mcp # start MCP server (stdio)
或选择一种路径
| 路径 | 最适合 | 时间 |
|---|---|---|
| A. Docker | 立即试用,零本地配置 | 2 min |
| B. Local install | 开发,完整 CLI 访问 | 5 min |
| C. MCP plugin | 接入你现有的智能体 | 3 min |
| D. ClawHub | 一条命令,无需 clone | 1 min |
前置条件
- 任意受支持 provider 的 LLM API key,或使用 Ollama 本地运行(无需 key)
- 路径 B 需要 Python 3.11+
- 路径 A 需要 Docker
- OpenAI Codex 也可通过 ChatGPT OAuth 使用:设置
LANGCHAIN_PROVIDER=openai-codex,然后运行vibe-trading provider login openai-codex。它不使用OPENAI_API_KEY。
支持的 LLM providers: OpenRouter、Requesty、OpenAI、DeepSeek、Gemini、Groq、DashScope/Qwen、Zhipu、Moonshot/Kimi、MiniMax、Xiaomi MIMO、Z.ai、Ollama(本地)。配置见
.env.example。
提示: 由于自动 fallback,所有市场都可以在没有任何 API key 的情况下工作。yfinance(港/美股)、OKX(加密)、mootdx(A 股,TCP 直连不封 IP)和 AKShare(A 股、美股、港股、期货、外汇)都是免费的。Tushare token 是可选项 —— mootdx 是首选的免 token A 股 fallback,AKShare 作为覆盖更广的兜底。
Path A: Docker(零配置)
git clone https://github.com/HKUDS/Vibe-Trading.git
cd Vibe-Trading
cp agent/.env.example agent/.env
# Edit agent/.env — uncomment your LLM provider and set API key
docker compose up --build
打开 http://localhost:8899。后端 + 前端在同一个容器中运行。
Docker 默认将后端发布在 127.0.0.1:8899,并以非 root 容器用户运行应用。如果你有意将 API 暴露到本机之外,请设置强 API_AUTH_KEY,并让客户端发送 Authorization: Bearer <key>。
Path B: Local install
git clone https://github.com/HKUDS/Vibe-Trading.git
cd Vibe-Trading
python -m venv .venv
# Activate
source .venv/bin/activate # Linux / macOS
# .venv\Scripts\Activate.ps1 # Windows PowerShell
pip install -e .
cp agent/.env.example agent/.env # Edit — set your LLM provider API key
vibe-trading # Launch interactive TUI
<details> <summary><b>启动 Web UI(可选)</b></summary>
# Terminal 1: API server
vibe-trading serve --port 8899
# Terminal 2: Frontend dev server
cd frontend && npm install && npm run dev
打开 http://localhost:5899。前端会将 API 调用代理到 localhost:8899。
生产模式(单 server):
cd frontend && npm run build && cd ..
vibe-trading serve --port 8899 # FastAPI serves dist/ as static files
[!NOTE]
vibe-trading serve绑定0.0.0.0,但默认只信任 loopback:在同一台机器上打开 UI(http://localhost:8899)零配置即可用。若你从另一台机器、虚拟机宿主机或局域网内的手机访问,敏感接口会返回403,聊天会提示 “Remote API access requires an API key”——请在agent/.env里设置一个强API_AUTH_KEY,重启,并在 Settings 中输入同一个 key。(Docker Desktop 宿主网关场景:设VIBE_TRADING_TRUST_DOCKER_LOOPBACK=1并保持默认的127.0.0.1端口绑定。)
</details>
Path C: MCP plugin
见下方 MCP Plugin 章节。
Path D: ClawHub(一条命令)
npx clawhub@latest install vibe-trading --force
skill + MCP config 会下载到你的智能体 skills 目录。详情见 ClawHub install。
---
🧠 Environment Variables
将 agent/.env.example 复制为 agent/.env,并取消注释你想使用的 provider block。每个 provider 需要 3-4 个变量:
| 变量 | 必需 | 说明 |
|---|---|---|
LANGCHAIN_PROVIDER | Yes | Provider 名称(openrouter, deepseek, groq, ollama 等) |
<PROVIDER>_API_KEY | Yes* | API key(OPENROUTER_API_KEY, DEEPSEEK_API_KEY 等) |
<PROVIDER>_BASE_URL | Yes | API endpoint URL |
LANGCHAIN_MODEL_NAME | Yes | 模型名称(例如 deepseek-v4-pro) |
TUSHARE_TOKEN | No | A 股数据的 Tushare Pro token(会 fallback 到 AKShare) |
TIMEOUT_SECONDS | No | LLM 调用超时,默认 120s |
API_AUTH_KEY | 网络部署推荐 | API 可被非本地客户端访问时要求的 Bearer token |
VIBE_TRADING_ENABLE_SHELL_TOOLS | No | 在远程 API/MCP-SSE 风格部署中显式启用 shell-capable tools |
VIBE_TRADING_ALLOWED_FILE_ROOTS | No | 文档和券商日志导入额外允许的逗号分隔 roots |
VIBE_TRADING_ALLOWED_RUN_ROOTS | No | 生成代码 run directories 额外允许的逗号分隔 roots |
<sub>* Ollama 不需要 API key。OpenAI Codex 使用 ChatGPT OAuth,并通过 oauth-cli-kit 存储 token,不写入 agent/.env。</sub>
免费数据(无需 key): A 股通过 AKShare,港/美股通过 yfinance,加密通过 OKX,100+ 加密交易所通过 CCXT。系统会为每个市场自动选择最佳可用数据源。
🎯 Recommended Models
Vibe-Trading 是高度依赖工具的智能体:skills、backtests、memory 和 swarms 都会通过工具调用流转。模型选择会直接决定智能体是实际使用工具,还是从训练数据中编造答案。
| 档位 | 示例 | 使用场景 |
|---|---|---|
| Best | anthropic/claude-opus-4.7, anthropic/claude-sonnet-4.6, openai/gpt-5.5-pro, google/gemini-3.5-flash | 复杂 swarms(3+ agents)、长研究 sessions、论文级分析 |
| Sweet spot(默认) | deepseek-v4-pro, deepseek/deepseek-v4-pro, x-ai/grok-4.20, z-ai/glm-5.1, moonshotai/kimi-k2.6, qwen/qwen3-max-thinking | 日常主力,约 1/10 成本下具备可靠工具调用 |
| 避免用于 agent | *-nano, *-flash-lite, *-coder-next, 小型 / 蒸馏变体 | 工具调用不可靠,智能体会看起来像是在“凭记忆回答”,而不是加载 skills 或运行回测 |
默认 agent/.env.example 使用 DeepSeek 官方 API + deepseek-v4-pro;OpenRouter 用户可以使用 deepseek/deepseek-v4-pro。
---
🖥 CLI Reference
vibe-trading # interactive TUI
vibe-trading run -p "..." # single run
vibe-trading serve # API server
vibe-trading alpha list # 浏览 461 个预置 alpha;支持 show / bench / compare / export-manifest 子命令
vibe-trading channels status --local # 检查 IM 通道配置和依赖安装提示
<details> <summary><b>TUI 内 slash commands</b></summary>
| 命令 | 说明 |
|---|---|
/help | 显示所有命令 |
/skills | 列出全部 87 个 finance skills |
/swarm | 列出 30 个 swarm team presets |
/swarm run <preset> [vars_json] | 运行一个 swarm team,并实时流式展示 |
/swarm list | Swarm 运行历史 |
/swarm show <run_id> | Swarm 运行详情 |
/swarm cancel <run_id> | 取消运行中的 swarm |
/list | 最近 runs |
/show <run_id> | Run 详情 + 指标 |
/code <run_id> | 生成的策略代码 |
/pine <run_id> | 导出指标(TradingView + TDX + MT5) |
/trace <run_id> | 完整执行回放 |
/continue <run_id> <prompt> | 用新指令继续一个 run |
/sessions | 列出 chat sessions |
/settings | 显示运行时配置 |
/clear | 清屏 |
/quit | 退出 |
</details>
<details> <summary><b>Single run 与 flags</b></summary>
vibe-trading run -p "Backtest BTC-USDT MACD strategy, last 30 days"
vibe-trading run -p "Analyze AAPL momentum" --json
vibe-trading run -f strategy.txt
echo "Backtest 000001.SZ RSI" | vibe-trading run
vibe-trading -p "your prompt"
vibe-trading --skills
vibe-trading --swarm-presets
vibe-trading --swarm-run investment_committee '{"topic":"BTC outlook"}'
vibe-trading --list
vibe-trading --show <run_id>
vibe-trading --code <run_id>
vibe-trading --pine <run_id> # Export indicators (TradingView + TDX + MT5)
vibe-trading --trace <run_id>
vibe-trading --continue <run_id> "refine the strategy"
vibe-trading --upload report.pdf
vibe-trading alpha list --zoo gtja191 --limit 10
vibe-trading alpha show gtja191_171
vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025 --top 20
</details>
<details> <summary><b>IM 通道</b></summary>
IM 通道适配器会把外部聊天应用接到 Web UI 和 CLI 共用的 session runtime。把要启用的平台写到 ~/.vibe-trading/agent.json 的 channels 段;SDK 型适配器是可选 extras,缺依赖时会给出恢复提示,而不是拖垮运行时。
vibe-trading channels status --local # 不连 API,检查配置和缺失 SDK 提示
vibe-trading channels status # 查询正在运行的 API runtime
vibe-trading channels start # 通过 API 启动已启用的适配器
vibe-trading channels stop # 通过 API 停止已启用的适配器
vibe-trading channels login weixin # 需要时执行适配器登录流程
vibe-trading channels pairing --channel telegram list
内置适配器包括 websocket、telegram、slack、discord、matrix、whatsapp、signal、qq、napcat、weixin、wecom、feishu、dingtalk、msteams、email 和 mochat。可按需安装单个平台,例如 pip install "vibe-trading-ai[telegram]",也可以一次安装全量通道依赖:pip install "vibe-trading-ai[channels]"。
聊天内斜杠命令(通道无关,全部 16 个适配器通用):
| 命令 | 说明 |
|---|---|
/new | 重置当前会话——下一条消息将开启一段新对话 |
/reset | /new 的别名 |
/newsession | /new 的别名 |
/pairing list | 显示待处理的 sender pairing 请求 |
命令不区分大小写,且必须作为整条消息发送(例如 hello /new 会被当作普通消息而非重置命令)。
</details>
---
💡 Examples
Strategy & Backtesting
# Moving average crossover on US equities
vibe-trading run -p "Backtest a 20/50-day moving average crossover on AAPL for the past year, show Sharpe ratio and max drawdown"
# RSI mean-reversion on crypto
vibe-trading run -p "Test RSI(14) mean-reversion on BTC-USDT: buy below 30, sell above 70, last 6 months"
# Multi-factor strategy on A-shares
vibe-trading run -p "Backtest a momentum + value + quality multi-factor strategy on CSI 300 constituents over 2 years"
# After backtesting, export to TradingView / TDX / MetaTrader 5
vibe-trading --pine <run_id>
一行命令横评预置 alpha zoo:
vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025 --top 20
浏览目录 + 查看单个 alpha:
vibe-trading alpha list --zoo gtja191 --theme reversal --limit 10
vibe-trading alpha show gtja191_171
用 zoo 因子组合多因子信号(Python):
from src.skills.multi_factor.zoo_signal_engine import ZooSignalEngine
engine = ZooSignalEngine.from_zoo(["gtja191_171", "gtja191_111", "gtja191_163"])
panel = ... # your wide OHLCV panel
signal = engine.compute_signal(panel)
Market Research
# Equity deep-dive
vibe-trading run -p "Research NVDA: earnings trend, analyst consensus, option flow, and key risks for next quarter"
# Macro analysis
vibe-trading run -p "Analyze the current Fed rate path, USD strength, and impact on EM equities and gold"
# Crypto on-chain
vibe-trading run -p "Deep dive BTC on-chain: whale flows, exchange balances, miner activity, and funding rates"
Swarm Workflows
# Bull/bear debate on a stock
vibe-trading --swarm-run investment_committee '{"topic": "Is TSLA a buy at current levels?"}'
# Quant strategy from screening to backtest
vibe-trading --swarm-run quant_strategy_desk '{"universe": "S&P 500", "horizon": "3 months"}'
# Crypto desk: funding + liquidation + flow → risk manager
vibe-trading --swarm-run crypto_trading_desk '{"asset": "ETH-USDT", "timeframe": "1w"}'
# Global macro portfolio allocation
vibe-trading --swarm-run macro_rates_fx_desk '{"focus": "Fed pivot impact on EM bonds"}'
Cross-Session Memory
# Save your preferences once
vibe-trading run -p "Remember: I prefer RSI-based strategies, max 10% drawdown, hold period 5–20 days"
# The agent recalls them in future sessions automatically
vibe-trading run -p "Build a crypto strategy that fits my risk profile"
Upload & Analyze Documents
# Analyze a broker export or earnings report
vibe-trading --upload trades_export.csv
vibe-trading run -p "Profile my trading behavior and identify any biases"
vibe-trading --upload NVDA_Q1_earnings.pdf
vibe-trading run -p "Summarize the key risks and beats/misses from this earnings report"
---
🌐 API Server
vibe-trading serve --port 8899
| Method | Endpoint | 说明 |
|---|---|---|
GET | /runs | 列出 runs |
GET | /runs/{run_id} | Run 详情 |
GET | /runs/{run_id}/pine | 多平台指标导出 |
POST | /sessions | 创建 session |
POST | /sessions/{id}/messages | 发送消息 |
GET | /sessions/{id}/events | SSE event stream |
POST | /upload | 上传 PDF/file |
GET | /swarm/presets | 列出 swarm presets |
POST | /swarm/runs | 启动 swarm run |
GET | /swarm/runs/{id}/events | Swarm SSE stream |
GET | /alpha/list | 按 zoo/theme/universe 过滤列出 alpha |
GET | /alpha/{alpha_id} | Alpha 元数据 + 源代码 |
POST | /alpha/bench | 启动一个 bench job(返回 job_id) |
GET | /alpha/bench/{job_id}/stream | SSE 进度流 |
GET | /settings/llm | 读取 Web UI LLM settings |
PUT | /settings/llm | 更新本地 LLM settings |
GET | /settings/data-sources | 读取本地数据源 settings |
PUT | /settings/data-sources | 更新本地数据源 settings |
GET | /channels/status | 读取 IM 通道运行时与适配器状态 |
POST | /channels/start | 启动已配置的 IM 通道适配器 |
POST | /channels/stop | 停止已配置的 IM 通道适配器 |
POST | /channels/pairing/command | 针对共享存储执行 sender pairing 命令 |
POST | /scheduled-runs | 创建定时研究任务(间隔毫秒或 cron) |
GET | /scheduled-runs | 列出定时任务 |
DELETE | /scheduled-runs/{job_id} | 取消定时任务 |
交互式文档:http://localhost:8899/docs
Security defaults
对于 localhost 开发,vibe-trading serve 会保持浏览器工作流简单。对任何非本地客户端,敏感 API endpoints 都要求 API_AUTH_KEY;JSON/upload 请求请使用 Authorization: Bearer <key>。浏览器 EventSource streams 会在你于 Settings 中输入同一个 key 后由 Web UI 处理。
Shell-capable tools 可用于本地 CLI 与可信 localhost 工作流,但不会暴露给远程 API sessions,除非你显式设置 VIBE_TRADING_ENABLE_SHELL_TOOLS=1。文档和日志读取器默认限制在 upload/import roots 内;请将文件放在 agent/uploads、agent/runs、./uploads、./data、~/.vibe-trading/uploads 或 ~/.vibe-trading/imports 下,或通过 VIBE_TRADING_ALLOWED_FILE_ROOTS 添加专用目录。
Web UI Settings
Web UI Settings 页面允许本地用户更新 LLM provider/model、base URL、generation parameters、reasoning effort,以及 Tushare token 等可选市场数据凭据。Settings 会持久化到 agent/.env;provider defaults 从 agent/src/providers/llm_providers.json 加载。
Settings 读取无副作用:GET /settings/llm 和 GET /settings/data-sources 永远不会创建 agent/.env,并且只返回项目相对路径。Settings 读写可能暴露凭据状态或更新凭据/运行时环境,因此在配置了 API_AUTH_KEY 时会要求认证。如果 dev mode 下未设置 API_AUTH_KEY,settings 访问只接受 loopback clients。
同一个 Settings 页面也包含 IM 通道面板,面向本地 operator。它会轮询 /channels/status,展示 configured/enabled/available/loaded/running 状态,暴露适配器恢复提示,并可直接启动或停止已配置的通道 runtime。
定时研究(Scheduled research)
让研究 prompt 或回测按固定周期重复运行。后台执行器默认关闭——启动服务时设置 VIBE_TRADING_ENABLE_SCHEDULER=1 才会开启:
VIBE_TRADING_ENABLE_SCHEDULER=1 vibe-trading serve --port 8899
然后通过 REST 创建任务。schedule 可以是纯整数(间隔毫秒)或 5 段 cron 表达式(分 时 日 月 周):
# 每 6 小时(cron)
curl -X POST http://localhost:8899/scheduled-runs \
-H "Content-Type: application/json" \
-d '{"prompt":"Scan CSI300 for momentum breakouts and backtest the top 5","schedule":"0 */6 * * *"}'
# 列出 / 取消
curl http://localhost:8899/scheduled-runs
curl -X DELETE http://localhost:8899/scheduled-runs/<job_id>
每次触发都会在一个全新的 agent session 中运行该 prompt(可选回测参数放在 config 里),任务持久化到 ~/.vibe-trading/,重启后依然保留。不设这个开关时,/scheduled-runs 端点仍会记录任务,但不会真正触发。配置了 API_AUTH_KEY 时,每次请求需加 -H "Authorization: Bearer <key>"。
---
🔌 MCP Plugin
Vibe-Trading 为任何 MCP-compatible client 暴露 54 个 MCP tools。它作为 stdio subprocess 运行,无需 server setup。核心 research tools 对港股/美股/加密零 API key 可用;trading connector tools 使用当前选择的 connector profile;只有 run_swarm 需要 LLM key。
<details> <summary><b>Claude Desktop</b></summary>
添加到 claude_desktop_config.json:
{
"mcpServers": {
"vibe-trading": {
"command": "vibe-trading-mcp"
}
}
}
</details>
<details> <summary><b>OpenClaw</b></summary>
添加到 ~/.openclaw/config.yaml:
skills:
- name: vibe-trading
command: vibe-trading-mcp
</details>
<details> <summary><b>Cursor / Windsurf / other MCP clients</b></summary>
vibe-trading-mcp # stdio (default)
vibe-trading-mcp --transport http # Streamable HTTP (spec default) at /mcp
vibe-trading-mcp --transport sse # legacy SSE (deprecated)
</details>
暴露的 MCP tools(54): list_skills, load_skill, start_research_goal, get_research_goal, add_goal_evidence, update_research_goal_status, backtest, factor_analysis, analyze_options, pattern_recognition, read_url, read_document, web_search, write_file, read_file, list_swarm_presets, run_swarm, get_market_data, get_fund_flow, get_dragon_tiger, get_northbound_flow, get_margin_trading, get_block_trades, get_shareholder_count, get_lockup_expiry, get_sector_info, get_research_reports, get_stock_news, get_sec_filings, get_financial_statements, get_options_chain, get_stock_profile, screen_market, search_symbol, get_macro_series, iwencai_search, get_swarm_status, get_run_result, list_runs, reap_stale_runs, retry_run, analyze_trade_journal, extract_shadow_strategy, run_shadow_backtest, render_shadow_report, scan_shadow_signals, trading_connections, trading_select_connection, trading_check, trading_account, trading_positions, trading_orders, trading_quote, trading_history.
<details> <summary><b>从 ClawHub 安装(一条命令)</b></summary>
npx clawhub@latest install vibe-trading --force
由于该 skill 引用了外部 API,会触发 VirusTotal 自动扫描,因此需要
--force。代码完全开源,可自行检查。
这会将 skill + MCP config 下载到你的智能体 skills 目录。无需 clone。
在 ClawHub 浏览:clawhub.ai/skills/vibe-trading
</details>
<details> <summary><b>OpenSpace — 自进化 skills</b></summary>
全部 87 个 finance skills 都发布在 open-space.cloud,并通过 OpenSpace 的自进化引擎自主演进。
要配合 OpenSpace 使用,请将两个 MCP servers 都加入你的 agent config:
{
"mcpServers": {
"openspace": {
"command": "openspace-mcp",
"toolTimeout": 600,
"env": {
"OPENSPACE_HOST_SKILL_DIRS": "/path/to/vibe-trading/agent/src/skills",
"OPENSPACE_WORKSPACE": "/path/to/OpenSpace"
}
},
"vibe-trading": {
"command": "vibe-trading-mcp"
}
}
}
OpenSpace 会自动发现全部 87 个 skills,启用 auto-fix、auto-improve 和社区分享。在任意已连接 OpenSpace 的智能体中,可通过 search_skills("finance backtest") 搜索 Vibe-Trading skills。
</details>
---
📁 Project Structure
<details> <summary><b>点击展开</b></summary>
Vibe-Trading/
├── agent/ # 后端(Python)
│ ├── cli/ # CLI 包 —— 交互式 TUI + 子命令
│ ├── api_server.py # FastAPI server —— runs、sessions、upload、swarm、SSE
│ ├── mcp_server.py # MCP server —— 54 个工具,面向 OpenClaw / Claude Desktop
│ │
│ ├── src/
│ │ ├── agent/ # ReAct agent 内核
│ │ │ ├── loop.py # 5 层上下文压缩 + 读/写工具批处理
│ │ │ ├── context.py # system prompt + 持久记忆自动召回
│ │ │ ├── skills.py # skill loader(87 个内置 + 通过 CRUD 创建的用户 skill)
│ │ │ ├── tools.py # tool 基类 + 注册表
│ │ │ ├── memory.py # 每个 run 的轻量 workspace 状态
│ │ │ ├── frontmatter.py # 共享的 YAML frontmatter 解析器
│ │ │ └── trace.py # 执行 trace 写入器
│ │ │
│ │ ├── memory/ # 跨 session 持久记忆
│ │ │ └── persistent.py # 基于文件的记忆(~/.vibe-trading/memory/)
│ │ │
│ │ ├── tools/ # 68 个自动发现的 agent 工具
│ │ │ ├── backtest_tool.py # 运行回测
│ │ │ ├── remember_tool.py # 跨 session 记忆(save/recall/forget)
│ │ │ ├── skill_writer_tool.py # skill CRUD(save/patch/delete/file)
│ │ │ ├── session_search_tool.py # FTS5 跨 session 搜索
│ │ │ ├── swarm_tool.py # 启动 swarm team
│ │ │ ├── web_search_tool.py # DuckDuckGo 网络搜索
│ │ │ └── ... # bash、文件 I/O、因子分析、期权、alpha 浏览 + 横评等
│ │ │
│ │ ├── factors/ # Alpha Zoo —— 5 个家族共 461 个 alpha
│ │ │ ├── base.py # 19 个算子(rank/scale/ts_*/delta/decay_linear/safe_div/vwap)
│ │ │ ├── registry.py # 纯 AST 元数据加载 + 惰性计算 + sanity 校验
│ │ │ ├── bench_runner.py # IC + alive/reversed/dead 分类
│ │ │ └── zoo/ # qlib158 (154) + alpha101 (101) + gtja191 (191) + academic (10) + fundamental (4)
│ │ │
│ │ ├── api/ # FastAPI 路由模块
│ │ │ └── alpha_routes.py # /alpha/list、/alpha/{id}、/alpha/bench、SSE 流
│ │ │
│ │ ├── skills/ # 9 个类别共 87 个 finance skills(每个一份 SKILL.md)
│ │ ├── swarm/ # Swarm DAG 执行引擎
│ │ │ └── presets/ # 30 个 swarm preset YAML 定义
│ │ ├── session/ # 多轮对话 + FTS5 session 搜索
│ │ └── providers/ # LLM provider 抽象层
│ │
│ └── backtest/ # 回测引擎
│ ├── engines/ # 7 个引擎 + 跨市场 composite 引擎 + options_portfolio
│ ├── loaders/ # 20 个数据源:tushare、okx、yfinance、akshare、baostock、tencent、mootdx、ccxt、futu、local、eastmoney、sina、stooq、yahoo、finnhub、alphavantage、tiingo、fmp、qveris、india_broker
│ │ ├── base.py # DataLoader Protocol
│ │ └── registry.py # Registry + 自动 fallback 链路
│ └── optimizers/ # MVO、equal vol、max div、risk parity
│
├── frontend/ # Web UI(React 19 + Vite + TypeScript)
│ └── src/
│ ├── pages/ # Home、Agent、AlphaZoo、RunDetail、Compare、Correlation、Settings
│ ├── components/ # chat、charts、layout
│ └── stores/ # Zustand 状态管理
│
├── Dockerfile # 多阶段构建
├── docker-compose.yml # 一条命令部署
├── pyproject.toml # 包配置 + CLI entrypoint
├── tools/ # 仓库级 CI 辅助脚本
│ └── ci_grep_gates.sh # 拦截 yaml.load / 商标 / 个股数据泄露
└── LICENSE # MIT
</details>
---
🏛 Ecosystem
Vibe-Trading 是 HKUDS 智能体生态的一部分:
<table> <tr> <td align="center" width="20%"> <a href="https://github.com/HKUDS/nanobot"><b>NanoBot</b></a><br> <sub>Ultra-Lightweight Personal AI Assistant</sub> </td> <td align="center" width="20%"> <a href="https://github.com/HKUDS/AI-Trader"><b>AI-Trader</b></a><br> <sub>Agent-Native Signal & Copy Trading Platform</sub> </td> <td align="center" width="20%"> <a href="https://github.com/HKUDS/CLI-Anything"><b>CLI-Anything</b></a><br> <sub>Making All Software Agent-Native</sub> </td> <td align="center" width="20%"> <a href="https://github.com/HKUDS/OpenSpace"><b>OpenSpace</b></a><br> <sub>Self-Evolving AI Agent Skills</sub> </td> <td align="center" width="20%"> <a href="https://github.com/HKUDS/ClawTeam"><b>ClawTeam</b></a><br> <sub>Agent Swarm Intelligence</sub> </td> </tr> </table>
---
🗺 Roadmap
我们按阶段交付。工作开始时,条目会移动到 Issues。
| 阶段 | 功能 | 状态 |
|---|---|---|
| Trust Layer | 可复现 run cards 已输出并展示在 Run Detail;v1 会补充 tool traces 与 citations | v0 已发布 |
| Hypothesis Registry | 持久化研究假设:lifecycle status、data sources、skills、run-card links 与 invalidation notes | Backend MVP 已发布 |
| Research Autopilot | 手动触发优先的研究循环:hypothesis → deterministic backtest → evidence report | 第 1–3 阶段已发布 |
| Data Bridge | 自带数据:本地 CSV/Parquet/SQL connectors 与 schema mapping | 本地加载器已发布 |
| Options Lab | Vol surface、Greeks dashboard、payoff/scenario explorer | Planned |
| Portfolio Studio | Risk x-ray、constraints、turnover-aware optimizer、rebalance notes | Turnover-aware optimizer 已发布 0.1.11;其余 Planned |
| Alpha Zoo | 461 个预置 alpha 因子(Qlib 158 + Kakushadze 101 + GTJA 191 + academic + fundamental),一行 CLI 跑横评,agent 集成,Web UI 浏览 | 已发布 0.1.8,延续至 0.1.11 |
| Research Delivery | 通过 Slack / Telegram / email-style IM channels 发送定时 briefs 与实时研究 sessions | 调度器 + IM Runtime 已发布 |
| Community | 可分享的 skills、presets 和 strategy cards | Exploring |
---
Contributing
欢迎贡献!请查看 CONTRIBUTING.md 了解指南。
Good first issues 使用 good first issue 标记,可选择一个开始。
想贡献更大的内容?请查看上方 Roadmap,并在开始前先开 issue 讨论。
---
Contributors
感谢所有为 Vibe-Trading 做出贡献的人!
近期 v0.1.11 周期贡献者与致谢:
- @shadowinlife —
api_server模块化收官(1,103 → 371 行,#424 关闭 #331)、集中化环境变量配置 + AST CI 门禁(#440)、loaderfetch()协议一致性(#437),以及审查中的 Strategy Development Manager RFC(#455/#457)——本周期合入 12 个 PR - @Robin1987China — Research Autopilot 第三阶段闭环(#267)、4 个规范学术 alpha(#277)、Shadow Account PIT-safe 入场条件(#302/#314/#316)、turnover-aware 组合优化器(#466)、scheduled-research 路由测试(#452),以及 trade-journal / pattern / loader 层的测试覆盖批次(#268/#269/#276)
- @muku314115 — 一等公民级印度股票(NSE/BSE)支持:
IndiaEquityEngine、成本栈、.NS/.BO路由,以及india_broker数据桥(#305) - @mvanhorn — 端到端 scheduled-research 执行器(#278)、Trading 212 只读连接器(#321)、OpenAI 默认模型解析(#319),以及 Robinhood 配置校验(#320)
- @fei-moss —
analyze_image视觉工具(#464)、NapCat DM pairing(#463),以及 IM 媒体 allowed-roots 报告(#465) - @sambazhu — value-investing 工具箱:financial-rigor + report-audit 工具、4 个 skill,以及
value_investing_committeepreset(#407/#408) - @Elfsa-Miranda — evidence-bound alpha 研究流水线探索(#405/#416,后重新纳入 #442)
- @Hinotoi-agent — 回环 CSRF 拒绝(#293)与已鉴权的远程同源 UI 请求(#304)
- @dpersek — 可配置 IM 回复超时(#413)与 provider-preflight redirect 修复(#404)
- @digger-yu — 跨平台
setup/dev命令(#292)与开发依赖预检(#349) - @skloxo — 波浪号展开 + file-roots 安全 fallback(#299)与响应式 zh-CN 本地化(#301)
- @kadaliao — 入门教程(#393)与 Alpha Library 社交卡片(#396)
- @morluto — CLI resume 保留第一句用户消息(#448)与 Codex OAuth 默认模型(#446)
- @yxhuang — Kimi for Coding provider(#435),以及 governance-stack revert 背后 #433 的精准诊断
- @isaveall —
validation.jsonartifacts 目录修复(#429)与更清晰的--swarm-run报错(#428) - @mustafakamal88 — timezone-aware UTC timestamps(#397)
- @irfanallana-oss —
trading_place_order的零值下单守卫(#417) - @Shizoqua — loader 边界的 OHLC 合法性守卫(#274)
- @hobostay — 针对 CGNAT/mesh 网段的 SSRF 防护加固 + QQ media redirect 修复(#389)
- @aeonframework — Pillow / langchain CVE 下限抬升(#390)
- @hannibal-lee — pandas 版本约束修复(#329)
- @MarkfuGod — 动态数据源数量 + token 触发的 microcompaction(#296)
- @gyx09212214-prog — 严格 JSON validation 输出(#306)
- @LemonCANDY42 — 回测报告库(#224)
- @fanfpy — 长桥 Decimal→float 序列化(#459)
- @asahikiko — 打包 SKILL.md 能力数量同步 + manifest 守卫测试(#461)
- @wison1717-maker — mandate 二次确认弹窗 + 统一错误提示(#453)
- @imsankz — opencode provider 映射(#444)
- @flash1234pku — tushare reference code-fence 修复(#449)
- @Penn-Live — Docker 启动 route 遍历崩溃报告(#450)
- @warren618 / Haozhe Wu — 基本面因子层(PIT-safe SEC panels)、QVeris 付费轨、IM 通道运行时、印度股票集成审查、中国搜索 fallback,以及发布集成
<details> <summary>v0.1.10 周期贡献者</summary>
- @Hinotoi-agent — 一波安全加固:本地关停鉴权 (#241)、回环主机重绑定拒绝 (#242)、agent shell 工具显式开启 (#243)、设置写入鉴权 (#245)、mandate proposal-id 收敛 (#256)、持久记忆类型校验 (#257)、MCP swarm run-id 收敛 (#258)
- @mvanhorn — 可选本地数据缓存 (#177)、Gemini thoughtSignature 经 OpenAI-compat 工具调用往返 (#176)、自定义数据源指南 (#194)、glm/zhipu provider 别名 + 模型名推断 (#247)
- @gyx09212214-prog — loader 容忍畸形 crypto/RSSHub 超时环境变量 (#227、#240)、yfinance 包含请求的结束日期 (#226)、run-card 非有限指标的严格 JSON (#238)、ddgs 重试 fallback 覆盖 (#239)
- @BillDin — 聊天界面显示 swarm agent 状态 (#188)、显式 preset 名处理 (#189)、swarm worker 的 loader 行情工具 (#199)、preset 上下文延续 (#200)
- @Robin1987China — Research Autopilot 假设-目标桥 (#260)、本地 CSV/Parquet/DuckDB 数据加载器 (#252)、assistant-prefill 修复 + 可配置 Kimi User-Agent (#248)
- @LemonCANDY42 — 只读运行时状态面板 (#210)、持久化 AgentLoop 用量产物 (#223)、可选 Run Detail 图表负载 (#225)
- @zwrong — trace.jsonl 零截断 + offload 改造 (#206)、退出时显示 session-id +
resume <session-id>(#218) - @forge-builder — AI 贡献者指南 (#173)、OpenClaw MCP 只读冒烟测试文档 (#165)
- @skloxo — 中文 (zh-CN) 前端本地化(采纳自 #217)
- @LeeCQiang — 全部 452 个 Alpha Zoo 因子的中文 docstring (#180)
- @KaiLuettmann — 发布时发布 GHCR 预构建镜像 (#187)
- @ngoanpv — 经 AgentLoop dict 路径保留 Gemini thought_signature (#184)
- @ShahNewazKhan — 经 host.docker.internal 触达宿主 Ollama (#196)
- @sambazhu — 前端同步已完成的聊天 attempts (#236)
- @bhlt — baostock 原生代码格式支持 (#230)
- @octo-patch — MiniMax M3 默认模型升级 (#162)
- @warren618 / Haozhe Wu — 全球数据层(8 源 + 18 只读数据工具)、10 个券商 SDK 连接器、alpha compare 全栈、provider 可靠性大修、多引擎 web_search fallback、响应式 Stop + SSE 重连、发布集成
</details>
<a href="https://github.com/HKUDS/Vibe-Trading/graphs/contributors"> <img src="https://contrib.rocks/image?repo=HKUDS/Vibe-Trading" /> </a>
---
Disclaimer
Vibe-Trading 是研究与交易软件。它不是投资建议,不托管任何资金,也不运营执行场所。仅通过你自己明确授权的券商通道(如 Robinhood Agentic Trading)进行交易,且只在你设定的限额内、你可随时停止。该券商交易能力为实验性,未经我们对接真实券商账户验证——风险自负。历史表现不代表未来结果。
License
MIT License — see LICENSE
---
<p align="center"> ⭐ 如果 <b>Vibe-Trading</b> 对你的研究有帮助,点个 Star 让更多人看到它。 </p>
---
<p align="center"> 感谢访问 <b>Vibe-Trading</b> ✨ </p> <p align="center"> <img src="https://visitor-badge.laobi.icu/badge?page_id=HKUDS.Vibe-Trading&style=flat" alt="visitors"/> </p>
<p align="center"> <b>English</b> | <a href="README_zh.md">中文</a> | <a href="README_ja.md">日本語</a> | <a href="README_ko.md">한국어</a> | <a href="README_ar.md">العربية</a> </p>
<p align="center"> <img src="assets/icon.png" width="120" alt="Vibe-Trading Logo"/> </p>
<h1 align="center">Vibe-Trading: Your Personal Trading Agent</h1>
<p align="center"> <b>One Command to Empower Your Agent with Comprehensive Trading Capabilities</b> </p>
<p align="center"> <a href="https://trendshift.io/repositories/25527" target="_blank"><img src="https://trendshift.io/api/badge/repositories/25527" alt="HKUDS%2FVibe-Trading | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a> </p>
<p align="center"> <img src="https://img.shields.io/badge/Python-3.11%2B-3776AB?style=flat&logo=python&logoColor=white" alt="Python"> <img src="https://img.shields.io/badge/Backend-FastAPI-009688?style=flat" alt="FastAPI"> <img src="https://img.shields.io/badge/Frontend-React%2019-61DAFB?style=flat&logo=react&logoColor=white" alt="React"> <a href="https://pypi.org/project/vibe-trading-ai/"><img src="https://img.shields.io/pypi/v/vibe-trading-ai?style=flat&logo=pypi&logoColor=white" alt="PyPI"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow?style=flat" alt="License"></a> <br> <a href="https://github.com/HKUDS/.github/blob/main/profile/README.md"><img src="https://img.shields.io/badge/Feishu-Group-E9DBFC?style=flat-square&logo=feishu&logoColor=white" alt="Feishu"></a> <a href="https://github.com/HKUDS/.github/blob/main/profile/README.md"><img src="https://img.shields.io/badge/WeChat-Group-C5EAB4?style=flat-square&logo=wechat&logoColor=white" alt="WeChat"></a> <a href="https://discord.gg/6TdQnT5xcF"><img src="https://img.shields.io/badge/Discord-Join-7289DA?style=flat-square&logo=discord&logoColor=white" alt="Discord"></a> </p>
<p align="center"> <a href="https://vibetrading.wiki/">Website</a> · <a href="https://vibetrading.wiki/docs/">Docs</a> · <a href="#-news">News</a> · <a href="#-key-features">Features</a> · <a href="#-shadow-account">Shadow Account</a> · <a href="#-demo">Demo</a> · <a href="#-quick-start">Quick Start</a> · <a href="#-examples">Examples</a> · <a href="#-api-server">API / MCP</a> · <a href="#-roadmap">Roadmap</a> · <a href="#-contributing">Contributing</a> </p>
<p align="center"> <a href="#-quick-start"><img src="assets/pip-install.svg" height="45" alt="pip install vibe-trading-ai"></a> </p>
---
📰 News
⚠️ Security warning: The X account
VibeTrading_HKU, Virtuals project101845, and token contract0x640BDBF77b6447E8b7DB7894cED84BD1c40571f4are not official Vibe-Trading assets. We have never launched or endorsed any token or memecoin. Do not buy, connect a wallet, or sign anything. Details.
- 2026-07-15 🧮 Backtest correctness + Portfolio Studio core: A 10-PR convergence pass made rebalances causal and order-independent, charged terminal close costs, reported fill-derived turnover, enforced exposure caps, and kept validation output finite and strict (#530/#531/#532/#540). Charts now reuse the run's actual data source, repeatable market queries are no longer dropped, and
.envloads refresh cached config (#535/#544/#554). Portfolio Studio #456 and config bug #541 are closed; provider fixes #528/#529 closed too. Thanks @YZY0108, @santhreal, @Robin1987China, @xkam7ar, @Marnie0415, and @marichu99.
- 2026-07-14 🌉 Longbridge market data + modern MCP transport + provider reliability: Longbridge joins the historical-data fallback layer with key-gated credentials, date-window splitting, strict completeness checks, and an opt-in SDK dependency; four China-market flow tools gain verified Tushare fallbacks, and negative final equity no longer crashes backtest metrics. The MCP server now supports Streamable HTTP,
write_filesafely recovers aliased or missing path arguments, hypothesis updates reject unsupported fields, and Correlation requests are authenticated. NVIDIA NIM is now a first-class provider across Web Settings and both CLI onboarding paths, with a versioned compatibility User-Agent to address the reported 403; Web Settings now writes to the canonical~/.vibe-trading/.env, migrates legacy configuration, and reports permission failures clearly, fixing the DeepSeek save-time 500 (#534, closes #516/#524; #528/#529). Thanks @fanfpy, @asahikiko, @santhreal, @sTunnaSu, @abhishekjaisinghani, @huangcheng, @ShiroKSH, @Meru143, @DIEGOD79, and @not-knope for the code, reports, and diagnosis.
- 2026-07-13 🔒 Security hardening: all 10 external-audit findings closed + contributor batch: every finding from the 2026-07-10 external security audit (issue #476, discussion #468) is now addressed on
main— Docker multi-stage rebuild with digest-pinned images, an AST-hardened backtest sandbox blocking network/subprocess/eval/os.environ/unsafe-open (including inside nested function bodies), short-lived single-use SSE auth tickets, hardened Compose (read-only rootfs, dropped capabilities, resource limits), auth + rate limiting on/correlation, security headers, hash-locked dependencies, and more. Also merged: opt-in TAP mode for Alpaca key isolation (#377, thanks @0xZKnw), realized portfolio turnover surfaced in backtest metrics (#478, thanks @Robin1987China), a Frazzini-Pedersen betting-against-beta academic factor (Alpha Zoo → 461, #480, thanks @YogeshModi24), a look-ahead-bias fix across all 5 portfolio optimizers (#487, thanks @YZY0108), and two preflight/provider-config fixes (#479/#484, closes #477/#482, thanks @ananaymital/@Bortlesboat).
<details> <summary>Earlier news</summary>
- 2026-07-12 🧪 Strategy Development Manager + contributor fix batch: the new
strategy-dev-managerskill (#87) turns academic papers and broker research into registered factors/strategies with a persistent artifact store and automated IC/Sharpe decay monitoring —sdm_register/sdm_status/sdm_decay_scandrive an active → monitoring → decayed → disabled lifecycle over~/.vibe-trading/(#457, closes #455, thanks @shadowinlife). Also merged: the Correlation tab accepts bare tickers (AAPL,SPY) and walks the full loader fallback chain (#472, closes #471, thanks @yxhuang), thelocalloader honors requested intervals via OHLCV resampling (#467, thanks @Shizoqua), Binance USD-M perpetual history lands with explicitBTC-USDT-PERProuting + execution/mark price separation as the first #462 slice (#470, thanks @honginp), FastMCP transport imports now work across both module layouts (#469, thanks @roberttidball), and Requesty is available as an OpenAI-compatible LLM gateway provider (#474, thanks @Thibaultjaigu).
- 2026-07-11 🚀 v0.1.11 released (
pip install -U vibe-trading-ai): rolls up three weeks since 0.1.10 — first-class Indian equity (NSE/BSE) backtesting, the PIT-safe fundamental factor layer (Alpha Zoo → 460), the 16-adapter IM channel runtime, end-to-end scheduled research, optional QVeris premium data, and today's contributor batch: a turnover-aware optimizer (#466, thanks @Robin1987China), ananalyze_imagevision tool + NapCat DM pairing + the IM-media read fix (#464/#463/#465, thanks @fei-moss), Longbridge Decimal serialization (#459, thanks @fanfpy), and packaged-manifest count guards (#461, thanks @asahikiko). Full details: CHANGELOG · release notes.
- 2026-07-10 🇮🇳 Indian equity (NSE/BSE) support + centralized env config: a dedicated
IndiaEquityEnginelands — T+1 delivery, circuit bands, and a config-driven STT/stamp/exchange/SEBI/GST cost stack — with.NS/.BOsymbol routing, an opt-in read-only Shoonya/Dhan data bridge, and 255 alpha101/qlib158 factors opted into the newequity_inuniverse (#305, thanks @muku314115). Environment variables now flow through a single PydanticEnvConfigschema with an AST-based CI gate against futureos.getenvsprawl (#440, closes #438, thanks @shadowinlife). Also: a second-confirmation dialog before committing a real trading mandate plus unified error toasts (#453, thanks @wison1717-maker), scheduled-research route tests (#452, thanks @Robin1987China), and GLM thinking models no longer lose their reasoning stream on the zhipu provider (#458).
- 2026-07-09 🧯 Docker startup unblocked + provider/CLI contributor batch: Docker/server startup no longer crashes when FastAPI route iteration sees an included-router-like entry without
path(#450, thanks @Penn-Live). We also landed the queued quick-win contributor fixes: loaderfetch()signatures now match the protocol across OKX / Tushare / yfinance (#437, thanks @shadowinlife), the CLI resume prompt preserves the first user message (#448, closes #447, thanks @morluto), Codex OAuth defaults toopenai-codex/gpt-5.4(#446, thanks @morluto), Kimi for Coding is available as a distinct provider (#435, thanks @yxhuang), opencode provider mappings are wired (#444, thanks @imsankz), and Tushare reference code fences now saypythoninstead ofpyhton(#449, thanks @flash1234pku). Validation included focused server/CLI/provider/loader tests plus a Docker build and/healthsmoke.
- 2026-07-08 💎 Fundamental factor layer (Phase 1) + optional QVeris premium data + maintainer day: PIT-safe SEC fundamentals now flow into daily factor panels —
fund:*panel columns, filed-date anchoring with restatement and YTD-frame protection, and 4 new quality/value factors (registry now 460 alphas). Data routing gains an optional premium track: the 18 free sources stay the default, while QVeris unlocks 63+ providers via Settings → QVeris orvibe-trading data mode paid(see the QVeris section below). Also:api_servermodularization completed (1,103 → 371 lines, #424 closing #331, thanks @shadowinlife), backtestvalidation.jsonno longer requires a pre-existing artifacts dir (#429, thanks @isaveall), clearer--swarm-runerrors (#428, thanks @isaveall), and we reverted the governance stack that broke session chats (#433, thanks @yxhuang for the precise diagnosis).
- 2026-07-07 ✅ Contributor PR batch: merged the queued contributor work for IM channel timeout configuration (#413, thanks @SyntaxSawdust), Alpha Library social previews and the beginner tutorial (#396, #393, thanks @kadaliao), value-investing skills / tools / committee presets (#407, thanks @sambazhu), zero-sized order-field handling in
trading_place_order(#417, thanks @irfanallana-oss), and timezone-aware UTC timestamps across session/API paths (#397, thanks @mustafakamal88).
- 2026-07-06 🧭 Preflight hardening, API slices, and CN search fallback: provider preflight no longer follows redirects (#404, closes #402, thanks @SyntaxSawdust), the remaining API routes moved into focused modules (#387, superseding #383-#386, thanks @shadowinlife), and CN web-search fallbacks now include Alibaba Cloud IQS (#408, thanks @sambazhu). Maintainer cleanup added no-network fallback tests and EOF whitespace cleanup (fbac74f); main CI is green (run 28780619018).
- 2026-07-05 ✅ Contributor PR queue closed + Windows baseline green: merged the four non-draft PRs selected for today's maintainer pass. A-share mootdx batch pulls now let
KeyboardInterrupt/SystemExitpropagate instead of being swallowed by a bareexcept(#399, closes #398, thanks @shadowinlife). The Settings route slice and patched dependency floors are now merged under their original contributor PRs (#382, #390, thanks @shadowinlife and @aeonframework). Windows baseline compatibility now isolates loader caches, makes OAuth cache assertions platform-aware, skips one fork-only mock test on Windows, and bypasses proxies for MCP loopback fixtures (#401, thanks @Elfsa-Miranda). Validation:4701 passed, 47 skipped.
- 2026-07-04 🧩 API route slices, tutorial docs, and dependency floors: IM channel and Settings routes moved out of
api_server.pyintosrc/api/channels_routes.pyandsrc/api/settings_routes.py, continuing the narrow #331 modularization path from contributor work (#379, #382, thanks @shadowinlife). The wiki gained a Chinese beginner tutorial for non-finance readers (#393, thanks @kadaliao), and dependency floors now keep Pillow / LangChain / LangGraph on the installable patched track (#390, thanks @aeonframework).
- 2026-07-04 🧹 UTC timestamp cleanup for session and API paths: tightened the #395 timestamp fix so session, goal, channel, and API timestamps now emit timezone-aware UTC values in explicit ISO form.
- 2026-07-03 🛡️ Robinhood MCP refresh + API modularization + SSRF guard: Robinhood Agentic Trading now uses the current MCP tool names across generic reads, live-runner plumbing, default read-only seeds, and mandate-gate tests, while interactive startup honors the same
.envsearch order as the provider loader (~/.vibe-trading/.env→agent/.env→$CWD/.env) (#391, closes #381 and #380). System routes (/health,/correlation,/system/shutdown,/skills,/api) moved intosrc/api/system_routes.pyas the next narrow API modularization slice (#378, thanks @shadowinlife). Channel media SSRF defenses now reject CGNAT/mesh/non-global targets and QQ media redirects-to-internal before fetching (#389, thanks @hobostay).
- 2026-07-02 ⚡ Factor acceleration + safer runtime boundaries: hot rolling factor operators now use
bottleneck/NumPy fast paths, alpha bench parallelism avoids repeated large-panel worker payloads, and base equity math has regression coverage (#376, closes #339, original work from #342 by @shadowinlife). Upload and Shadow report routes moved out of the monolithicapi_server.pyas the first narrow API modularization slice while #331 stays open (#375, based on #358, thanks @shadowinlife). Generated backtests now inherit only an allowlisted subprocess environment instead of the parent secrets surface (#374, closes #332), and IM channels gained/newsession reset plus case-insensitive pairing commands (#372, closes #371, thanks @shadowinlife).
- 2026-07-01 🧹 Security polish + tracker cleanup: tightened API/Docker/frontend dev defaults, stabilized Settings channel and
zh-CNedges, cleared frontend dependency/CSP alerts, and closed stale WhatsApp + paper-trading tracker items (#338, #351, #349, #365, #367, #350, #335, #283).
- 2026-06-30 💬 IM channel runtime for research delivery: Vibe-Trading can now attach the same agent session runtime to 16 built-in message adapters — WebSocket, Telegram, Slack, Discord, Matrix, WhatsApp, Signal, QQ/NapCat, WeChat/WeCom, Feishu/Lark, DingTalk, Teams, email, and Mochat. CLI (
vibe-trading channels status/start/stop/login/pairing), REST (/channels/status,/channels/start,/channels/stop,/channels/pairing/command), and the Web UI Settings panel expose status, recovery hints, start/stop, and sender pairing; SDK-backed adapters stay behind extras such asvibe-trading-ai[telegram]orvibe-trading-ai[channels](#341).
- 2026-06-29 🛡️ Live advisory safety + Trading 212 read-only connector + Windows/Gemini fixes: live order guards now have an opt-in, broker-agnostic
PreTradeAdvisoryInterfacethat records advisory reviews without bypassing the mandate gate, kill switch, or audit trail (#328, closes #317, thanks @shadowinlife). Trading 212 joins the connector layer with read-only account, positions, orders, history, and instrument-metadata support;place_order/cancel_orderstill hard-refuse until a structural paper/live boundary exists (#321, closes #309, thanks @mvanhorn). Windows startup avoids the pandas 3.0Timestampcrash via the<3.0.0constraint (#329, closes #324, thanks @hannibal-lee); Geminithought_signaturedict-history replay was verified/fixed onmain(#318);.USfinancial statements now route to SEC EDGAR instead of Eastmoney (#325); and the Alpha Library landing page got cache/date/selector/noscript/DNS-prefetch hardening while heavier CSP and social-card follow-ups stay tracked (#323).
- 2026-06-28 🧰 Cross-platform setup/dev + runtime and file-tool hardening:
vibe-trading setupandvibe-trading devnow handle Windows TypeScript builds, launch the backend from the right cwd, use the Vite 5899 port, and shut child processes down cleanly (#292, thanks @digger-yu). Runtime status polling now degrades instead of crashing (#322); MCP OAuth cache keys are sanitized (#313); OpenAI defaults and Robinhoodagent.jsonvalidation were tightened (#319, #320, thanks @mvanhorn); and file tools got isolated read/write roots plus broader sandbox tests (#299, thanks @skloxo). - 2026-06-27 🧯 Content-filter resilience + Shadow Account feature contract cleanup: event-driven and swarm runs now skip individual LLM content-moderation hits, warn in run cards when filter rates are high, and recognize Gemini safety finish reasons instead of aborting an entire analysis (#308, closes #307, thanks @shadowinlife). Shadow Account extraction/codegen now share one
PRICE_FEATUREScontract and keep four-decimal return bounds, preventing rule/codegen drift and precision loss onprior_5d_return(#316, thanks @Robin1987China). - 2026-06-26 🎯 Shadow Account conditional entry + tushare ETF/index/HK routing: extracted Shadow Account rules now carry RSI / prior-return bounds, so the generated SignalEngine enters on real conditions (RSI in range, prior-return in range) instead of blindly replaying the holding cadence (#314, follows #302, thanks @Robin1987China). The tushare loader also routes ETF/LOF →
fund_daily(), indices →index_daily(), and HK equities →hk_daily()instead of always callingdaily()(which silently returns empty for non-stocks), with per-symbol empty-result + partial-fetch warnings (#315, closes #310, thanks @shadowinlife). - 2026-06-25 🧪 Strict validation JSON + calmer agent context: standalone backtest validation now normalizes nested
NaN/Infinityvalues before writingartifacts/validation.jsonor CLI stdout, so strict JSON parsers no longer choke on validation payloads (#306, thanks @gyx09212214-prog). The agent prompt also derives the current data-source count from the loader registry, and_microcompact()now waits for real token pressure instead of clearing older tool results during short runs (#296, closes #282, thanks @MarkfuGod). - 2026-06-24 🎯 Shadow Account price context + reactive Chinese UI + LAN auth fix: Shadow Account rule extraction now sees PIT-safe entry context —
entry_rsi14andprior_5d_returnfetched through the loader registry as ofbuy_dt, with graceful offline/no-data degradation (#302, follows #295, thanks @Robin1987China). The main Web UI panels now use reactive English / zh-CN translations across charts, chat, Alpha Library, Correlation, and Run Detail (#301, thanks @skloxo). Remote same-origin Web UI deployments withAPI_AUTH_KEYcan post and upload again after the CSRF hardening, while mismatched cross-site origins remain blocked (#304, thanks @Hinotoi-agent). - 2026-06-23 🛡️ Local API CSRF hardening: a malicious web page can no longer drive unsafe cross-site requests (POST/PUT/DELETE) against the loopback API — CORS blocks reading the response but not the side effect, so loopback dev-mode trust now applies the existing cross-site guard to unsafe methods before honoring it. Safe methods and local CLI / non-browser uploads are unaffected (#293, thanks @Hinotoi-agent).
- 2026-06-22 🔧 Live-authorize OAuth fix + Alpha Zoo headline fix:
connector authorizenow holds the OAuth handshake open through a multi-minute broker sign-in (tunable viaVIBE_LIVE_AUTHORIZE_TIMEOUT_SECONDS) and no longer spawns a competing callback server on retry, so the token actually persists (#281, closes #259, thanks @Robin1987China). The Alpha Zoo page no longer prints its alpha count twice (#287, closes #286, thanks @digger-yu). Scheduled research also picked up end-to-end usage docs (#288). - 2026-06-21 ⏰ Scheduled-research executor + Reports library + post-backtest attribution: scheduled research now runs end to end — a default-off background executor (
VIBE_TRADING_ENABLE_SCHEDULER) fires due interval/cron jobs through the session runtime (#278, thanks @mvanhorn, closing #254). A new/reportsRun Library page lists, searches, and filters report-worthy runs with links into Run Detail + Compare (#224, thanks @LemonCANDY42). And after every backtest the agent now runs layered attribution — trade-level winners/losers, beta regression, market-regime analysis, and a Monte Carlo permutation test, gated by data availability and routing (#280, thanks @shadowinlife). - 2026-06-20 🔬 Research Autopilot loop closes (Phase 3) + loader OHLC integrity guard + 4 academic alphas: Research Autopilot now runs hypothesis → signal-engine → backtest end to end —
scaffold_signal_enginewrites a contract-correct engine andlink_autopilot_backtestfeeds run metrics back to the hypothesis (68 tools) (#267). A structural OHLC sanity check drops dirty bars (high < low, non-positive prices, bad bracketing) centrally at the loader boundary, guarding every data source (#274, thanks @Shizoqua). And the academic alpha family grows 6 → 10 — Jegadeesh reversal, George-Hwang 52-week-high, Amihud illiquidity, Harvey-Siddique skew (456 factors) (#277, thanks @Robin1987China). - 2026-06-19 🚀 v0.1.10 — Global data layer: market-data sources grow 10 → 18 (free Eastmoney / Sina / Stooq / Yahoo + key-gated Finnhub / Alpha Vantage / Tiingo / FMP, ban-risk fallback) plus 18 read-only data tools (fund flow, dragon-tiger, northbound, margin, block trades, SEC EDGAR + XBRL, financials, options chains, full-market screening…) across A-share / US / HK, all over MCP. Also bundles everything since 0.1.9 — 10 broker connectors,
alpha compare, the provider-reliability overhaul, and the opt-in data cache.pip install -U vibe-trading-ai - 2026-06-18 🔬 Research Autopilot Phase 1 + a local Data Bridge loader, + a Discord security notice: new
run_research_autopilot+generate_backtest_configwire Hypothesis → Research Goal → backtest end to end (now 50 tools), and alocalloader reads OHLCV straight from your own CSV / Parquet / DuckDB files (#260, #252, thanks @Robin1987China), alongside DeepSeekDSMLtool-call parsing and an identifier-containment hardening wave. ⚠️ Security: the old community Discord invite now points to a server we don't control running a fake Collab.Land wallet-"verification" phishing scam — removed everywhere; the only official Discord is the HKUDS server (discord.gg/6TdQnT5xcF), and we'll never ask you to connect a wallet. - 2026-06-17 🧩 Install compatibility + Opus/Kimi provider fixes: Baseline
pip install vibe-trading-aino longer pulls the optionalpyharmonics/tadependency chain; harmonic detection now lives behindvibe-trading-ai[harmonic]while the bundled detector remains available (#250, closes #249). The agent loop also avoids assistant-prefill handoff messages rejected by Opus 4.8+, and Kimi/Moonshot can override the clientUser-AgentwithMOONSHOT_USER_AGENT(#248, closes #246 and #204); follow-up tests now directly cover background-result and auto-compact handoff paths (#251). - 2026-06-16 🛡️ Security/API hardening + GLM/Zhipu alias: Settings writes require auth when configured (#245); API shell-capable tools require explicit
VIBE_TRADING_ENABLE_SHELL_TOOLS=1opt-in (#243); local shutdown requires auth when an API key is configured (#241); and untrusted loopback-looking hosts are rejected instead of treated as local (#242). Runtime edges also got cleaned up: Web chat syncs completed attempts (#236), run cards emit strict JSON for non-finite metrics (#238), malformedRSSHUB_TIMEOUT_S/RSSHUB_FETCH_BUDGET_Sfalls back safely (#240), and ddgs retry fallback is regression-covered (#239). GLM/Zhipu is now a first-class provider alias with model-name inference (#247, closes #237).
- 2026-06-15 🧭 Web-search resilience + Web UI run-continuity fixes:
web_searchno longer fails when a single engine is rate-limited — it now queries several free, no-key engines in order (DuckDuckGo, Google, Bing, Brave, Mojeek, Yahoo) with retry/backoff, treats "no results" as an empty answer rather than an error, and returns an actionable message instead of a bare ❌ when every engine is throttled (override the engine list withVIBE_TRADING_SEARCH_BACKENDS) (#232, closes #231, thanks @Ethan-sun01). In the Web UI, switching pages during a run no longer freezes it — the chat re-subscribes to the live stream and replays missed progress on return (#234) — and the Stop button now takes effect mid-stream and between tools instead of only at iteration boundaries (#235), closing both halves of #229 (thanks @kalkinj). The baostock loader also accepts nativesh.601398/sz.000001codes alongside tushare-style601398.SH(#230, thanks @bhlt).
- 2026-06-14 📊 Per-run token usage + progressive Run Detail charts: Every agent run now persists provider-reported token usage as a run-scoped
llm_usage.json— provider/model, aggregate totals, and per-iteration counts — surfaced additively on/runs/{id}, so a finished run's token cost stays auditable after the live stream is gone (provider-reported only; no prompt/content capture, no price estimation) (#223, thanks @LemonCANDY42). The Run Detail page no longer loads every symbol's candlesticks up front: the default/runs/{id}response is unchanged, but the UI now renders the run summary first and loads each symbol's chart on demand through opt-in?chart_payload=summary/?chart_symbol=modes, with per-symbol loading state and a load-all-with-progress control (#225, thanks @LemonCANDY42). Two loader fixes close the cycle: yfinance's exclusiveendboundary no longer drops the final requested trading day — the download now passesend + 1 daywhile cache keys keep the original range (#226, thanks @gyx09212214-prog) — and a malformedCCXT_TIMEOUT_MS/OKX_TIMEOUT_Svalue now warns and falls back to its default instead of raising at import and blocking startup (#227, thanks @gyx09212214-prog). - 2026-06-13 ↩️ Resume a past session by ID from the CLI: The interactive CLI now prints the session-id on exit, with a copy-paste
vibe-trading resume <session-id>hint — so locating the trace for a finished run no longer means guessing which folder underagent/sessions/is newest by timestamp. The newvibe-trading resume <session-id>subcommand reopens that exact session and replays its recent turns into the loop; an unknown id fails fast instead of silently starting a blank session (#218, thanks @zwrong). - 2026-06-12 🩺 Provider reliability overhaul — DeepSeek hangs, Kimi access, streaming liveness: A cluster of provider reports — DeepSeek runs stuck on "Agent is working…" (#208, thanks @XYWOX),
reached max iterationsmasking empty model responses (#203, thanks @mojianliang), the UI never recovering after a stall (#195, thanks @mafia23), and Kimi rejecting the client (#204, thanks @liao497) — shared one root: every OpenAI-compatible provider ran through a single shim that applied DeepSeek/Kimi/Gemini quirks globally and silently swallowed stream failures. Provider-specific behavior now lives in an explicit capability layer — reasoning capture/replay, Gemini thought signatures, the KimiUser-Agent, OpenRouter's reasoning body are each gated to their own provider instead of cross-contaminating. Reasoning-only streams show a live "Reasoning…" indicator instead of dead air; a stream failure raises a contextualprovider_stream_errorwith one automatic retry for transient resets (deterministic 4xx fail fast) instead of silently falling back to a slow non-streaming call; an empty model response is reported asempty_model_responseinstead of "max iterations"; SSE heartbeats no longer break reconnect replay; and a stuck read-only tool times out instead of hiding behind heartbeats forever. A newvibe-trading provider doctorprints a redacted provider/model/package/proxy snapshot for one-command triage of environment-side hangs. DeepSeek users can opt into the official native adapter withpip install "vibe-trading-ai[deepseek]", and kimi-k2.x'stemperature=1requirement is applied automatically — the Kimi path is verified end-to-end against the live API (tool calls + strict multi-turn reasoning replay onkimi-k2.6).
- 2026-06-11 🐝 Swarm workers now pull market data through the loader layer: An investment-committee run on NVDA exposed a chain of gaps — workers wrote ad-hoc yfinance scripts, trusted a malformed latest bar (volume present, OHLC empty), leaked
NaNinto non-strict JSON, and a context-free continuation prompt re-routed to the wrong preset (#198, thanks @BillDin for an exceptional diagnosis plus both fixes). Swarm workers now get a localget_market_datatool backed by the same normalized loader registry as MCP — strict JSON, non-finite floats serialize asnull— wired into every market-data preset (21 workers across 13 presets) with a prompt policy that steers OHLCV work tool-first (#199);run_swarmtakes an explicitpreset_nameand refuses ambiguous continuation fragments instead of silently falling back toequity_research_team(#200). Grounding got smarter too: a bare US ticker likeNVDAin a swarm prompt is promoted toNVDA.US(stopword-guarded), so workers start from authoritative pre-fetched prices. The tool joins the main agent registry as well — 48 tools now. Also: your Docker data now survives updates — persistent memory, the session search index, user-created skills, shadow accounts and broker config live in named volumes, sodocker compose up --buildno longer wipes them (#197, thanks @FlyerJ). - 2026-06-10 🐳 Docker reaches a host-side Ollama out of the box: Inside the container
localhostis the container itself, so the shippedOLLAMA_BASE_URL=http://localhost:11434failed the LLM preflight for every Dockerized Ollama setup.docker-compose.ymlnow defaults tohttp://host.docker.internal:11434(exportOLLAMA_BASE_URLto point elsewhere) and adds thehost-gatewayextra_hostsmapping so the same file works on Linux as well as Docker Desktop (#196, thanks @ShahNewazKhan). - 2026-06-09 🔑 Clearer error when the Web UI is opened from another machine: Reaching the chat from a non-loopback client (another machine, a VM host, a phone on your LAN) without
API_AUTH_KEYset returned403on every sensitive endpoint — sending a message, listing sessions, live status — but the chat only showed a generic "Failed to send message, please retry." The send path now surfaces the real reason — "Remote API access requires an API key. Add it in Settings, or run the backend on localhost for local-only use." — and the README's web-UI setup spells out the localhost-vs-LAN rule plus the three fixes (browse vialocalhoston the same machine; setAPI_AUTH_KEYand enter it once in Settings; orVIBE_TRADING_TRUST_DOCKER_LOOPBACK=1for Docker Desktop's host gateway) (#191, thanks @mafia23). - 2026-06-08 🔧 Gemini 3.x multi-turn tool-calling fix: This completes the Gemini 3.x thinking-model fix. The 6/05 round-trip (#176) only covered in-memory history, but the real agent loop replays history as OpenAI-format dicts where LangChain dropped the per-tool-call
thought_signaturebefore the request was built — so multi-turn tool calling still 400'd withmissing thought_signature. It is now re-attached at the single_convert_inputchokepoint bothinvokeandstreampass through (parallel calls, where only the first of N is signed, included) (#184, thanks @ngoanpv). - 2026-06-07 🐝 Live swarm status in the chat timeline: When the agent launches a multi-agent swarm (investment committee, quant desk, risk committee, …), the chat now renders an inline status card that streams each worker's state — waiting / running / done / failed / blocked / retrying — in real time, the same per-agent visibility the standalone swarm dashboard already had. Runtime events are bridged into the session SSE stream without changing the existing
/swarm/runsAPI, and a finished card rehydrates from the finalrun_swarmresult on reconnect or history replay (#188, thanks @BillDin). Preset routing also got sharper: an explicitly named preset (e.g.investment_committee, with or without underscores) now wins over keyword scoring, and the bareIVderivatives keyword no longer false-matches inside ordinary words like "given" (#189, thanks @BillDin). - 2026-06-06 ⚖️ Alpha compare — head-to-head across CLI, Web UI, REST & agent: A new
alpha comparebenches a hand-picked shortlist of Alpha Zoo alphas against each other on a universe and period, then ranks them by IC mean/std, IR, IC-positive ratio or sample count — each with its gap to the leader. Unlike a full-zoo bench it evaluates only the alphas you name (a newrun_bench(only=…)subset filter), so comparing three alphas no longer scores all 191 in their zoo. One shared core powers every surface:vibe-trading alpha compare <id1> <id2> … --sort ir(CLI), a Compare view in the Alpha Zoo Web UI (tick alphas in the catalogue → one-click compare with a streamed ranking table),POST /alpha/compare+ SSE (REST), and a read-onlyalpha_compareagent tool (47 tools now). - 2026-06-05 🇮🇳 Dhan + Shoonya connectors (India) — 10 brokers total: The connector-first trading layer adds Dhan and Shoonya for the Indian market (NSE/BSE equities + F&O), bringing the roster to ten brokers. Both are paper + read-only — like Longbridge, their APIs expose no runtime paper/live discriminator, so their
place_order/cancel_orderhard-refuse any non-paper config at the first line (the rule: a broker with no structural paper/live guard is capped at paper + read-only) (#181, closes #174). This cycle also fixes Gemini 2.5 / 3.x thinking models: their per-tool-callthoughtSignaturenow round-trips through the OpenAI-compatible path, so multi-turn function calling no longer fails withINVALID_ARGUMENT(#176, closes #170, thanks @mvanhorn & @jliu6789). Chinese docstrings landed on all 452 Alpha Zoo factors (#180, thanks @LeeCQiang), and a frontend test suite (197 vitest tests) plus backend auth / path-traversal / CORS security tests joined CI (#175, thanks @sambazhu). - 2026-06-04 🗃️ Opt-in local data cache for all 7 data sources: A new
VIBE_TRADING_DATA_CACHEswitch lets every backtest loader — tushare, okx, ccxt, akshare, mootdx, yfinance, futu — cache settled historical bars under~/.vibe-trading/cache(user home, never the repo), so repeated and long-horizon / cross-market backtests skip the network and avoid provider rate limits. Off by default. Batch and connection loaders (yfinance, futu) skip the bulk download / FutuOpenD connection entirely on a full cache hit, a staleness guard never caches a range ending today (its last bar is still forming), and cached frames round-trip byte-identical to freshly fetched ones (#177, thanks @mvanhorn). A new contributor guide for AI / automation-assisted PRs also landed, mapping safe local checks and high-risk broker/MCP/credential surfaces (#173). - 2026-06-03 🧹 Community triage + trace correlation: Tool-call trace entries now carry the originating
call_id, so atool_resultcan be matched back to itstool_callwhen replaying a run trace — arg previews stay truncated to keep trace files small (#168, thanks @zwrong). Source comments no longer point at an internal-only docs path that external contributors couldn't find (#166, thanks @jaleelpersonal). Also clarified that thelangchain-communityresolver warning on install is a harmless leftover-package notice, not a failure (#167), and scoped Gemini 2.5/3.0thoughtSignatureround-tripping for function calls as ahelp wantedtask with a full fix plan (#170, thanks @jliu6789). - 2026-06-02 🔌 Six new broker connectors (Tiger / Longbridge / Alpaca / OKX / Binance / Futu): The connector-first trading layer gains a direct-SDK transport alongside IBKR (local) and Robinhood (MCP). Each connector exposes read-only account / positions / orders / quote / history plus paper-account order placement — test your strategies across these broker paper accounts. Five of them (Tiger, Alpaca, OKX, Binance, Futu) also support bounded, mandate-gated order placement behind the same safety model as Robinhood: a user-committed mandate (symbol universe / order size / exposure / leverage / daily cap), a filesystem kill switch, a fail-closed pre-trade gate, and a full audit ledger. Longbridge is paper + read-only only (its API exposes no runtime paper/live discriminator). Every paper/live distinction is a structural per-broker guard — account-id format, host separation, demo flag, or trade environment. New
trading_place_order/trading_cancel_ordertools; HK and A-share asset classes added to the mandate universe. Experimental / use at your own risk. - 2026-06-01 🚀 v0.1.9 released (
pip install -U vibe-trading-ai): Rolls up everything since 0.1.8. Connector-first broker profiles (IBKR local read-only TWS / IB Gateway + Robinhood Agentic Trading behind OAuth, a committed mandate, order guard, audit ledger, and instant halt). Research Goal runtime across CLI / REST / MCP / Web. A swarm pass — live reconcile + MCP keepalive, operator-configured worker MCP tools, a strict alpha-bench random control, and a newretry_runto relaunch failed/stale runs (36 MCP tools now). Theagent/cli/package refactor with a refreshed terminal UI, themootdxno-token A-share loader, and a robustness pass across backtest / agent loop / sessions.--versionnow always matches the installed package, fixing the 0.1.8 drift (#156). - 2026-05-31 🔌 Connector-first broker architecture (IBKR + Robinhood): Trading access now starts from a selectable connector profile instead of separate broker/live entry points.
vibe-trading connector list/use/check/account/positions/orders/quote/historyand the MCPtrading_*tools share the same selected profile, where paper/live is an attribute of the connector. IBKR can be used immediately through a local read-only TWS / IB Gateway profile, while the official IBKR remote MCP path is seeded as an OAuthmcp.readprobe until stable read tool names are available. Robinhood Agentic Trading remains the bounded live MCP connector behind OAuth, a committed mandate, order guard, audit ledger, and instant halt. - 2026-05-30 🧰 Robustness pass — backtest, agent loop, sessions: LLM-generated signal engines now pass pre-flight interface validation before instantiation, catching circular self-imports, a missing
generate(), non-defaulted__init__args, and wrong return types with actionable JSON errors instead of raw tracebacks (#149); a follow-up routes source-level AST validation errors through the same clean JSON envelope. The agent loop no longer burns all 50 iterations into afailedstatus with no output — it mirrors the swarm worker's wrap-up nudge at 80% of the iteration budget and drops tool definitions on the last iteration to force a final text answer (#148), guarded to fire only mid-run so it never displaces research-goal context. Session message writes nowflush + fsynceach append so expensive AI responses survive a mid-write crash, and the read path skips corrupted JSONL lines (logging the first 200 chars for recovery) instead of 500-ing the whole/messagesendpoint (#147). The Web composer also fixes IME Enter handling so a composition-confirming Enter no longer submits mid-word (#146). - 2026-05-29 🔐 Robinhood Agentic Trading support (opt-in, bounded autonomy): Adds support for Robinhood Agentic Trading (remote MCP, OAuth). Off and read-only by default; the agent acts only inside a user-committed mandate (symbols / order size / exposure / leverage / daily cap), with a filesystem-level instant kill switch, preemptive flatten, mandate auto-expiry, a full audit ledger, and a persistent autonomous runner. No custody, no venue — the broker holds funds and executes; we only relay intent. Experimental / use at your own risk.
- 2026-05-28 🧪 Swarm safety + strict alpha gate + worker MCP: Swarm DAG blocks downstream tasks when upstream fails (#145). New
run_bench_strict()adds a same-universe random control + OOS split to catch factors that just track market beta (#143, thanks @Soli22de). Swarm workers can call operator-configured external MCP servers, with trust boundary pinned (#142, thanks @shadowinlife). - 2026-05-27 📊 mootdx A-share data source + output polish: New
mootdxloader speaks the native 通达信 TCP protocol for A-share OHLCV (no auth, no IP rate-limit, daily + intraday with 25-page walk-back pagination), slotting between tushare and akshare in the fallback chain (#107). CCXT loader now readsHTTP_PROXY/HTTPS_PROXY/ALL_PROXYso Binance/OKX public data works from restricted networks (#126, thanks @ruok808). Final-answer rendering also dropped the ugly full-width---horizontal separators on CLI and Web: the system prompt now nudges the agent toward markdown tables and##headings, the CLI renderer strips standalone HRs as defense-in-depth, and the chat bubble hides any<hr>that slips through (#139, thanks @sdwxm188). - 2026-05-26 ✅ Research Goal lifecycle closure: Goal mode now behaves like a real task runner: Web UI goal creation creates or binds the session and immediately sends the kickoff turn; active goals can be continued, edited, cancelled, and completed across Web/API/CLI/MCP; and the agent advances from the current goal snapshot (criteria, evidence, claims, open items) instead of only the original prompt. Covered-but-still-active goals now enter an audit/status update instead of stopping silently, with regression coverage across backend, CLI, MCP, and frontend events.
- 2026-05-25 🧼 Cleaner chat UI + composer workflow: The Web UI keeps chat focused on the next action: upload, swarm, and research-goal modes now live behind the composer
+menu instead of floating panels. Active context appears above the input as compact chips, and goal details expand inline only when needed. The UI also drops the old custom i18n layer in favor of direct English copy, gates Full Report cards to report-worthy runs, and hardens local dev startup/status reporting for reliable browser smoke tests. - 2026-05-24 🎯 Research Goal runtime: Added a session-scoped Research Goal layer across backend, CLI, API/MCP, SSE, and Web UI. Goals persist claims, acceptance criteria, evidence rows, budgets, and completion policy; agent tools can create goals and attach evidence;
/goalgives the CLI a direct entry point; REST/MCP expose goal snapshots and evidence writes; SSE keeps chat clients fresh. Follow-up audit fixes locked down verified evidence, blocked live-trading risk tiers through agent tools, wired CLI-created goals into later turns, cleaned goal ledgers on session deletion, enabled replay-all, and fixed cross-session frontend races. - 2026-05-23 🖥️ Interactive CLI refresh: The terminal front door now opens with a larger Vibe-Trading banner, a cleaner prompt divider, prior-turn recap, post-run timing, and a Claude Code-style activity rail for live agent work. Tool calls, web/data fetches, shell-style actions, Markdown answers, and pipe tables render in a more readable transcript, while piped or non-TTY runs keep plain-text output for automation. Generated CLI screenshots are now treated as local artifacts instead of committed docs files, keeping the repository lighter.
- 2026-05-22 🧭 Swarm recovery + MCP keepalive: Swarm status now reconciles from live task files on every read, so API/MCP/SSE/list views recover crashed or stale runs instead of showing permanent
runningsnapshots.run_swarmsends MCP progress heartbeats while it polls, with a fixed first frame ofswarm_started run_id=<id>for clients that reconnect after transport drops; workers now heartbeat through LLM streaming, grounding fetches, and tool execution. The stale-run reaper uses per-run thresholds and derives terminal status from task states,SwarmToolno longer cancels a still-running team just because its wait budget elapsed, and MCP clients can callreap_stale_runs()for explicit cleanup. Today's DX pass also refreshed provider default models and aligned CI syntax checks with the newagent/cli/package. 22 new regressions cover hydration, terminal recovery, stale reaping, keepalive cadence, env parsing, and heartbeat wiring; the full swarm/MCP suite is at 169 passed, 4 skipped. - 2026-05-21 🧱 CLI package refactor:
agent/cli.py(3216 LOC) split into theagent/cli/package — interactive front door, slash router, Rich components, plus a_legacy.pyshim that preserves every subcommand and re-exports every public symbol socli.cmd_*/cli._INIT_ENV_PATH/cli.Confirmkeep working. New FastAPI middleware serves the SPA shell when a browser opens/runs/{id}or/correlationdirectly; same narrowing landed in the Vite dev proxy. Version unified viacli/_version.py(no more drift between--versionand the banner),python -m clirestored via__main__.py, and the chat-gate narrowed sochat --help/chat extrareach legacy argparse instead of being swallowed by the REPL. - 2026-05-20 🔬 Hypothesis Registry CLI: Closes the CLI side of the Hypothesis Registry shipped backend-only on 2026-05-16.
vibe-trading hypothesis listprints a Rich table or JSON (--statusfilter,--limit);show <id>renders a detail panel including linked run cards;invalidate <id> --note "..."flips status torejectedwhile preserving prior invalidation notes when--noteis omitted. Honors the existingVIBE_TRADING_HYPOTHESES_PATHenv override and adds a per-invocation--path. 22 new tests cover wiring, JSON output, status filter, limit, missing-id errors, and note persistence. - 2026-05-19 ✨ Live tool feedback + graceful cancel: Long-running tools (backtests, large PDFs, swarm workers) no longer look frozen. Each tool call now emits a 3-second heartbeat plus structured per-stage progress —
run_backtestshows phase markers (validate/simulate/finalize),read_documentticks per page on PDF or per sheet on Excel,read_urlmarksfetch/parse. The CLI Rich Live dashboard renders a Unicode spinner, ASCII progress bar, ETA, and stacks up to 3 parallel tools keyed by name; the frontend chat ships a newToolProgressIndicatorwith rAF-coalesced renders, ARIArole="status"+ hidden native<progress>for screen readers, and a determinateProgressRingSVG when total is known. FirstCtrl+Cduring a CLI run now callsagent.cancel()for graceful exit (current step finishes, trace closes cleanly); a second within 2s force-quits. Reusable primitives extracted along the way:ProgressBar.tsxandlib/tools.ts(shared tool-name i18n). - 2026-05-18 🧹 Cleanup pass + three latent bug fixes:
CompositeEngineno longer misroutes bare Chinese-futures codes likeRB2410toGlobalFuturesEngine—_is_china_futuresmoved into a shared_market_hooksmodule with a case-normalized product table and a non-CN exchange guard, plus 9 new regression cases. Session FTS5 indexes now persist timestamps so cross-session search can sort by date; the same path also fixed a re-upsert that was wall-clocking every session'sstarted_at. The Vite dev-mode proxy gained the missing/alphaentry so the AlphaZoo page resolves onnpm run dev.tests/test_e2e_harness_v2.py(real-LLM e2e suite) is now gated behindVIBE_TRADING_RUN_LIVE_E2E=1so CI no longer changes shape based on env-key presence. Ruffper-file-ignoresadded for the factor zoo (3783 → 0 F401 noise), frontend tsconfig enablesnoUnusedLocals/noUnusedParametersas regression guards, and 76 unusedvw = vwap(...)boilerplate lines were dropped fromgtja191alphas. Net -918 LOC. - 2026-05-17 🧬 Alpha Zoo v1 (0.1.8): 452 pre-built quant alphas across 4 zoos —
qlib158(Microsoft Qlib, Apache-2 attribution),alpha101(Kakushadze 101 Formulaic Alphas, paper rewrite from arXiv:1601.00991),gtja191(Guotai Junan 2014 short-horizon factor report), andacademic(Fama-French 5 + Carhart price-based proxies). One-line CLI to bench any zoo on your universe:vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025. Ships with AST purity gate, lookahead-guard test,pytest-socketnetwork kill-switch, per-zoo LICENSE.md, and a Developer Certificate of Origin (DCO) workflow for community PRs. Auto-rendered Alpha Library at vibetrading.wiki/alpha-library/ + research-lab post Which of the 191 GTJA alphas still work in 2026?. - 2026-05-16 🧪 Research spine update: Added a backend Hypothesis Registry with
create_hypothesis,update_hypothesis,link_backtest, andsearch_hypotheses; external-content readers now attach warning-onlysecurity_warnings; and Shadow Account scanning now uses deterministic OHLCV feature evaluation instead of the old calendar-phase stub. - 2026-05-15 🪪 The run detail page now surfaces the Trust Layer run card alongside metrics and artifacts, completing the UI side of the
run_card.jsonwork landed on 2026-05-12.PersistentMemory.add()was also hardened on length, empty/whitespace-only names, and C0/C1 control bytes from the #108/#109/#110 triage (#112, thanks @Teerapat-Vatpitak). - 2026-05-14 🌐 the public wiki is now live at vibetrading.wiki with docs, tutorials, Research Lab, and Alpha Library sections deployed through Cloudflare Pages. Persistent memory is also inspectable from the CLI via
vibe-trading memory list/show/search/forget(#102, thanks @Teerapat-Vatpitak), and memory tokenization/slugs now support Thai, Arabic, Hebrew, and Cyrillic text (#104). - 2026-05-13 🧭 Swarm runs now ground workers with fetched market data and cleaner persisted reports (#93, #84).
- 2026-05-12 🧾 Backtests now emit
run_card.jsonandrun_card.mdalongside artifacts for reproducible research runs. - 2026-05-11 🧭 Memory slugs, swarm accounting, and CLI preflight: Persistent memory now preserves CJK characters when generating file slugs, preventing silent filename collisions for Chinese/Japanese/Korean notes (#95, thanks @voidborne-d). Swarm run totals now prefer provider-reported token usage with the existing estimate fallback (#94, thanks @Teerapat-Vatpitak), and the CLI run UI gained a startup preflight check for common environment issues (#96, thanks @ykykj).
- 2026-05-10 🧱 Regression guardrails + run metadata: Memory recall now treats underscores as token boundaries, so snake_case saved memories such as
mcp_wiring_testmatch natural-language queries like "mcp wiring" (#87, thanks @hp083625). The MCP server has a subprocess smoke test covering initialize →tools/list→tools/callto guard the first-call deadlock path (#86), while low-risk hardening landed for Windows path-sensitive tests, API best-effort exception handling, backtestrun_dirallowed-root validation, and SwarmRun provider/model metadata (#88, #90, #91, #92, thanks @Teerapat-Vatpitak). - 2026-05-09 🛡️ API path hardening + MCP server stability: API run/session routes now validate path IDs before lookup, rejecting malformed newline-containing parameters and pinning the behavior in the auth/security regression suite (#80, thanks @SJoon99). The MCP server now pre-warms the tool registry on the main thread before serving
tools/call, avoiding a first-call deadlock in lazy tool discovery (#85, thanks @Teerapat-Vatpitak). The Vite dev proxy also honorsVITE_API_URLfor non-default backend targets (#82, thanks @voidborne-d). - 2026-05-08 🧾 Tushare statement fields in filters: A-share daily backtests can now request PIT-safe financial statement fields through
fundamental_fields, so signal engines can screen onincome_total_revenue,income_n_income,balancesheet_total_hldr_eqy_exc_min_int,fina_indicator_roe, and similar table-prefixed columns after their announcement/disclosure dates (#76, thanks @mrbob-git). Follow-up hardening makes explicit statement-field requests fail fast if Tushare enrichment cannot run, instead of silently falling back to raw price bars (#77). - 2026-05-07 📈 Tushare fundamentals + community triage: Added a point-in-time
TushareFundamentalProvidercontract for fundamental research workflows, with regression coverage for the projectTUSHARE_TOKENenvironment path (#74). Community triage also clarified that Vibe-Trading keeps rapid iteration focused on one UI language for now, avoids adding redundant search dependencies while DuckDuckGo-backedweb_searchis already bundled, and treats unofficial hosted deployments as untrusted places for API keys or data-source tokens. - 2026-05-06 🚀 v0.1.7 released (Release notes,
pip install -U vibe-trading-ai): Security-boundary hardening is now published on PyPI and ClawHub, covering safer API/read/upload/file/URL/generated-code/shell-tool/Docker defaults while keeping localhost CLI/Web UI workflows low-friction. This cycle also includes Web UI Settings, correlation heatmap, OpenAI Codex OAuth, A-share pre-ST filtering, interactive CLI UX, swarm preset inspection, dividend analysis, dev workflow polish, and audited frontend build-dependency floors. Thanks to the 0.1.7 contributors and to lemi9090 (S2W) for coordinated security validation. - 2026-05-05 🛡️ Security boundary follow-up: Completes the remaining security-boundary hardening around explicit CORS origins, Settings credential indicators, web URL reading, and Shadow Account code generation, with regression tests added for each path. Normal localhost CLI/Web UI workflows stay the same; remote deployments should continue using
API_AUTH_KEYand explicit trusted origins. - 2026-05-04 🖥️ Interactive CLI UX + CI cleanup: Interactive mode now has a live bottom status bar showing provider/model, session duration, last-run latency, and cumulative tool-call stats, plus prompt history navigation and cursor editing with arrow keys via
prompt_toolkit(#69). The CLI still falls back to Rich prompts whenprompt_toolkitor a TTY is unavailable. CI path expectations were also aligned with the hardened file-import sandbox and cross-platform/tmpresolution, returning main to green (bb67dc7). - 2026-05-03 🛡️ Security hardening patch: Tightens default API authentication for non-local deployments, protects sensitive run/session/swarm reads, restricts upload and local file-reading boundaries, gates shell-capable tools by entry point, validates generated strategy loading before import, and runs the Docker image as a non-root user with a localhost-only published port by default. Local CLI and localhost Web UI workflows remain low-friction; remote API/Web deployments should set
API_AUTH_KEY. - 2026-05-02 🧭 Dividend analysis + sharper roadmap: Added the
dividend-analysisskill for income stocks, payout sustainability, dividend growth, shareholder yield, ex-dividend mechanics, and yield-trap checks, pinned by bundled-skill regression tests. The public roadmap now focuses on upcoming work: Research Autopilot, Data Bridge, Options Lab, Portfolio Studio, Alpha Zoo, Research Delivery, Trust Layer, and Community sharing. - 2026-05-01 🔥 Correlation heatmap + OpenAI Codex OAuth + A-share pre-ST filter: New correlation dashboard/API computes rolling return correlations and renders an ECharts heatmap for portfolio and symbol analysis (#64). OpenAI Codex provider support now uses ChatGPT OAuth via
vibe-trading provider login openai-codex, with Settings metadata and adapter regression tests (#65). Added and hardened theashare-pre-st-filterskill for A-share ST/*ST risk screening, including Sina penalty relevance filtering so securities-account mentions do not inflate E2 counts (#63). - 2026-04-30 ⚙️ Web UI Settings + validation CLI hardening: New Settings page for LLM provider/model, base URL, reasoning effort, and data source credentials, backed by local/auth-protected settings APIs and data-driven provider metadata (#57). Also hardens
python -m backtest.validation <run_dir>so missing, blank, malformed, non-existent, and non-directory inputs fail with clear operator-facing messages before validation starts (#60). - 2026-04-28 🚀 v0.1.6 released (
pip install -U vibe-trading-ai): Fixesvibe-trading --swarm-presetsreturning empty afterpip install/uv tool install(#55) — preset YAMLs now bundled inside thesrc.swarmpackage and pinned by a 6-test regression suite. Plus AKShare loader correctly routes ETFs (510300.SH) and forex (USDCNH) to the right endpoints with hardened registry fallback. Rolls up everything since v0.1.5: benchmark comparison panel,/uploadstreaming + size limits, Futu loader (HK + A-share), vnpy export skill, security hardening, frontend lazy loading (688KB → 262KB). - 2026-04-27 📊 Benchmark panel + upload safety: Backtest output now ships a benchmark comparison panel (ticker / benchmark return / excess return / information ratio) with yfinance-backed resolution for SPY, CSI 300, etc. (#48). Plus
/uploadstreams the request body in 1 MB chunks and aborts pastMAX_UPLOAD_SIZE, bounding memory under oversized/malformed clients (#53) — pinned by a 4-case regression suite. - 2026-04-22 🛡️ Hardening + new integrations: Path containment enforced in
safe_path+ journal/shadow tool sandbox,MANIFEST.inships.env.example/ tests / Docker files in sdist, route-level lazy loading shrinks frontend initial bundle 688KB → 262KB. Plus Futu data loader for HK & A-share equities (#47) and vnpy CtaTemplate export skill (#46). - 2026-04-21 🛡️ Workspace + docs: Relative
run_dirnormalized to active run dir (#43). README usage examples (#45). - 2026-04-20 🔌 Reasoning + Swarm:
reasoning_contentpreserved across allChatOpenAIpaths — Kimi / DeepSeek / Qwen thinking work end-to-end (#39). Swarm streaming + clean Ctrl+C (#42). - 2026-04-19 📦 v0.1.5: Published to PyPI & ClawHub.
python-multipartCVE floor bump, 5 new MCP tools wired (analyze_trade_journal+ 4 shadow-account tools),pattern_recognition→patternregistry fix, Docker dep parity, SKILL manifest synced (22 MCP tools / 71 skills). - 2026-04-18 👥 Shadow Account: Extract your strategy rules from a broker journal → backtest the shadow across markets → 8-section HTML/PDF report showing exactly how much you leave on the table (rule violations, early exits, missed signals, counterfactual trades). 4 new tools, 1 skill, 32 tools total. Trade Journal + Shadow Account samples now live in the web UI welcome screen.
- 2026-04-17 📊 Trade Journal Analyzer + Universal File Reader: Upload broker exports (同花顺/东财/富途/generic CSV) → auto trading profile (holding days, win rate, PnL ratio, drawdown) + 4 bias diagnostics (disposition effect, overtrading, chasing momentum, anchoring).
read_documentnow dispatches PDF, Word, Excel, PowerPoint, images (OCR), and 40+ text formats behind one unified call. - 2026-04-16 🧠 Agent Harness: Persistent cross-session memory, FTS5 session search, self-evolving skills (full CRUD), 5-layer context compression, read/write tool batching. 27 tools, 107 new tests.
- 2026-04-15 🤖 Z.ai + MiniMax: Z.ai provider (#35), MiniMax temperature fix + model update (#33). 13 providers.
- 2026-04-14 🔧 MCP Stability: Fixed backtest tool
Connection closederror on stdio transport (#32). - 2026-04-13 🌐 Cross-Market Composite Backtest: New
CompositeEnginebacktests mixed-market portfolios (e.g. A-shares + crypto) with shared capital pool and per-market rules. Also fixed swarm template variable fallback and frontend timeout. - 2026-04-12 🌍 Multi-Platform Export:
/pineexports strategies to TradingView (Pine Script v6), TDX (通达信/同花顺/东方财富), and MetaTrader 5 (MQL5) in one command. - 2026-04-11 🛡️ Reliability & DX:
vibe-trading init.env bootstrap (#19), preflight checks, runtime data-source fallback, hardened backtest engine. Multi-language README (#21). - 2026-04-10 📦 v0.1.4: Docker fix (#8),
web_searchMCP tool, 12 LLM providers,akshare/ccxtdeps. Published to PyPI and ClawHub. - 2026-04-09 📊 Backtest Wave 2: ChinaFutures, GlobalFutures, Forex, Options v2 engines. Monte Carlo, Bootstrap CI, Walk-Forward validation.
- 2026-04-08 🔧 Multi-market backtest with per-market rules, Pine Script v6 export, 5 data sources with auto-fallback.
</details>
---
✨ Key Features
<div align="center"> <table align="center" width="94%" style="width:94%; margin-left:auto; margin-right:auto;"> <tr> <td align="center" width="50%" valign="top"> <img src="assets/feature-self-improving-trading-agent.png" height="130" alt="Self-improving trading agent"/><br> <h3>🔍 Self-Improving Trading Agent</h3> <div align="left"> • Natural-language market research<br> • Strategy drafts and file/web analysis<br> • Memory-backed workflows </div> </td> <td align="center" width="50%" valign="top"> <img src="assets/feature-multi-agent-trading-teams.png" height="130" alt="Multi-agent trading teams"/><br> <h3>🐝 Multi-Agent Trading Teams</h3> <div align="left"> • Investment, quant, crypto, and risk teams<br> • Streaming progress and persisted reports<br> • Workers grounded with fetched market data </div> </td> </tr> <tr> <td align="center" width="50%" valign="top"> <img src="assets/feature-cross-market-data-backtesting.png" height="130" alt="Cross-market data and backtesting"/><br> <h3>📊 Cross-Market Data & Backtesting</h3> <div align="left"> • A/HK/US equities, crypto, futures, and forex<br> • Data fallback and composite backtests<br> • PIT data, validation, and run cards </div> </td> <td align="center" width="50%" valign="top"> <img src="assets/feature-shadow-account.png" height="130" alt="Shadow Account"/><br> <h3>👥 Shadow Account</h3> <div align="left"> • Broker-journal behavior diagnostics<br> • Rule-based Shadow Account comparisons<br> • Exportable audit reports and strategy code </div> </td> </tr> </table> </div>
💡 What Is Vibe-Trading?
Vibe-Trading is an open-source research workspace for turning finance questions into runnable analysis. It connects natural-language prompts to market-data loaders, strategy generation, backtest engines, reports, exports, and persistent research memory.
It is designed for research, simulation, and backtesting — and, when you choose, autonomous trading through a broker you authorize yourself (e.g. Robinhood Agentic Trading). It holds no funds and never trades outside the limits you set, and you can halt it instantly.
---
✨ What You Can Do
| Task | Output |
|---|---|
| Ask a trading question | Market research with tools, data, documents, and reusable session context. |
| Backtest a strategy idea | Strategy code, metrics, benchmark context, validation artifacts, and run cards. |
| Review your own trades | Broker-journal parsing, behavior diagnostics, rule extraction, and Shadow Account comparisons. |
| Improve repeated research | Persistent memory and editable skills turn useful routines into reusable workflows. |
| Run analyst teams | Multi-agent research reviews for investment, quant, crypto, macro, and risk workflows. |
| Put research into IM channels | Run the same session runtime through WebSocket, Telegram, Slack, Discord, Matrix, WhatsApp, Signal, QQ/NapCat, WeChat/WeCom, Feishu/Lark, DingTalk, Teams, email, and Mochat with CLI, REST, and Web UI controls. |
| Ship usable artifacts | Reports, TradingView Pine Script, TDX, MetaTrader 5, MCP tools, and later research sessions. |
| Bench a pre-built alpha zoo | One-line IC + alive/reversed/dead categorisation across 461 alphas (Qlib 158 + Kakushadze 101 + GTJA 191 + academic + PIT-safe fundamental) on your universe. |
---
⚡ Quick Example
pip install vibe-trading-ai
# Natural-language research
vibe-trading run -p "Backtest a BTC-USDT 20/50 moving-average strategy for 2024, summarize return and drawdown, then export the report"
# Bench a pre-built alpha zoo (one line)
vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025 --top 20
vibe-trading --upload trades_export.csv
vibe-trading run -p "Analyze my trading behavior, extract my shadow strategy, and compare it with my actual trades"
---
👥 Shadow Account
Shadow Account starts from your own trading records instead of a generic strategy template.
Upload a broker export, let the agent summarize your behavior, then compare the actual trading path with a rule-based shadow strategy.
| Step | Agent output |
|---|---|
| 1. Read your journal | Parses broker exports from 同花顺, 东方财富, 富途, and generic CSV formats. |
| 2. Profile your behavior | Holding days, win rate, PnL ratio, drawdown, disposition effect, overtrading, momentum chasing, and anchoring checks. |
| 3. Extract your rules | Turns recurring entries/exits into an explicit strategy profile instead of a hand-wavy summary. |
| 4. Run the shadow | Backtests the extracted rules and highlights rule breaks, early exits, missed signals, and alternative trade paths. |
| 5. Deliver the report | Produces an HTML/PDF report that can be inspected, archived, or refined in a later session. |
vibe-trading --upload trades_export.csv
vibe-trading run -p "Analyze my trading behavior, extract my shadow strategy, and compare it with my actual trades"
---
🧪 Research Workflow
Most runs follow the same evidence path: route the request, load the right market context, execute tools, validate outputs, and keep the artifacts inspectable.
| Layer | What happens |
|---|---|
| Plan | Selects the relevant finance skills, tools, data sources, and swarm preset when useful. |
| Ground | Pulls A-shares, HK/US equities, crypto, futures, forex, documents, or web context through the available loaders. |
| Execute | Generates testable strategy code, runs tools, and uses the matching backtest engine or analysis workflow. |
| Validate | Adds metrics, benchmark comparison, Monte Carlo, Bootstrap, Walk-Forward, run cards, and warnings where applicable. |
| Deliver | Returns reports, artifacts, tool traces, and exports for TradingView, TDX, MetaTrader 5, MCP clients, or later sessions. |
---
📡 Data Sources & Smart Fallback
One get_market_data call, 19 free market-data sources (plus the optional QVeris premium marketplace). Set source: "auto" — the loader picks by symbol, then walks a per-market chain ordered by IP-ban risk: never-banned public sources first, throttled / key-gated ones last. Zero config, no single point of failure.
| Source | Markets | Auth | Role |
|---|---|---|---|
tencent · mootdx | A-share | none | never IP-banned (mootdx = 通达信 TCP) |
eastmoney | A / US / HK | none | OHLCV + deep fundamentals & flow tools (throttled) |
baostock · akshare | A (+ US/HK/futures/macro/fx) | none | free fallbacks |
tushare | A / futures / fund / macro | token | richest A-share |
yahoo · sina · stooq | US (/HK) | none | direct chart/quotes/options · K-line to 1984 · EOD CSV |
yfinance | US / HK | none | wrapper |
finnhub · alphavantage · tiingo · fmp | US | key | optional providers |
qveris | global multi-asset | key · credits | premium marketplace — 63+ providers via one key (explicit-only, never in auto fallback) |
okx · ccxt | crypto | none | OKX + 100+ exchanges |
futu | HK / A | OpenD | optional local FutuOpenD |
india_broker | India (NSE/BSE) | broker login | read-only Shoonya / Dhan bars for .NS / .BO (fallback-chain tail) |
local | any | none | your own CSV / Parquet / DuckDB via local: prefix |
Fallback chains (by IP-ban risk):
- A-share →
tencent·mootdx·eastmoney·baostock·akshare·tushare·local - US →
yahoo·stooq·sina·eastmoney·yfinance·tiingo·fmp·finnhub·alphavantage·akshare·local - HK →
eastmoney·yahoo·futu·yfinance·akshare·local - India (NSE/BSE) →
yahoo·yfinance·india_broker·local - Crypto →
okx·ccxt·yfinance·local · (futures / fund / macro / forex →tushare/akshare→local)
Beyond OHLCV, 18 read-only data tools reach into fundamentals & flow — fund flow, dragon-tiger, northbound, margin, block trades, shareholder count, lockup, sector, research reports, news, SEC filings, financial statements, options chains, institutional holdings, market screening, symbol search, and macro — all exposed over MCP. An explicit local: symbol never silently falls back to a network source.
💎 Optional premium data — QVeris
<img src="https://www.qveris.com/logo-color.png" alt="QVeris" height="36">
Data: free routing or premium, your choice. Free stays the default: 19 built-in sources with ban-risk fallback, no key, no cost. Premium via QVeris adds 10,000+ capabilities (per QVeris) across 63+ providers for options Greeks, premium fundamentals, China/HK/global data, macro, crypto, news, and filings; failed calls are not charged. Enable it in Settings -> QVeris or vibe-trading data mode paid.
QVeris disclosure: signing up through the Vibe-Trading referral link gets you +1,000 bonus credits and supports the project.
---
🔩 Detailed Capabilities
Detailed inventories are folded below to keep the main README scannable. Open them when you want to inspect the available building blocks.
<details> <summary><b>Finance Skill Library</b> <sub>87 skills across 9 categories</sub></summary>
- 📊 87 specialized finance skills organized into 9 categories
- 🌐 Complete coverage from traditional markets to crypto & DeFi
- 🔬 Comprehensive capabilities spanning data sourcing to quantitative research
| Category | Skills | Examples |
|---|---|---|
| Data Source | 10 | data-routing, tushare, yfinance, okx-market, akshare, mootdx, ccxt, eastmoney, sec-edgar, qveris |
| Strategy | 19 | strategy-generate, cross-market-strategy, technical-basic, candlestick, ichimoku, elliott-wave, smc, multi-factor, ml-strategy |
| Analysis | 21 | factor-research, macro-analysis, global-macro, valuation-model, earnings-forecast, credit-analysis, dividend-analysis |
| Asset Class | 9 | options-strategy, options-advanced, convertible-bond, etf-analysis, asset-allocation, sector-rotation |
| Crypto | 7 | perp-funding-basis, liquidation-heatmap, stablecoin-flow, defi-yield, onchain-analysis |
| Flow | 8 | hk-connect-flow, us-etf-flow, edgar-sec-filings, financial-statement, adr-hshare |
| Tool | 10 | backtest-diagnose, report-generate, pine-script, doc-reader, web-reader, vnpy-export, trade-journal |
| Research | 2 | alpha-zoo, strategy-dev-manager |
| Risk Analysis | 1 | ashare-pre-st-filter |
</details>
<details> <summary><b>Custom Data Source</b> <sub>register your own historical OHLCV loader</sub></summary>
Need a market or vendor we don't ship a loader for? Add your own historical-bar loader and select it with source="<name>". The steps edit package source, so run from a clone (pip install -e .).
- Write the loader — create
agent/backtest/loaders/<name>_loader.pywith a
class that satisfies DataLoaderProtocol (duck-typed, no base class needed) and is tagged with @register:
```python import pandas as pd from backtest.loaders.registry import register
@register class DataLoader: name = "mysource" # the value you pass as source= markets = {"us_equity"} # a_share/us_equity/hk_equity/crypto/futures/fund/macro/forex requires_auth = False
def is_available(self) -> bool: return True # token present? network reachable?
def fetch(self, codes, start_date, end_date, *, interval="1D", fields=None): # return {symbol: DataFrame indexed by trade_date, # columns: open, high, low, close, volume} ... ```
- Register the module so
@registerfires — add
"backtest.loaders.<name>_loader" to _loader_modules in agent/backtest/loaders/registry.py.
- Allow the name through config validation — add
"mysource"to
_VALID_SOURCES in agent/backtest/runner.py.
- (Optional) slot it into a market's
FALLBACK_CHAINSinregistry.pyso
source="auto" can reach it.
- Use it —
source="mysource"in a backtest config, or via the CLI / agent.
Real-time ticks / order-book depth are out of scope for loaders — the loader layer is point-in-time historical bars only. Live market data flows through the broker connectors instead:
okx/binance/ccxtfor crypto,futu/tigerfor equities.
</details>
<details> <summary><b>Preset Trading Teams</b> <sub>30 swarm presets</sub></summary>
- 🏢 30 ready-to-use agent teams
- ⚡ Pre-configured finance workflows
- 🎯 Investment, trading & risk management presets
| Preset | Workflow |
|---|---|
investment_committee | Bull/bear debate → risk review → PM final call |
global_equities_desk | A-share + HK/US + crypto researcher → global strategist |
crypto_trading_desk | Funding/basis + liquidation + flow → risk manager |
earnings_research_desk | Fundamental + revision + options → earnings strategist |
macro_rates_fx_desk | Rates + FX + commodity → macro PM |
quant_strategy_desk | Screening + factor research → backtest → risk audit |
technical_analysis_panel | Classic TA + Ichimoku + harmonic + Elliott + SMC → consensus |
risk_committee | Drawdown + tail risk + regime review → sign-off |
global_allocation_committee | A-shares + crypto + HK/US → cross-market allocation |
<sub>Plus 20+ additional specialist presets — run vibe-trading --swarm-presets to explore all.
</sub>
</details>
<details> <summary><b>Alpha Zoo</b> <sub>461 pre-built quant alphas across 5 families</sub></summary>
- 🧬 461 cross-sectional alphas, lookahead-banned at the operator layer
- 📈 IC + IR + alive/reversed/dead categorisation in one CLI command
- 🔬 AST purity gate + 300-row lookahead sentinel test +
pytest-socketnetwork kill-switch - 📦 Apache-2 attribution for Qlib; per-zoo
LICENSE.mddeclaring formulas as mathematical content - 🤝 Developer Certificate of Origin (DCO) sign-off workflow for community PRs
| Zoo | Count | Source | License |
|---|---|---|---|
| qlib158 | 154 | Microsoft Qlib Alpha158 (Apache-2.0, commit-pinned) | Apache-2.0 |
| alpha101 | 101 | Kakushadze (2015), "101 Formulaic Alphas", arXiv:1601.00991 | Formulas are mathematical content |
| gtja191 | 191 | Guotai Junan (2014), "191 Short-period Trading Alpha Factors" | Formulas are mathematical content |
| academic | 11 | Fama-French 5 + Carhart momentum + Jegadeesh reversal + George-Hwang 52-week-high + Amihud illiquidity + Harvey-Siddique skew + Frazzini-Pedersen betting-against-beta (price-based proxies) | Public academic literature |
| fundamental | 4 | PIT-safe SEC company facts — earnings yield, ROE, gross profitability, asset growth (filed-date anchored) | Public financial data |
Run vibe-trading alpha list to browse, vibe-trading alpha show <id> for formulas + source, vibe-trading alpha bench --zoo X --universe Y --period Z to score a whole zoo.
</details>
🎬 Demo
<div align="center"> <table> <tr> <td width="50%">
https://github.com/user-attachments/assets/4e4dcb80-7358-4b9a-92f0-1e29612e6e86
</td> <td width="50%">
https://github.com/user-attachments/assets/3754a414-c3ee-464f-b1e8-78e1a74fbd30
</td> </tr> <tr> <td colspan="2" align="center"><sub>☝️ Natural-language backtest & multi-agent swarm debate — Web UI + CLI</sub></td> </tr> </table> </div>
---
🚀 Quick Start
One-line install (PyPI)
pip install vibe-trading-ai
Then run a first research task:
vibe-trading init
vibe-trading run -p "Backtest a BTC-USDT 20/50 moving-average strategy for 2024 and summarize return and drawdown"
Upgrading from an older version? 0.1.10 moved to LangChain 1.x. If imports break after
pip install -U vibe-trading-aiover a pre-0.1.10 install (e.g. langgraph fails to import), recreate the venv or runpip install --force-reinstall vibe-trading-ai. A fresh install is unaffected.
Package name vs commands: The PyPI package is
vibe-trading-ai. Once installed, you get three commands: | Command | Purpose | |---------|---------| |vibe-trading| Interactive CLI / TUI | |vibe-trading serve| Launch FastAPI web server | |vibe-trading-mcp| Start MCP server (for Claude Desktop, OpenClaw, Cursor, etc.) |
vibe-trading init # interactive .env setup
vibe-trading # launch CLI
vibe-trading serve --port 8899 # launch web UI
vibe-trading-mcp # start MCP server (stdio)
Or choose a path
| Path | Best for | Time |
|---|---|---|
| A. Docker | Try it now, zero local setup | 2 min |
| B. Local install | Development, full CLI access | 5 min |
| C. MCP plugin | Plug into your existing agent | 3 min |
| D. ClawHub | One command, no cloning | 1 min |
Prerequisites
- An LLM API key from any supported provider — or run locally with Ollama (no key needed)
- Python 3.11+ for Path B
- Docker for Path A
- OpenAI Codex can also be used with ChatGPT OAuth: set
LANGCHAIN_PROVIDER=openai-codex, then runvibe-trading provider login openai-codex. This does not useOPENAI_API_KEY.
Supported LLM providers: OpenRouter, Requesty, OpenAI, DeepSeek, Gemini, Groq, DashScope/Qwen, Zhipu, Moonshot/Kimi, MiniMax, Xiaomi MIMO, Z.ai, Ollama (local). See
.env.examplefor config.
Tip: All markets work without any API keys thanks to automatic fallback. yfinance (HK/US), OKX (crypto), mootdx (A-shares, TCP-direct, no IP throttle), and AKShare (A-shares, US, HK, futures, forex) are all free. Tushare token is optional — mootdx is the preferred no-token A-share fallback, with AKShare as a broader backup.
Path A: Docker (zero setup)
git clone https://github.com/HKUDS/Vibe-Trading.git
cd Vibe-Trading
cp agent/.env.example agent/.env
# Edit agent/.env — uncomment your LLM provider and set API key
docker compose up --build
Open http://localhost:8899. Backend + frontend in one container.
Docker publishes the backend on 127.0.0.1:8899 by default and runs the app as a non-root container user. If you intentionally expose the API beyond your own machine, set a strong API_AUTH_KEY and send Authorization: Bearer <key> from clients.
[!NOTE] Using Ollama with Docker: the container reaches a host-side Ollama via
host.docker.internal, notlocalhost(inside the containerlocalhostis the container itself).docker-compose.ymldefaultsOLLAMA_BASE_URLtohttp://host.docker.internal:11434; exportOLLAMA_BASE_URL(or set it in a top-level.env) to point elsewhere. This relies on thehost-gatewaymapping inextra_hosts, which requires Docker Engine ≥ 20.10 / Compose v2 (provided automatically on Docker Desktop).
Your data survives updates: persistent memory, the cross-session search index, user-created skills, shadow accounts, broker connector config, web sessions, backtest runs, swarm history, and uploads all live in named Docker volumes, so git pull && docker compose up --build keeps them. They are deleted only by docker compose down -v.
Path B: Local install
git clone https://github.com/HKUDS/Vibe-Trading.git
cd Vibe-Trading
python -m venv .venv
# Activate
source .venv/bin/activate # Linux / macOS
# .venv\Scripts\Activate.ps1 # Windows PowerShell
pip install -e .
cp agent/.env.example agent/.env # Edit — set your LLM provider API key
vibe-trading # Launch interactive TUI
<details> <summary><b>Start web UI (optional)</b></summary>
# Terminal 1: API server
vibe-trading serve --port 8899
# Terminal 2: Frontend dev server
cd frontend && npm install && npm run dev
Open http://localhost:5899. The frontend proxies API calls to localhost:8899.
Production mode (single server):
cd frontend && npm run build && cd ..
vibe-trading serve --port 8899 # FastAPI serves dist/ as static files
[!NOTE]
vibe-trading servebinds0.0.0.0and is loopback-only by default: opening the UI on the same machine (http://localhost:8899) works with zero config. If you browse from another machine, a VM host, or a phone on your LAN, sensitive endpoints return403and the chat shows "Remote API access requires an API key" — set a strongAPI_AUTH_KEYinagent/.env, restart, and enter the same key once in Settings. (Docker Desktop's host gateway: setVIBE_TRADING_TRUST_DOCKER_LOOPBACK=1with the default127.0.0.1port bind.)
</details>
Path C: MCP plugin
See MCP Plugin section below.
Path D: ClawHub (one command)
npx clawhub@latest install vibe-trading --force
The skill + MCP config is downloaded into your agent's skills directory. See ClawHub install for details.
---
🧠 Environment Variables
Copy agent/.env.example to agent/.env and uncomment the provider block you want. Each provider needs 3-4 variables:
| Variable | Required | Description |
|---|---|---|
LANGCHAIN_PROVIDER | Yes | Provider name (openrouter, deepseek, groq, ollama, etc.) |
<PROVIDER>_API_KEY | Yes* | API key (OPENROUTER_API_KEY, DEEPSEEK_API_KEY, etc.) |
<PROVIDER>_BASE_URL | Yes | API endpoint URL |
LANGCHAIN_MODEL_NAME | Yes | Model name (e.g. deepseek-v4-pro) |
TUSHARE_TOKEN | No | Tushare Pro token for A-share data (falls back to AKShare) |
TIMEOUT_SECONDS | No | LLM call timeout, default 120s |
API_AUTH_KEY | Recommended for network deployments | Bearer token required when the API is reachable from non-local clients |
VIBE_TRADING_ENABLE_SHELL_TOOLS | No | Explicit opt-in for shell-capable tools in remote API/MCP-SSE style deployments |
VIBE_TRADING_ALLOWED_FILE_ROOTS | No | Extra comma-separated roots for document and broker-journal imports |
VIBE_TRADING_ALLOWED_RUN_ROOTS | No | Extra comma-separated roots for generated-code run directories |
CONTENT_FILTER_WARNING_THRESHOLD | No | Content-filter warning ratio threshold (default 0.05 = 5%). When the ratio of LLM responses blocked by content moderation exceeds this, the run card warns you to switch providers. |
<sub>* Ollama does not require an API key. OpenAI Codex uses ChatGPT OAuth and stores tokens via oauth-cli-kit, not in agent/.env.</sub>
Free data (no key needed): A-shares via AKShare, HK/US equities via yfinance, crypto via OKX, 100+ crypto exchanges via CCXT. The system automatically selects the best available source for each market.
🎯 Recommended Models
Vibe-Trading is a tool-heavy agent — skills, backtests, memory, and swarms all flow through tool calls. Model choice directly decides whether the agent uses its tools or fabricates answers from training data.
| Tier | Examples | When to use |
|---|---|---|
| Best | anthropic/claude-opus-4.7, anthropic/claude-sonnet-4.6, openai/gpt-5.5-pro, google/gemini-3.5-flash | Complex swarms (3+ agents), long research sessions, paper-grade analysis |
| Sweet spot (default) | deepseek-v4-pro, deepseek/deepseek-v4-pro, x-ai/grok-4.20, z-ai/glm-5.1, moonshotai/kimi-k2.6, qwen/qwen3-max-thinking | Daily driver — reliable tool-calling at ~1/10 the cost |
| Avoid for agent use | *-nano, *-flash-lite, *-coder-next, small / distilled variants | Tool-calling is unreliable — the agent will appear to "answer from memory" instead of loading skills or running backtests |
The default agent/.env.example ships with DeepSeek official API + deepseek-v4-pro; OpenRouter users can use deepseek/deepseek-v4-pro.
---
🖥 CLI Reference
The interactive TUI (vibe-trading) now uses a terminal-native transcript: a startup banner, prompt rule, previous-turn recap, live activity rail, Markdown/table rendering, and run timing all stay in the CLI. Non-interactive invocations such as vibe-trading run, pipes, and --json remain script-friendly.
vibe-trading # interactive TUI
vibe-trading run -p "..." # single run
vibe-trading serve # API server
vibe-trading alpha list # browse 461 pre-built alphas; show / bench / compare / export-manifest sub-commands available
vibe-trading channels status --local # inspect IM channel config and install hints
vibe-trading provider doctor # print redacted provider/proxy/package diagnostics
<details> <summary><b>Slash commands inside TUI</b></summary>
| Command | Description |
|---|---|
/help | Show all commands |
/skills | List all 87 finance skills |
/swarm | List 30 swarm team presets |
/swarm run <preset> [vars_json] | Run a swarm team with live streaming |
/swarm list | Swarm run history |
/swarm show <run_id> | Swarm run details |
/swarm cancel <run_id> | Cancel a running swarm |
/list | Recent runs |
/show <run_id> | Run details + metrics |
/code <run_id> | Generated strategy code |
/pine <run_id> | Export indicators (TradingView + TDX + MT5) |
/trace <run_id> | Full execution replay |
/continue <run_id> <prompt> | Continue a run with new instructions |
/sessions | List chat sessions |
/settings | Show runtime config |
/clear | Clear screen |
/quit | Exit |
</details>
<details> <summary><b>Single run & flags</b></summary>
vibe-trading run -p "Backtest BTC-USDT MACD strategy, last 30 days"
vibe-trading run -p "Analyze AAPL momentum" --json
vibe-trading run -f strategy.txt
echo "Backtest 000001.SZ RSI" | vibe-trading run
vibe-trading -p "your prompt"
vibe-trading --skills
vibe-trading --swarm-presets
vibe-trading --swarm-run investment_committee '{"topic":"BTC outlook"}'
vibe-trading --list
vibe-trading --show <run_id>
vibe-trading --code <run_id>
vibe-trading --pine <run_id> # Export indicators (TradingView + TDX + MT5)
vibe-trading --trace <run_id>
vibe-trading --continue <run_id> "refine the strategy"
vibe-trading --upload report.pdf
vibe-trading alpha list --zoo gtja191 --limit 10
vibe-trading alpha show gtja191_171
vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025 --top 20
</details>
<details> <summary><b>IM channels</b></summary>
IM channel adapters connect outside chat apps to the same session runtime used by the Web UI and CLI. Configure enabled adapters under channels in ~/.vibe-trading/agent.json; SDK-backed adapters are optional extras, and missing SDKs report recovery hints instead of crashing the runtime.
For long-running channel tasks, tune the central assistant-reply wait budget with replyTimeoutS (seconds, default 600):
{
"channels": {
"replyTimeoutS": 1800,
"feishu": {
"enabled": true
}
}
}
This controls how long the shared channel runtime waits for the agent session to produce an assistant message; adapter HTTP/socket timeouts remain adapter-specific.
vibe-trading channels status --local # inspect config and missing SDK hints without API
vibe-trading channels status # query the running API runtime
vibe-trading channels start # start enabled adapters through the API
vibe-trading channels stop # stop enabled adapters through the API
vibe-trading channels login weixin # run an adapter login hook when needed
vibe-trading channels pairing --channel telegram list
The built-in adapters cover websocket, telegram, slack, discord, matrix, whatsapp, signal, qq, napcat, weixin, wecom, feishu, dingtalk, msteams, email, and mochat. Use narrow extras such as pip install "vibe-trading-ai[telegram]", or install the full channel set with pip install "vibe-trading-ai[channels]".
In-chat slash commands (channel-agnostic, work in all 16 adapters):
| Command | Description |
|---|---|
/new | Reset the current session — the next message starts a fresh conversation |
/reset | Alias for /new |
/newsession | Alias for /new |
/pairing list | Show pending sender-pairing requests |
Commands are case-insensitive and must be sent as the entire message (e.g. hello /new is treated as a regular message, not a reset).
</details>
---
💡 Examples
Strategy & Backtesting
# Moving average crossover on US equities
vibe-trading run -p "Backtest a 20/50-day moving average crossover on AAPL for the past year, show Sharpe ratio and max drawdown"
# RSI mean-reversion on crypto
vibe-trading run -p "Test RSI(14) mean-reversion on BTC-USDT: buy below 30, sell above 70, last 6 months"
# Multi-factor strategy on A-shares
vibe-trading run -p "Backtest a momentum + value + quality multi-factor strategy on CSI 300 constituents over 2 years"
# After backtesting, export to TradingView / TDX / MetaTrader 5
vibe-trading --pine <run_id>
Bench a pre-built alpha zoo (one line):
vibe-trading alpha bench --zoo gtja191 --universe csi300 --period 2018-2025 --top 20
Browse the catalogue and inspect a single alpha:
vibe-trading alpha list --zoo gtja191 --theme reversal --limit 10
vibe-trading alpha show gtja191_171
Compose a multi-factor signal from the zoo (Python):
from src.skills.multi_factor.zoo_signal_engine import ZooSignalEngine
engine = ZooSignalEngine.from_zoo(["gtja191_171", "gtja191_111", "gtja191_163"])
panel = ... # your wide OHLCV panel
signal = engine.compute_signal(panel)
Market Research
# Equity deep-dive
vibe-trading run -p "Research NVDA: earnings trend, analyst consensus, option flow, and key risks for next quarter"
# Macro analysis
vibe-trading run -p "Analyze the current Fed rate path, USD strength, and impact on EM equities and gold"
# Crypto on-chain
vibe-trading run -p "Deep dive BTC on-chain: whale flows, exchange balances, miner activity, and funding rates"
Swarm Workflows
# Bull/bear debate on a stock
vibe-trading --swarm-run investment_committee '{"topic": "Is TSLA a buy at current levels?"}'
# Quant strategy from screening to backtest
vibe-trading --swarm-run quant_strategy_desk '{"universe": "S&P 500", "horizon": "3 months"}'
# Crypto desk: funding + liquidation + flow → risk manager
vibe-trading --swarm-run crypto_trading_desk '{"asset": "ETH-USDT", "timeframe": "1w"}'
# Global macro portfolio allocation
vibe-trading --swarm-run macro_rates_fx_desk '{"focus": "Fed pivot impact on EM bonds"}'
Cross-Session Memory
# Save your preferences once
vibe-trading run -p "Remember: I prefer RSI-based strategies, max 10% drawdown, hold period 5–20 days"
# The agent recalls them in future sessions automatically
vibe-trading run -p "Build a crypto strategy that fits my risk profile"
Upload & Analyze Documents
# Analyze a broker export or earnings report
vibe-trading --upload trades_export.csv
vibe-trading run -p "Profile my trading behavior and identify any biases"
vibe-trading --upload NVDA_Q1_earnings.pdf
vibe-trading run -p "Summarize the key risks and beats/misses from this earnings report"
---
🌐 API Server
vibe-trading serve --port 8899
| Method | Endpoint | Description |
|---|---|---|
GET | /runs | List runs |
GET | /runs/{run_id} | Run details |
GET | /runs/{run_id}/pine | Multi-platform indicator export |
POST | /sessions | Create session |
POST | /sessions/{id}/messages | Send message |
GET | /sessions/{id}/events | SSE event stream |
POST | /upload | Upload PDF/file |
GET | /swarm/presets | List swarm presets |
POST | /swarm/runs | Start swarm run |
GET | /swarm/runs/{id}/events | Swarm SSE stream |
GET | /alpha/list | List alphas (filter by zoo/theme/universe) |
GET | /alpha/{alpha_id} | Alpha metadata + source code |
POST | /alpha/bench | Start a bench job (returns job_id) |
GET | /alpha/bench/{job_id}/stream | SSE progress stream |
GET | /settings/llm | Read Web UI LLM settings |
PUT | /settings/llm | Update local LLM settings |
GET | /settings/data-sources | Read local data source settings |
PUT | /settings/data-sources | Update local data source settings |
GET | /channels/status | Read IM channel runtime and adapter status |
POST | /channels/start | Start configured IM channel adapters |
POST | /channels/stop | Stop configured IM channel adapters |
POST | /channels/pairing/command | Run a sender-pairing command against the shared store |
POST | /scheduled-runs | Create a scheduled research job (interval-ms or cron) |
GET | /scheduled-runs | List scheduled jobs |
DELETE | /scheduled-runs/{job_id} | Cancel a scheduled job |
Interactive docs: http://localhost:8899/docs
Security defaults
For localhost development, vibe-trading serve keeps the browser workflow simple. For any non-local client, sensitive API endpoints require API_AUTH_KEY; use Authorization: Bearer <key> for JSON/upload requests. Browser EventSource streams are handled by the Web UI after you enter the same key once in Settings.
Shell-capable tools are available to local CLI and trusted localhost workflows, but are not exposed to remote API sessions unless you explicitly set VIBE_TRADING_ENABLE_SHELL_TOOLS=1. Document and journal readers are limited to upload/import roots by default; place files under agent/uploads, agent/runs, ./uploads, ./data, ~/.vibe-trading/uploads, or ~/.vibe-trading/imports, or add a dedicated directory through VIBE_TRADING_ALLOWED_FILE_ROOTS.
Generated backtest code runs as a local Python subprocess and can make network requests through the configured market-data loaders. Its environment is intentionally narrow: the runner keeps OS/Python basics, proxy/certificate settings, VIBE_TRADING_ALLOWED_RUN_ROOTS, and read-only market-data keys such as TUSHARE_TOKEN, FMP_API_KEY, FRED_API_KEY, and VIBE_TRADING_IWENCAI_KEY. It does not pass LLM provider keys, API auth tokens, shell-tool switches, broker trading secrets, or live/advisory toggles to generated strategy code by default.
Web UI Settings
The Web UI Settings page lets local users update the LLM provider/model, base URL, generation parameters, reasoning effort, and optional market data credentials such as the Tushare token. Settings are persisted to agent/.env; provider defaults are loaded from agent/src/providers/llm_providers.json.
Settings reads are side-effect free: GET /settings/llm and GET /settings/data-sources never create agent/.env, and they only return project-relative paths. Settings reads and writes can expose credential state or update credentials/runtime environment, so they require API_AUTH_KEY when configured. If API_AUTH_KEY is unset for dev mode, settings access is accepted only from loopback clients.
The same Settings page includes an IM Channels panel for local operators. It polls /channels/status, shows configured/enabled/available/loaded/running states, surfaces adapter recovery hints, and can start or stop the configured channel runtime without going back to the terminal.
Scheduled research
Run a research prompt or backtest on a repeating schedule. The background executor is off by default — start the server with VIBE_TRADING_ENABLE_SCHEDULER=1 to enable it:
VIBE_TRADING_ENABLE_SCHEDULER=1 vibe-trading serve --port 8899
Then create jobs over REST. schedule is either a bare integer (interval in milliseconds) or a 5-field cron expression (min hour dom mon dow):
# every 6 hours (cron)
curl -X POST http://localhost:8899/scheduled-runs \
-H "Content-Type: application/json" \
-d '{"prompt":"Scan CSI300 for momentum breakouts and backtest the top 5","schedule":"0 */6 * * *"}'
# list / cancel
curl http://localhost:8899/scheduled-runs
curl -X DELETE http://localhost:8899/scheduled-runs/<job_id>
Each fire runs the prompt through a fresh agent session (optional backtest parameters go in config), and jobs persist under ~/.vibe-trading/ so they survive restarts. Without the flag, the /scheduled-runs endpoints still record jobs but nothing fires. Add -H "Authorization: Bearer <key>" to each call when API_AUTH_KEY is set.
---
🔌 MCP Plugin
Vibe-Trading exposes 54 MCP tools for any MCP-compatible client. Runs as a stdio subprocess — no server setup needed. Core research tools work with zero API keys for HK/US/crypto; trading connector tools use the selected connector profile, and run_swarm needs an LLM key.
<details> <summary><b>Claude Desktop</b></summary>
Add to claude_desktop_config.json:
{
"mcpServers": {
"vibe-trading": {
"command": "vibe-trading-mcp"
}
}
}
</details>
<details> <summary><b>OpenClaw</b></summary>
Add to ~/.openclaw/config.yaml:
skills:
- name: vibe-trading
command: vibe-trading-mcp
For a first research-only smoke test, confirm tool discovery and run a market data or backtest request before selecting a trading connector profile. Core research tools can run without broker credentials; connector-backed trading_* tools should be used only after you intentionally select and check a connector profile. run_swarm requires an LLM key.
</details>
<details> <summary><b>Cursor / Windsurf / other MCP clients</b></summary>
vibe-trading-mcp # stdio (default)
vibe-trading-mcp --transport http # Streamable HTTP (current MCP spec default) at http://127.0.0.1:8900/mcp
vibe-trading-mcp --transport sse # legacy SSE (deprecated) for older clients
For HTTP clients (QwenPaw, and any client that negotiates by POSTing an InitializeRequest), use --transport http and point the client at the single /mcp endpoint — e.g. http://127.0.0.1:8900/mcp. Do not point an HTTP client at /sse; that path belongs to the deprecated two-endpoint SSE transport and will return 405 Method Not Allowed on POST. Override the bind address with --host / --port.
</details>
MCP tools exposed (54): list_skills, load_skill, start_research_goal, get_research_goal, add_goal_evidence, update_research_goal_status, backtest, factor_analysis, analyze_options, pattern_recognition, read_url, read_document, web_search, write_file, read_file, trading_connections, trading_select_connection, trading_check, trading_account, trading_positions, trading_orders, trading_quote, trading_history, list_swarm_presets, run_swarm, get_market_data, get_fund_flow, get_dragon_tiger, get_northbound_flow, get_margin_trading, get_block_trades, get_shareholder_count, get_lockup_expiry, get_sector_info, get_research_reports, get_stock_news, get_sec_filings, get_financial_statements, get_options_chain, get_stock_profile, screen_market, search_symbol, get_macro_series, iwencai_search, get_swarm_status, get_run_result, list_runs, reap_stale_runs, retry_run, analyze_trade_journal, extract_shadow_strategy, run_shadow_backtest, render_shadow_report, scan_shadow_signals.
SWARM external MCP tools
run_swarm workers can call operator-approved tools from external MCP servers. Configure the server-side allowlist in VIBE_TRADING_SWARM_AGENT_CONFIG, ~/.vibe-trading/swarm-agent.json, or the fallback ~/.vibe-trading/agent.json; then list remote tools in a swarm preset using the local MCP wrapper name, such as mcp_internal_kb_search. Caller-provided variables stay template data only and cannot inject MCP URLs, commands, environment variables, or allowlist overrides.
<details> <summary><b>Install from ClawHub (one command)</b></summary>
npx clawhub@latest install vibe-trading --force
--forceis required because the skill references external APIs, which triggers VirusTotal's automated scan. The code is fully open-source and safe to inspect.
This downloads the skill + MCP config into your agent's skills directory. No cloning needed.
Browse on ClawHub: clawhub.ai/skills/vibe-trading
</details>
<details> <summary><b>OpenSpace — self-evolving skills</b></summary>
All 87 finance skills are published on open-space.cloud and evolve autonomously through OpenSpace's self-evolution engine.
To use with OpenSpace, add both MCP servers to your agent config:
{
"mcpServers": {
"openspace": {
"command": "openspace-mcp",
"toolTimeout": 600,
"env": {
"OPENSPACE_HOST_SKILL_DIRS": "/path/to/vibe-trading/agent/src/skills",
"OPENSPACE_WORKSPACE": "/path/to/OpenSpace"
}
},
"vibe-trading": {
"command": "vibe-trading-mcp"
}
}
}
OpenSpace will auto-discover all 87 skills, enabling auto-fix, auto-improve, and community sharing. Search for Vibe-Trading skills via search_skills("finance backtest") in any OpenSpace-connected agent.
</details>
---
🔌 Loading Tools from External MCP Servers (MCP Client Mode)
This is the opposite direction from the MCP Plugin above. The MCP Plugin lets other agents call Vibe-Trading tools. This section lets the built-in Vibe-Trading agent call tools from your external MCP servers.
Quick start
Create ~/.vibe-trading/agent.json:
{
"mcpServers": {
"my-server": {
"command": "uvx",
"args": ["my-mcp-server"]
}
}
}
Run any CLI command — tools from ordinary external servers are automatically injected into the agent's registry after local tools:
vibe-trading run "use my-server to do X"
Official IBKR MCP read-only probe
Vibe-Trading can connect directly to Interactive Brokers' official remote MCP endpoint in read-only mode. Add this to ~/.vibe-trading/agent.json:
{
"mcpServers": {
"ibkr": {
"type": "streamableHttp",
"url": "https://api.ibkr.com/v1/api/mcp",
"auth": {
"type": "oauth",
"scopes": ["mcp.read"],
"clientName": "Vibe-Trading",
"cacheDir": "~/.vibe-trading/live/ibkr/oauth"
},
"enabledTools": ["*"]
}
}
}
Then start the browser OAuth flow:
vibe-trading connector authorize ibkr-live-official-mcp-readonly
The wildcard is accepted only for IBKR's mcp.read probe. Authorizing this profile confirms access to IBKR's official read scope; generic trading_account and trading_positions calls stay disabled until IBKR publishes stable read tool names that Vibe-Trading can map safely. A config that adds mcp.write must pin an explicit tool allowlist and still passes through the live order guard.
If IBKR issues a pre-registered OAuth client, add clientId and clientSecret inside auth.
Trading connectors: fastest path
For users who cannot wait for IBKR OAuth client approval, connect to a local TWS or IB Gateway session. Credentials stay inside IBKR's desktop app; Vibe- Trading only connects to 127.0.0.1 and exposes it as a connector profile.
Install the optional SDK:
pip install "vibe-trading-ai[ibkr]"
Open TWS paper trading or IB Gateway paper, enable API socket clients, then run:
vibe-trading connector list
vibe-trading connector use ibkr-paper-local
vibe-trading connector configure ibkr-paper-local --yes
vibe-trading connector check
vibe-trading connector account
vibe-trading connector positions
vibe-trading connector orders
vibe-trading connector quote AAPL
vibe-trading connector history AAPL --duration "30 D" --bar-size "1 day"
Default local ports:
| App | Paper | Live read-only |
|---|---|---|
| TWS | 7497 | 7496 |
| IB Gateway | 4002 | 4001 |
The agent exposes connector-scoped tools named trading_connections, trading_select_connection, trading_check, trading_account, trading_positions, trading_orders, trading_quote, and trading_history. Live-broker raw MCP tools are not registered directly as mcp_<broker>_*. No IBKR order-placement tool is registered.
🔐 TAP Mode — full credential isolation & human-approved writes
Opt-in, off by default. If the TAP_* variables below are unset, the connector behaves exactly as before (direct broker SDK) — nothing changes.
TAP (Tool Authorization Protocol) is a credential proxy: the agent never holds the raw broker API secret, and consequential writes are gated on human approval. With TAP mode on, every Alpaca call — order placement, cancel, and the reads (account/positions/orders/quote/bars) — is sent to the TAP proxy's /forward endpoint instead of the broker SDK; TAP injects the real key server-side, then forwards upstream.
- The agent process holds no Alpaca key at all — and doesn't even need
alpaca-py — because the whole egress goes through TAP. The secret is referenced by name (<CREDENTIAL:alpaca.key_id>) and TAP substitutes it.
- Writes block on human approval. An order or cancel cannot reach the broker
without a human approving it; even a prompt-injected "buy now" is held, and denying it means it never reaches Alpaca. Orders carry a deterministic client_order_id, so an approval-race retry is deduplicated rather than double-placed.
- Reads auto-approve. Account/positions/orders/quote/bars are GETs that TAP
forwards without a human step — this is credential isolation (no key in the process), not a gate, so there's ~zero added friction.
allowed_hostson the TAP credential pins where the key may be sent, so a
tampered target is rejected (403) before injection.
Enable it:
- In the TAP dashboard, create a multi-secret credential named
alpaca
holding your Alpaca key pair as fields key_id and secret_key, assigned to your agent, with allowed hosts paper-api.alpaca.markets (or the live host api.alpaca.markets) and data.alpaca.markets (the market-data host used by quote/bars). Use separate TAP credentials for paper and live (e.g. alpaca-paper / alpaca-live, selected via TAP_ALPACA_CREDENTIAL), each with allowed_hosts pinned to its own API host — TAP then structurally refuses to send the paper key to the live host and vice versa, keeping the paper/live separation crisp end to end.
- Add to
agent/.env:
| Variable | Required | Description |
|---|---|---|
TAP_PROXY_URL | Yes | TAP proxy base URL (e.g. https://proxy.tap.human.tech) |
TAP_AGENT_KEY | Yes | Your TAP agent API key (secret) |
TAP_ALPACA_CREDENTIAL | No | TAP credential name for Alpaca (default alpaca) |
TAP_APPROVAL_TIMEOUT | No | Seconds to wait for a human decision (default 300) |
When a write is placed, approve or deny it in your TAP channel (Telegram / dashboard). An approved order/cancel is forwarded to Alpaca; a denied or timed-out one returns an error and is never sent.
Known limitation — approval race. If the human approves right at the
TAP_APPROVAL_TIMEOUTboundary, TAP may forward the order while the poll has already given up: the gate then reports an error even though the order reached the broker, and themax_trades_per_daycounter under-counts by one. The deterministicclient_order_idkeeps a retry from double-placing that order; if you rely on a tight trades-per-day cap, check open orders after a TAP timeout error before retrying.
Scope: covers Alpaca order placement, cancel, and all five reads — the full connector egress, so the process holds no key on any path. HMAC-signed brokers (Binance/OKX) are follow-ups (client-side signing doesn't fit pure egress injection). The hooks are additive — they live inside the Alpaca connector and leave the live mandate gate unchanged.
Config reference
| Field | Type | Default | Description |
|---|---|---|---|
type | string | inferred for stdio; required for HTTP | Omit for stdio, or set to sse / streamableHttp for URL-based servers. |
command | string | required for stdio | Executable to spawn for stdio servers. Invalid for sse / streamableHttp servers. |
args | array | [] | Command-line arguments for stdio servers only. |
env | object | {} | Extra environment variables merged into the subprocess env for stdio servers only. |
url | string | required for sse / streamableHttp | Remote SSE / streamable HTTP endpoint URL. Not used for stdio servers. |
headers | object | {} | Extra HTTP headers for sse / streamableHttp servers only. |
toolTimeout | number | 30 | Per-tool call timeout in seconds |
initTimeout | number | unset (max(toolTimeout, 30)) | MCP initialize / OAuth authorization timeout in seconds. Use this for slow browser authorization without widening ordinary tool calls. |
enabledTools | array | ["*"] | Tool allowlist. Use ["*"] to expose all tools from the server |
Config file location: ~/.vibe-trading/agent.json (JSON or YAML).
For URL-based transports, type is required. The agent no longer guesses between SSE and streamable HTTP from the URL suffix.
Per-session overrides (API)
When creating a session via the API you can pass mcpServers inside session.config to extend or override the global config for that session only:
{
"config": {
"mcpServers": {
"research-server": {
"command": "uvx",
"args": ["research-mcp"],
"enabledTools": ["search", "fetch"]
}
}
}
}
Tool naming
Ordinary remote tools are exposed with stable names: mcp_<server>_<tool>. Live-broker MCP servers stay behind the trading_* connector surface.
If two server names produce the same ASCII-safe local prefix (e.g. foo-bar and foo_bar both become foo_bar), a deterministic hash suffix is appended at the server-segment level so names remain unique. The operator receives a warning:
WARNING: Configured MCP server 'foo-bar' collides with another server after local name
normalization. Using local tool prefix 'mcp_foo_bar_<hash>_<tool>' to keep generated
tool names unique. Rename the server in agent config if you want a different prefix.
v1 limits
| Limit | Detail |
|---|---|
| Transport | stdio, SSE, and streamable HTTP |
| Execution | serial only — MCP tools never enter the parallel readonly path |
| Surfaces | tools only (resources and prompts excluded in v1) |
| Hot reload | not supported — restart the process to pick up config changes |
| Swarm path | MCP tools are not available inside Swarm worker registries in v1 |
---
📁 Project Structure
<details> <summary><b>Click to expand</b></summary>
Vibe-Trading/
├── agent/ # Backend (Python)
│ ├── cli/ # CLI package — interactive TUI + subcommands
│ ├── api_server.py # FastAPI server — runs, sessions, upload, swarm, SSE
│ ├── mcp_server.py # MCP server — 54 tools for OpenClaw / Claude Desktop
│ │
│ ├── src/
│ │ ├── agent/ # ReAct agent core
│ │ │ ├── loop.py # 5-layer compression + read/write tool batching
│ │ │ ├── context.py # system prompt + auto-recall from persistent memory
│ │ │ ├── skills.py # skill loader (87 bundled + user-created via CRUD)
│ │ │ ├── tools.py # tool base class + registry
│ │ │ ├── memory.py # lightweight workspace state per run
│ │ │ ├── frontmatter.py # shared YAML frontmatter parser
│ │ │ └── trace.py # execution trace writer
│ │ │
│ │ ├── memory/ # Cross-session persistent memory
│ │ │ └── persistent.py # file-based memory (~/.vibe-trading/memory/)
│ │ │
│ │ ├── tools/ # 68 auto-discovered agent tools
│ │ │ ├── backtest_tool.py # run backtests
│ │ │ ├── remember_tool.py # cross-session memory (save/recall/forget)
│ │ │ ├── skill_writer_tool.py # skill CRUD (save/patch/delete/file)
│ │ │ ├── session_search_tool.py # FTS5 cross-session search
│ │ │ ├── swarm_tool.py # launch swarm teams
│ │ │ ├── web_search_tool.py # DuckDuckGo web search
│ │ │ └── ... # bash, file I/O, factor analysis, options, alpha browser + bench, etc.
│ │ │
│ │ ├── factors/ # Alpha Zoo — 461 alphas across 5 families
│ │ │ ├── base.py # 19 operators (rank/scale/ts_*/delta/decay_linear/safe_div/vwap)
│ │ │ ├── registry.py # AST-only metadata load + lazy compute + sanity gates
│ │ │ ├── bench_runner.py # IC + alive/reversed/dead categorisation
│ │ │ └── zoo/ # qlib158 (154) + alpha101 (101) + gtja191 (191) + academic (10) + fundamental (4)
│ │ │
│ │ ├── api/ # FastAPI route modules
│ │ │ └── alpha_routes.py # /alpha/list, /alpha/{id}, /alpha/bench, SSE stream
│ │ │
│ │ ├── skills/ # 87 finance skills in 9 categories (SKILL.md each)
│ │ ├── swarm/ # Swarm DAG execution engine
│ │ │ └── presets/ # 30 swarm preset YAML definitions
│ │ ├── session/ # Multi-turn chat + FTS5 session search
│ │ └── providers/ # LLM provider abstraction
│ │
│ └── backtest/ # Backtest engines
│ ├── engines/ # 7 engines + composite cross-market engine + options_portfolio
│ ├── loaders/ # 20 sources: tushare, okx, yfinance, akshare, baostock, tencent, mootdx, ccxt, futu, local, eastmoney, sina, stooq, yahoo, finnhub, alphavantage, tiingo, fmp, qveris, india_broker
│ │ ├── base.py # DataLoader Protocol
│ │ └── registry.py # Registry + auto-fallback chains
│ └── optimizers/ # MVO, equal vol, max div, risk parity
│
├── frontend/ # Web UI (React 19 + Vite + TypeScript)
│ └── src/
│ ├── pages/ # Home, Agent, AlphaZoo, RunDetail, Compare, Correlation, Settings
│ ├── components/ # chat, charts, layout
│ └── stores/ # Zustand state management
│
├── Dockerfile # Multi-stage build
├── docker-compose.yml # One-command deploy
├── pyproject.toml # Package config + CLI entrypoint
├── tools/ # Repo-level CI helpers
│ └── ci_grep_gates.sh # rejects yaml.load / trademark / per-stock-data leaks
└── LICENSE # MIT
</details>
---
🏛 Ecosystem
Vibe-Trading is part of the HKUDS agent ecosystem:
<table> <tr> <td align="center" width="20%"> <a href="https://github.com/HKUDS/nanobot"><b>NanoBot</b></a><br> <sub>Ultra-Lightweight Personal AI Assistant</sub> </td> <td align="center" width="20%"> <a href="https://github.com/HKUDS/AI-Trader"><b>AI-Trader</b></a><br> <sub>Agent-Native Signal & Copy Trading Platform</sub> </td> <td align="center" width="20%"> <a href="https://github.com/HKUDS/CLI-Anything"><b>CLI-Anything</b></a><br> <sub>Making All Software Agent-Native</sub> </td> <td align="center" width="20%"> <a href="https://github.com/HKUDS/OpenSpace"><b>OpenSpace</b></a><br> <sub>Self-Evolving AI Agent Skills</sub> </td> <td align="center" width="20%"> <a href="https://github.com/HKUDS/ClawTeam"><b>ClawTeam</b></a><br> <sub>Agent Swarm Intelligence</sub> </td> </tr> </table>
---
🗺 Roadmap
We ship in phases. Items move to Issues when work begins.
| Phase | Feature | Status |
|---|---|---|
| Trust Layer | Reproducible run cards are emitted and shown in Run Detail; v1 adds tool traces and citations | v0 Shipped |
| Hypothesis Registry | Durable research hypotheses with lifecycle status, data sources, skills, run-card links, and invalidation notes | Backend MVP Shipped |
| Research Autopilot | Manual-first research loop: hypothesis → deterministic backtest → evidence report | Phase 1–3 Shipped |
| Data Bridge | Bring-your-own data: local CSV/Parquet/SQL connectors with schema mapping | Local loader Shipped |
| Options Lab | Vol surface, Greeks dashboard, payoff/scenario explorer | Planned |
| Portfolio Studio | Risk x-ray, constraints, turnover-aware optimizer, rebalance notes | Turnover-aware optimizer Shipped 0.1.11; rest Planned |
| Alpha Zoo | 461 pre-built alphas (Qlib 158 + Kakushadze 101 + GTJA 191 + academic + fundamental) with one-line bench, agent integration, and Web UI | Shipped 0.1.8, extended through 0.1.11 |
| Research Delivery | Scheduled briefs and live research sessions through Slack / Telegram / email-style IM channels | Scheduler + IM Runtime Shipped |
| Community | Shareable skills, presets, and strategy cards | Exploring |
---
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Good first issues are tagged with good first issue — pick one and get started.
Want to contribute something bigger? Check the Roadmap above and open an issue to discuss before starting.
---
Contributors
Thanks to everyone who has contributed to Vibe-Trading!
Recent v0.1.11 cycle contributors and credits:
- @shadowinlife — the
api_servermodularization capstone (1,103 → 371 lines, #424 closing #331), centralized env config with the AST CI gate (#440), loaderfetch()protocol conformance (#437), and the Strategy Development Manager RFC in review (#455/#457) — 12 merged PRs this cycle - @Robin1987China — Research Autopilot Phase 3 loop closure (#267), 4 canonical academic alphas (#277), Shadow Account PIT-safe entry conditions (#302/#314/#316), the turnover-aware portfolio optimizer (#466), scheduled-research route tests (#452), and test-coverage batches for trade-journal / pattern / loader layers (#268/#269/#276)
- @muku314115 — first-class Indian equity (NSE/BSE) support: the
IndiaEquityEngine, cost stack,.NS/.BOrouting, and theindia_brokerbridge (#305) - @mvanhorn — the end-to-end scheduled-research executor (#278), the Trading 212 read-only connector (#321), OpenAI default-model resolution (#319), and Robinhood config validation (#320)
- @fei-moss — the
analyze_imagevision tool (#464), NapCat DM pairing (#463), and the IM-media allowed-roots report (#465) - @sambazhu — the value-investing toolkit: financial-rigor + report-audit tools, 4 skills, and the
value_investing_committeepreset (#407/#408) - @Elfsa-Miranda — the evidence-bound alpha research pipeline exploration (#405/#416, since re-scoped into #442)
- @Hinotoi-agent — loopback CSRF rejection (#293) and authenticated remote same-origin UI requests (#304)
- @dpersek — configurable IM reply timeout (#413) and the provider-preflight redirect fix (#404)
- @digger-yu — cross-platform
setup/devcommands (#292) and dev-dependency pre-checks (#349) - @skloxo — tilde expansion + file-roots safety fallback (#299) and reactive zh-CN localization (#301)
- @kadaliao — the beginner tutorial (#393) and Alpha Library social cards (#396)
- @morluto — CLI resume first-message preservation (#448) and the Codex OAuth default model (#446)
- @yxhuang — the Kimi for Coding provider (#435) and the precise #433 diagnosis behind the governance-stack revert
- @isaveall — the
validation.jsonartifacts-dir fix (#429) and clearer--swarm-runerrors (#428) - @mustafakamal88 — timezone-aware UTC timestamps (#397)
- @irfanallana-oss — the zero-size order guard in
trading_place_order(#417) - @Shizoqua — the central OHLC-invariant loader guard (#274)
- @hobostay — SSRF-guard hardening for CGNAT/mesh ranges + the QQ media redirect fix (#389)
- @aeonframework — Pillow / langchain CVE floor bumps (#390)
- @hannibal-lee — the pandas version-constraint fix (#329)
- @MarkfuGod — dynamic data-source counts + token-gated microcompaction (#296)
- @gyx09212214-prog — strict JSON validation outputs (#306)
- @LemonCANDY42 — the backtest report library (#224)
- @fanfpy — Longbridge Decimal→float serialization (#459)
- @asahikiko — packaged SKILL.md capability-count sync + the manifest guard test (#461)
- @wison1717-maker — the mandate second-confirmation dialog + unified error toasts (#453)
- @imsankz — opencode provider mappings (#444)
- @flash1234pku — the tushare reference code-fence fix (#449)
- @Penn-Live — the Docker startup route-iteration crash report (#450)
- @warren618 / Haozhe Wu — the fundamental factor layer (PIT-safe SEC panels), the QVeris premium track, the IM channel runtime, India-equity integration review, CN search fallbacks, and release integration
<details> <summary>v0.1.10 cycle contributors</summary>
- @Hinotoi-agent — a security-hardening wave: local-shutdown auth (#241), loopback-host rebinding rejection (#242), agent shell-tool opt-in (#243), settings-write auth (#245), mandate proposal-id containment (#256), persistent-memory type validation (#257), and MCP swarm run-id containment (#258)
- @mvanhorn — the opt-in local data cache (#177), Gemini thoughtSignature round-trip over OpenAI-compat tool calls (#176), the custom data loader guide (#194), and the glm/zhipu provider alias + model-name inference (#247)
- @gyx09212214-prog — loader robustness for malformed crypto/RSSHub timeout env vars (#227, #240), requested yfinance end-date inclusion (#226), strict run-card JSON for non-finite metrics (#238), and ddgs retry-fallback coverage (#239)
- @BillDin — swarm agent status in the chat UI (#188), explicit preset-name handling (#189), the loader-backed market-data tool for swarm workers (#199), and preset-context continuations (#200)
- @Robin1987China — the Research Autopilot goal-hypothesis bridge (#260), the local CSV/Parquet/DuckDB data loader (#252), and an assistant-prefill fix + configurable Kimi User-Agent (#248)
- @LemonCANDY42 — the read-only runtime status dashboard (#210), persisted AgentLoop usage artifacts (#223), and opt-in Run Detail chart payloads (#225)
- @zwrong — the trace.jsonl overhaul with zero truncation + offload (#206) and session-id on exit +
resume <session-id>(#218) - @forge-builder — the AI contributor guide (#173) and the OpenClaw MCP research-only smoke-test docs (#165)
- @skloxo — Chinese (zh-CN) frontend localization (adopted from #217)
- @LeeCQiang — Chinese docstrings across all 452 Alpha Zoo factors (#180)
- @KaiLuettmann — GHCR pre-built image publishing on release (#187)
- @ngoanpv — Gemini thought_signature preservation through the AgentLoop dict path (#184)
- @ShahNewazKhan — Docker host-Ollama reachability via host.docker.internal (#196)
- @sambazhu — frontend sync of completed chat attempts (#236)
- @bhlt — baostock-native code format support (#230)
- @octo-patch — MiniMax M3 default model upgrade (#162)
- @warren618 / Haozhe Wu — the global data layer (8 sources + 18 read-only data tools), the 10 broker SDK connectors, the alpha-compare full stack, the provider-reliability overhaul, multi-engine web_search fallback, responsive Stop + SSE reconnect, and release integration
</details>
<a href="https://github.com/HKUDS/Vibe-Trading/graphs/contributors"> <img src="https://contrib.rocks/image?repo=HKUDS/Vibe-Trading" /> </a>
---
Disclaimer
Vibe-Trading is research and trading software. It is not investment advice, holds no funds, and runs no execution venue. Trading through a broker channel you explicitly authorize (e.g. Robinhood Agentic Trading) happens only within the limits you set and which you can halt at any time. This broker-trading capability is experimental and not verified by us against a real broker account — use it at your own risk. Past performance does not guarantee future results.
License
MIT License — see LICENSE
---
<p align="center"> ⭐ If <b>Vibe-Trading</b> helps your research, a star helps more people find it. </p>
---
<p align="center"> Thanks for visiting <b>Vibe-Trading</b> ✨ </p> <p align="center"> <img src="https://visitor-badge.laobi.icu/badge?page_id=HKUDS.Vibe-Trading&style=flat" alt="visitors"/> </p>