AI Agent Hub
Back to skills
GMQuant Natural Language Strategy Engine icon

GMQuant Natural Language Strategy Engine

Professional Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Install @user_7b314952/gmquant according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem

When a trading idea is still expressed in plain language, turning it into runnable GMQuant code still requires handling set_token, symbol, run(), strategy_id, subscription, and order placement. This skill targets that conversion step: it structures Chinese strategy descriptions into runnable .py files and supports backtesting or live/simulation execution. It is not a generic coding assistant; it focuses on the GMQuant SDK strategy generation and execution workflow.

How It Works

The skill first identifies the key strategy variables: instrument pool, frequency, entry signal, exit signal, position sizing, stop loss/take profit, backtest period, initial capital, and execution mode. If the user has not provided a strategy_id, it asks before generation, because this identifier determines whether backtest results are persisted in the GMQuant terminal and shown in performance charts. During generation, it produces a complete strategy file. During execution, it launches scripts/run_strategy.py to run MODE_BACKTEST=2 backtests or MODE_LIVE=1 live/simulation mode. For data-query scenarios, it emphasizes calling set_token first and notes that run() is not required. For trading scenarios, it pays attention to symbol case sensitivity, subscribe, order-function parameters, the 100-share minimum for A-shares, and T+1 constraints.

Boundaries

The skill depends on the GMQuant terminal environment, and some interfaces or premium data may require paid permissions. Behavior of current(), order status, and execution reports can differ across backtest, simulation, and live mode; market orders with insufficient funds may be canceled rather than raising an error. It is suitable for converting explicit strategy intent into runnable code, but it should not invent entry or exit rules when the user’s description is vague, and it does not guarantee trading profits.

Use Cases

  • When you have an instrument and a signal idea in GMQuant, turn a dual moving average cross into a backtestable Python strategy file with a strategy_id.
  • When debugging a strategy, check whether set_token, symbol, MODE_BACKTEST, and the runner script are configured correctly.
  • When live or simulated trading does not place orders, troubleshoot subscriptions, scheduled tasks, main-contract limits, and order status.
  • Before backtesting, add strategy_id and the date range so results can be reviewed in the terminal with returns, drawdown, and Sharpe ratio.

Best For

  • Python quant engineers using GMQuant who want to reduce manual copying of strategy templates.
  • Strategy researchers with clear entry and exit signals who need to turn research ideas into runnable backtest files.
  • Developers maintaining multiple strategies in GMQuant who need consistent strategy_id, parameters, and terminal performance views.
  • Execution engineers debugging futures continuous contracts, A-share minimum order sizes, or order callbacks.