给你的 AI
装上 QMT 量化技能
Give your AI
quant skills for QMT
把量化策略开发的领域知识——研报解读、因子回测、信号生成——封装成标准技能。丢一句话给 AI 就能安装,Claude Code、Cursor、Codex 等 70+ AI 编程工具直接可用。 Quant strategy know-how — research-report parsing, factor backtesting, signal generation — packaged as standard skills. Install by sending your AI one sentence; works in Claude Code, Cursor, Codex and 70+ AI coding tools.
从研报到回测脚本,一个技能搞定 From research report to backtest script, one skill
技能列表由社区需求驱动、持续生长,全部按 Agent Skills 开放标准在 CI 中自动校验。 The skill list is community-driven and keeps growing — every skill is automatically validated in CI against the open Agent Skills standard.
QMT 内置因子回测QMT built-in factor backtest
qmt-inner-backtest
根据策略描述、研报 PDF 或截图解读因子逻辑,基于母版脚本生成 QMT 策略编辑器内置的日频截面因子回测策略。 Parses factor logic from strategy descriptions, research-report PDFs or screenshots, then generates a daily cross-sectional factor backtest for the QMT strategy editor from a battle-tested master template.
- 研报 PDF / 截图 / 文字都能解读成因子公式与组合规则Report PDFs, screenshots or plain text are parsed into factor formulas and portfolio rules
- 先输出策略规格表供你确认,缺省参数标注假设、不静默编造Outputs a strategy spec table for your confirmation first — missing parameters are flagged, never silently invented
- after_init 预计算信号 → handlebar 调仓执行,交易执行函数原样保留Signals precomputed in after_init, rebalancing executed in handlebar — trade-execution code stays untouched
- Barra 风格因子处理(MAD 去极值、市值/行业中性化),信号强制 shift(1) 防未来函数Barra-style factor pipeline (MAD winsorizing, cap/industry neutralization) with mandatory shift(1) to prevent look-ahead bias
实盘策略模板Live strategy template
qmt-live-strategy-template
想先用?来催更 →Want it sooner? Tell us →
信号生成 + 飞书推送Signals + Feishu push
qmt-live-signal-feishu
想先用?来催更 →Want it sooner? Tell us →
想要新技能?Want a new skill?
你在 QMT 量化中的重复劳动,都可能值得做成一个技能。一句话的想法也欢迎。Any repetitive QMT quant chore might deserve to become a skill. Even a one-sentence idea is welcome.
提交技能需求 →Submit a skill request →技能即文件,装进哪个 AI 都能用 Skills are just files — they work in any AI tool
每个技能是一个含 SKILL.md 与母版脚本的文件夹,遵循开放的 Agent Skills 标准。没有服务进程、没有额外依赖。 Each skill is a folder with a SKILL.md and master scripts, following the open Agent Skills standard. No server process, no extra dependencies.
丢给 AI 一句话,它自己装好 One sentence to your AI — it installs itself
npx skills
习惯命令行的话,一条命令交互式选择要安装到的工具,覆盖 70+ AI 编程工具。加 --skill 只装某个技能,加 -g 装到全局目录。Prefer the command line? One command interactively picks the target tool, covering 70+ AI coding tools. Add --skill for a single skill, -g for the global directory.
# 交互式选择要安装到的工具 npx skills add dfkai/xtquantai # 只装某个技能 npx skills add dfkai/xtquantai --skill qmt-inner-backtest # 装到全局目录(所有项目可用) npx skills add dfkai/xtquantai -g
Claude Code 原生插件Native Claude Code plugin
通过 Claude Code 的插件市场安装,两条斜杠命令完成。Install through Claude Code's plugin marketplace with two slash commands.
/plugin marketplace add dfkai/xtquantai /plugin install qmt-skills@xtquantai
Kimi Code CLI
Kimi Code 用户一条命令直接装。Kimi Code users install with a single command.
/plugins install https://github.com/dfkai/xtquantai
手动复制Manual copy
把 skills/ 下的技能文件夹整个复制到所用工具的技能目录(必须包含 SKILL.md 和 scripts/,目录名不变)。Copy the whole skill folder from skills/ into your tool's skills directory (keep SKILL.md, scripts/ and the folder name intact).
全部 12+ 工具的目录对照表见 GitHub README。The full directory table for 12+ tools is in the GitHub README.
git clone --depth 1 https://github.com/dfkai/xtquantai.git mkdir -p .claude/skills cp -r xtquantai/skills/qmt-inner-backtest .claude/skills/
装好之后,直接说人话 Once installed, just talk
这份研报(附 PDF / 截图)的上下影线因子,帮我生成一个中证1000、Top 10 持仓、5 日调仓的 QMT 回测脚本。 Take the shadow-line factor from this research report (PDF / screenshot attached) and generate a QMT backtest script: CSI 1000 universe, top-10 holdings, 5-day rebalance.
默认 T 日收盘算因子、T+1 日开盘调仓;需要改调仓逻辑直接说明即可。 By default factors are computed at T close and rebalanced at T+1 open — just say so if you want different timing.
描述策略,确认规格表Describe, then confirm the spec
Agent 先输出策略规格表——股票池、持仓数、调仓频率、因子方向——由你确认后才动手。The agent first outputs a spec table — universe, holdings, rebalance cadence, factor direction — and only proceeds after you confirm.
拿到完整回测脚本Get the full backtest script
基于母版只替换因子与配置区,交易执行和防未来函数检查原样保留,附自检清单。Only the factor and config sections change from the master template; trade execution and look-ahead checks stay intact, with a self-check list attached.
在 QMT 中编译回测Compile & backtest in QMT
粘贴到 QMT 策略编辑器 → 编译 → 按提示核对日期 / 资金 / 费率 → 运行回测看收益曲线。Paste into the QMT strategy editor → compile → verify dates / capital / fees per the checklist → run and review the equity curve.
下一个技能,由你的需求决定 The next skill is decided by your needs
这个项目靠社区需求驱动——你在 QMT 量化中遇到的重复劳动,都可能值得做成一个技能。所有技能在 CI 中按 Agent Skills 标准自动校验,维护流程公开透明。 This project is driven by community needs — any repetitive chore in your QMT quant workflow might deserve to become a skill. Every skill is CI-validated against the Agent Skills spec, with a public maintenance playbook.
想要新技能Want a new skill
一句话的想法也欢迎,用模板描述场景即可。Even a one-sentence idea is welcome — the template walks you through it.
提交技能需求 →Submit a request →技能出了问题Something broke
带上报错日志和复现步骤,修复会更快。Attach logs and repro steps — fixes land faster.
反馈 Bug →Report a bug →交流量化思路Talk quant ideas
使用咨询、因子想法、回测经验,都在这里聊。Usage questions, factor ideas, backtest experience — it all lives here.
去 Discussions →Open Discussions →自己动手写技能Build a skill yourself
阅读贡献指南,按标准提 PR,CI 自动校验。Read the guide, open a PR — CI validates against the spec automatically.
贡献指南 →Contributing guide →常见问题 FAQ
.agents/skills/;只用 Claude 系工具可以放 .claude/skills/。完整目录对照表见 README。
Claude Code, Cursor, Codex, Gemini CLI, Kimi Code, Windsurf, Cline, Trae and 70+ tools that support the Agent Skills standard. The universal directory is .agents/skills/; Claude-family tools can use .claude/skills/. See the README for the full table.
shift(1):T 日收盘算因子,T+1 日开盘调仓,并在生成后的自检清单中逐项检查。除非你明确要求当日收盘调仓并接受前视偏差,否则不会去掉滞后。
The skill enforces shift(1) on signals: factors computed at T close trade at T+1 open, verified item-by-item in the post-generation checklist. The lag is never removed unless you explicitly ask for same-day rebalancing and accept the bias.
一句话,让 AI 学会 QMT 回测 One sentence teaches your AI QMT backtesting
开源 · MIT 许可 · 欢迎 Star、技能需求与 PR Open source · MIT licensed · Stars, skill requests and PRs welcome
