Skip to main content
Glama

xtquantai — 迅投 QMT 量化 AI 技能集

面向迅投 QMT / 投研终端的 Agent Skills 仓库:把量化策略开发的领域知识(因子回测、信号生成、实盘模板等)封装为标准 SKILL.md 技能,安装后可在 Claude Code、Cursor、Codex、Gemini CLI、Kimi Code 等 70+ AI 编程工具中直接使用。

validate License

本仓库曾是 xtquant 的 MCP 服务器实现,现已全面转型为 skill 仓库。旧 MCP 代码保留在 legacy-mcp 分支(tag v0.1.0-mcp),不再维护。

技能列表

技能

状态

说明

qmt-inner-backtest

✅ 可用

根据策略描述 / 研报 PDF / 截图解读因子逻辑,基于母版脚本生成 QMT 内置日频截面因子回测策略(after_init 预计算信号 → handlebar 调仓执行,含 Barra 风格因子处理与防未来函数检查)

qmt-future-trade

🚧 规划中

期货开平仓策略

qmt-live-strategy-template

🚧 规划中

目标持仓型实盘策略模板

qmt-live-signal-feishu

🚧 规划中

信号生成 + 飞书推送

Related MCP server: okx-trade-mcp

参与社区

这个项目靠社区需求驱动——你在 QMT 量化中遇到的重复劳动,都可能值得做成一个技能:

所有技能在 CI 中自动按 Agent Skills 标准 校验。维护流程公开在 维护手册。

安装

方式一:npx skills(推荐,覆盖 70+ 工具)

# 交互式选择要安装到的工具
npx skills add dfkai/xtquantai

# 只装某个技能
npx skills add dfkai/xtquantai --skill qmt-inner-backtest

# 装到全局目录(所有项目可用)
npx skills add dfkai/xtquantai -g

方式二:Claude Code 原生插件

/plugin marketplace add dfkai/xtquantai
/plugin install qmt-skills@xtquantai

方式三:Kimi Code CLI

/plugins install https://github.com/dfkai/xtquantai

方式四:让你的 Agent 自己装

对任意 AI 编程工具说:

读取 https://raw.githubusercontent.com/dfkai/xtquantai/master/INSTALL.md 并按其中说明安装技能。

方式五:手动复制

把 skills/<技能名>/ 整个文件夹复制到你所用工具的技能目录:

工具

项目级目录

用户级目录

Claude Code

.claude/skills/

~/.claude/skills/

Cursor (≥2.4)

.cursor/skills/(也读 .agents/、.claude/)

~/.cursor/skills/

OpenAI Codex CLI

.agents/skills/

~/.agents/skills/

GitHub Copilot

.github/skills/(也读 .claude/、.agents/)

—

Gemini CLI

.gemini/skills/ 或 .agents/skills/

—

Kimi Code CLI

.kimi-code/skills/ 或 .agents/skills/

—

Windsurf

.windsurf/skills/ 或 .agents/skills/

—

OpenCode

.opencode/skills/、.claude/skills/、.agents/skills/

—

Cline (≥3.48)

.cline/skills/ 或 .claude/skills/(需启用实验特性)

—

字节 Trae

仅 .trae/skills/

—

Qwen Code

仅 .qwen/skills/

—

iFlow CLI

仅 .iflow/skills/

—

跨工具通用目录是 .agents/skills/;只用 Claude 系工具可以放 .claude/skills/。

使用示例

安装 qmt-inner-backtest 后,在你的 AI 工具中直接说:

这份研报(附 PDF/截图)的上下影线因子,帮我生成一个中证1000、Top 10 持仓、5 日调仓的 QMT 回测脚本。

Agent 会先输出策略规格表供你确认,再基于母版生成完整的 QMT 策略编辑器回测脚本,并提示你需要在 QMT 面板中手动核对的配置项。

⚠️ QMT / 投研终端仅支持 Windows,生成的策略脚本需在 Windows 上的 QMT 策略编辑器中运行;skill 本身(生成脚本的过程)不限平台。

仓库结构

xtquantai/
├── skills/                       # 技能目录(每个子目录一个 skill)
│   └── qmt-inner-backtest/
│       ├── SKILL.md              # 技能定义(agentskills.io 标准格式)
│       └── scripts/
│           └── daily-factors-backtest.py   # 回测母版脚本
├── .claude-plugin/
│   └── marketplace.json          # Claude Code 插件市场清单
├── .github/                      # issue/PR 模板与 CI 校验
├── kimi.plugin.json              # Kimi Code 插件清单
├── INSTALL.md                    # 给 agent 读的安装指令
├── CONTRIBUTING.md               # 贡献指南
└── docs/                         # 调研文档与维护手册

许可证

MIT — 详见 LICENSE。

致谢

Available Tools

8 tools
create_chart_panelC

创建图表面板,显示指定股票的技术指标

Inputs: codes (required), indicators, params, period.

create_custom_layoutC

创建自定义布局,可以指定指标名称、参数名和参数值

Inputs: codes (required), indicator_name, param_names, param_values, +1 more.

get_full_market_dataC

获取历史+最新行情数据

Inputs: codes (required), end_date, fields, period, +1 more.

get_history_market_dataC

获取历史行情数据

Inputs: codes (required), end_date, fields, period, +1 more.

get_instrument_detailC

获取指定股票的详细信息

Inputs: code (required), iscomplete.

get_latest_market_dataC

获取最新行情数据

Inputs: codes (required), period.

get_stock_listC

获取指定板块的股票列表

Inputs: sector.

get_trading_datesC

获取指定市场的交易日期列表

Inputs: market.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 8 tools

    Disambiguation3/5

    Most tools have distinct purposes, but there is notable overlap between get_full_market_data, get_history_market_data, and get_latest_market_data, which could cause confusion about which to use for specific data needs. The other tools target different resources like layouts, stock details, lists, and dates, making them clearer.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case, such as create_chart_panel, get_full_market_data, and get_instrument_detail. This predictability makes the tool set easy to navigate and understand.

    Tool Count5/5

    With 8 tools, the count is well-scoped for a financial/quantitative AI server focused on market data, stock analysis, and visualization. Each tool appears to serve a specific function without being excessive or too sparse.

    Completeness3/5

    The tool set covers data retrieval, stock analysis, and visualization well, but there are gaps in operations like updating or deleting created layouts/panels, and no tools for executing trades or managing portfolios, which might be expected in a quantitative AI context. This could limit agent workflows.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server for the Microsoft Qlib quantitative research platform that enables AI agents to perform financial data queries, factor analysis, and strategy backtesting. It supports A-share and US stock markets through Qlib expressions and built-in analytical tools.
      3
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      MCP server connecting AI assistants to OKX exchange, enabling trading, market data, account management, and more via 150+ tools across 11 modules.
      501
      MIT
    • A
      license
      Not graded
      quality
      F
      maintenance
      An MCP server that enables AI assistants to securely access Webull trading and market data, supporting multi-region (US/HK), various asset classes, order types, and risk controls.
      7
      Apache 2.0
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that gives AI assistants direct, structured access to China A-share market data.
      3
      Apache 2.0