xtquantai skill

Skill for the QMT terminal: turns a strategy description or research PDF into a daily factor backtest script

  • 170 ★ on the repository
  • Last commit
  • MIT
Skill

Extended access

Why this level

  • The skill writes strategy files into the project that are later run in the QMT trading terminal
  • A mistake in a generated strategy can affect decisions if it is moved to a live account without review
All reasons and checks

dfkai/xtquantai

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/xtquantai

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • The skill writes strategy files into the project that are later run in the QMT trading terminal
  • A mistake in a generated strategy can affect decisions if it is moved to a live account without review

This is third-party code. Review the repository files before installing.

What it does

xtquantai is a repository of skills for the QMT terminal from Xuntou, used on the Chinese stock market. One skill is ready today, `qmt-inner-backtest`: it takes a strategy description, a research PDF or a screenshot and reconstructs the factor logic. First the agent shows a table of strategy parameters, such as the index, number of holdings and rebalance period, and waits for your confirmation. Then, based on the ready template `daily-factors-backtest.py`, it builds a script for QMT's built-in editor: signals are precomputed in `after_init` and positions are changed in `handlebar`. The script includes Barra-style factor processing and a check for lookahead use of future data. After generation the agent lists the settings you must verify by hand in the QMT panel. Three more skills are announced as planned: futures trading, a live strategy template with target positions and signal delivery to Feishu. The earlier MCP server for xtquant moved to the `legacy-mcp` branch and is no longer maintained.

Who it is for. Quants and private investors in the Chinese stock market who test factor strategies in QMT and want to turn research ideas into working code.

Good fit when

  • A research report describes a factor and you want to test it on the CSI 1000 with rebalancing every five days
  • A strategy arrived as a screenshot or a text description and there is no QMT script
  • Before running a backtest you want to confirm the signals use no data from the future
  • The strategy needs Barra-style factor normalization and neutralization
  • A team wants one shared template for daily factor backtests

Not a fit when

  • You need futures trading or a live strategy: those skills exist only as plans for now
  • You work in a terminal other than QMT: the template targets its strategy editor and API
  • You need a backtest on minute data: the skill builds daily cross-sections
  • You need an MCP server for xtquant: it stayed in the unmaintained `legacy-mcp` branch

Example request

Here is a report on upper and lower shadow factors (PDF). Build a QMT backtest script on the CSI 1000: top 10 holdings, rebalancing every five days

Limitations

QMT and the investment research terminal run only on Windows, so the generated script runs there while the skill itself can be used on any system. The agent writes code but does not run the backtest. You verify the parameters in the QMT panel by hand, and judging the result is up to your own review. Instructions and descriptions in the repository are in Chinese. The last commit dates from June 2026, and the repository holds one ready skill.

How to disable. Delete the `qmt-inner-backtest` folder from the agent's skills directory, such as `.claude/skills/` or `.agents/skills/`. For the Claude Code plugin run `/plugin uninstall qmt-skills@xtquantai`.

FAQ

How do I install xtquantai in Claude Code?

There are two routes: `npx skills add dfkai/xtquantai` or the native plugin with `/plugin marketplace add dfkai/xtquantai` and `/plugin install qmt-skills@xtquantai`. The `--skill qmt-inner-backtest` flag installs one skill and `-g` makes it available in every project.

Does the skill run the backtest?

No, it produces code for the QMT strategy editor. Running it, supplying data and verifying settings happen in the terminal itself, which works only on Windows.

What input does it take?

A strategy description as text, a report PDF or a screenshot. Before generation the agent prints a parameter table that you can correct before any code is written.

What happened to the earlier MCP server?

The repository began as an MCP server for xtquant. It has moved to skills, and the old code sits in the `legacy-mcp` branch and the `v0.1.0-mcp` tag, unmaintained.

How does the skill catch lookahead?

A check against use of future data is part of the skill description and built into the script template. See `SKILL.md` for the exact rules and judge the completeness of the check on your own data.

Discussion

No questions or reviews yet.

Skills

Thirteen skills for quantitative trading on China's A-share market: AKShare and BaoStock data, Backtrader and RQAlpha backtests, QMT and JoinQuant docs

SkillBroad access485Repository stars

Turns a trading strategy into rules, runs a backtest and reconciles orders and balances against an independent ledger.

SkillExtended access529Repository stars

JoinQuant API references, templates and a linter: the agent checks platform functions before it writes strategy code.

SkillExtended access92Repository stars

Four skills for China's A-share market: quotes and indicators, trend-pullback signals, a simulated account and backtests

SkillExtended access261Repository stars

MCP server for backtesting trading strategies: the agent fetches quotes, runs a test from YAML and reads the metrics on the Backtrader engine

MCP serverExtended access1.1KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
xtquantai (this card)no170
Finance Quant Skillsno48513 skills for quant trading on the Chinese market with AKShare and BaoStock data and Backtrader and RQAlpha backtests
a-stock-datano11,786a skill with Chinese stock market data that does not generate strategies
Vibe-Tradingnokey is optional38,140an MCP server for backtesting and multi-agent market analysis

README in short

The README explains what the repository is, lists skills with their status and invites requests for new ones. Five install routes follow, along with a directory table for twelve tools, a sample request and the repository layout. A separate note warns that the QMT terminal runs on Windows only.

README badge

Report a problem