Agent skill

QuantMind Training Config Generator

by qusong0627 in qusong0627/QuantMind

Turns a plain-language model training request into a validated QuantMind training config file that can be imported from the Model Training page.

AGPL-3.0Auto-check passedData & Analytics

SKILL.md written in Chinese; this summary is our English description.

Install QuantMind Training Config Generator

skills CLI
$ npx skills add qusong0627/QuantMind --skill model-training-config -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install qusong0627/QuantMind model-training-config --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/qusong0627/QuantMind.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/model-training-config .claude/skills/model-training-config && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
model-training-config
GitHub stars
1.7k
Token cost
~1.5k tokens
SKILL.md length
295 words
Files
9 (incl. scripts, references)
Skills in repo
27
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Turns a plain-language model training request into a validated QuantMind training config file that can be imported from the Model Training page.

  • Works in 9 steps: 交付物与导入方式 → 文件骨架(照抄结构,再改值) → 生成工作流(按序执行) → …
  • Generating an importable training configuration file for QuantMind
  • SKILL.md covers 0. 交付物与导入方式, 1. 文件骨架(照抄结构,再改值), 2. 生成工作流(按序执行) and 3. 常用默认值(用户未指定时), plus 5 more sections
  • Runs Python scripts from its folder; calls docker and python3

What it does

The skill is written in Chinese for QuantMind. It converts requirements such as market, prediction horizon, model type, factor direction, hyperparameters and train, validation and test date ranges into one `.yml` file of kind `quantmind-model-training-config`, with YAML or JSON content. It calls no training API; you import the file yourself on the Model Training page through Import Config, then preview and confirm.

The workflow collects requirements, picks the market and factor source (`l1_factors`, `l2_factors` or `l1_l2_factors`), chooses 40 to 120 balanced factors from the factor-family reference, sets non-overlapping time splits with a gap of at least the horizon plus one day, and fills in model and hyperparameter fields. A bundled `validate_training_config.py` must show no errors before delivery, and any defaults used are stated. Five ready-to-import templates cover LightGBM and GRU setups for the CN and HK markets.

After import, the front end overwrites the whole form, drops factors missing from the current catalog and trains on the currently published catalog version, so the skill tells you what to check afterward.

When your agent uses it

  • Generating an importable training configuration file for QuantMind
  • Batch-creating training presets for different markets and horizons
  • Checking an existing training config file against the schema

Example prompts

  • “Generate a QuantMind training config for CN stocks, 5 day horizon, LightGBM, momentum factors.”
  • “Make a stacking config with LightGBM and GRU for the HK market and validate it.”
  • “Validate this training config file and tell me which warnings I need to confirm.”

Requirements

  • Python 3 for the validation script
  • A QuantMind front end with the Model Training page for importing the file

Workflow steps

9 steps, taken from the step headings in SKILL.md.

  1. 交付物与导入方式
  2. 文件骨架(照抄结构,再改值)
  3. 生成工作流(按序执行)
  4. 常用默认值(用户未指定时)
  5. 导入后前端会做什么(务必转告用户)
  6. 演示配置(可直接导入)
  7. 校验脚本(交付前必跑)
  8. 相关技能
  9. 常见问题

What it can do on your machine

Read from SKILL.md and the folder at commit 2e93d9a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • docker
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use docker, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

QuantMind Training Config Generator loads about 1.5k tokens when it runs, and up to ~4.7k if it reads all its reference files. Until then it costs about 74 tokens; SKILL.md has 295 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~74
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from qusong0627/QuantMind at commit 2e93d9a, republished under its AGPL-3.0 licence (© qusong0627). 295 words, ~1,528 tokens.

Download SKILL.mdSave it as .claude/skills/model-training-config/SKILL.md (or your agent's skills folder). This skill also uses 8 other files; get the full folder from GitHub.
name
model-training-config
description
QuantMind 模型训练配置文件生成器:把自然语言需求(市场/周期/模型/因子/超参/时间切分)转成前端『模型训练 → 导入配置』可直接导入的 quantmind-model-training-config 文件(YAML/JSON,.yml 扩展名),并内置 schema 校验脚本与 5 个可直接导入的演示/预设配置。当用户要生成/编写/导出训练配置文件、批量造训练 preset、或需要可直接导入的训练参数模板时使用。触发词:训练配置文件、生成训练配置、导入配置、训练配置模板、训练 preset、训练参数文件、配置文件 schema

⚙️ 本技能遵循公共运行环境契约(最高优先级,先于本文其余内容执行): 详见 _shared/env-contract.md,执行前先读它。

模型训练配置生成器(QuantMind)

把「用户想要什么模型」翻译成前端模型训练页可以一键导入的配置文件。 本技能不调用训练 API(纯文件生成 + 本地/容器内校验);生成物交给用户在前端点导入。

0. 交付物与导入方式

  • 交付一个 .yml 文件(内容可为 YAML,也可为 JSON —— 导入用的 js-yaml 认 JSON)。 文件名建议 模型训练配置_<名称>_<YYYYMMDD>.yml。
  • 前端导入路径:模型训练页 → 右上角「导入配置」→ 选择文件 → 预览 → 确认。 文件选择器只接受 .yml / .yaml / .txt,不要用 .json 扩展名。
  • 导入会整体覆盖当前表单;市场/因子源会自动切换(见 §4)。

1. 文件骨架(照抄结构,再改值)

yaml
schema_version: 1                                  # 固定 1
kind: quantmind-model-training-config              # 固定值
exported_at: "2026-09-22T00:00:00.000Z"            # 元数据
market: CN                                         # CN|HK|US|CRYPTO|FUTURES
factor_source: l1_l2_factors                       # 可选:QuantDB 直读源
factor_catalog_version: qdb-cn-l1_l2_factors-xxxx  # 可选:仅作版本提示
factor_filter:
  enabled: true
  n_top: 80
  ic_threshold: 0.01
  icir_threshold: 0.15
  correlation_threshold: 0.9
configuration:
  displayName: MY_MODEL_T5
  displayNameMode: manual                          # auto|manual
  selectedFeatures: [mom_ret_20d, vol_std_20, ...] # 非空、去重、禁止标签字段
  timePeriods:
    train: ["2018-01-02", "2023-06-18"]
    val:   ["2023-06-26", "2025-01-21"]
    test:  ["2025-01-28", "2026-08-28"]
  target: { mode: return, horizonDays: 5 }
  params:
    model_type: lightgbm                           # 13 选 1
    # …见 references/schema.md 的白名单键
  context:
    initialCapital: 1000000
    benchmark: SH000300                            # CN=SH000300 HK=HSI US=SPX CRYPTO=BTC FUTURES=CL.FUT
    commissionRate: 0.00025
    slippage: 0.0005
    dealPrice: open                                # open|close
    market: CN
    industry_as_feature: false
  wfa: { enabled: false, strategy: rolling, nWindows: 4, trainYears: 3, valMonths: 12, stepMonths: 12 }

2. 生成工作流(按序执行)

  1. 收集需求:市场?预测周期 T+N?模型类型?偏因子方向(动量/微观结构/基本面…)? 训练/验证/测试时间范围?股票池?若用户没说,用 §3 的默认值并在交付时说明所选默认。
  2. 定市场与因子源:CN/HK/US/FUTURES/CRYPTO 是 QuantDB 直读市场。 要 L2 微观特征就 l1_l2_factors;只要日频用 l1_factors;纯高频用 l2_factors。
  3. 选因子:按 references/factor-families.md 的 recipe 挑 40~120 个,家族均衡;优先用其中列出的 key(已在本地目录验证)。
  4. 定时间切分:三段都要,且 train_end < val_start、val_end < test_start; 间隔 ≥ horizonDays + 1 天,否则后端会把 val/test 起点悄悄后移。
  5. 定模型与超参:树模型给 learning_rate/num_leaves/max_depth/...;DL 给 dl_*。 多模型 Stacking 才写 model_types(≥2)+ ensemble_method: stacking。
  6. 组装:按 §1 骨架填值,context.market 与顶层 market 保持一致。
  7. 自检(必做):跑 §6 的校验脚本,error 清零、warning 逐条确认后再交付。
  8. 交付:把文件给用户,并附「导入后要检查什么」(§4)。

3. 常用默认值(用户未指定时)

项默认
时间切分(T+5)train 2018-01-02~2023-06-18 / val 2023-06-26~2025-01-21 / test 2025-01-28~2026-08-28
时间切分(T+3)同上,但 val 起 2023-06-23、test 起 2025-01-26(满足 gap≥4)
factor_filterenabled:true, n_top:80, ic:0.01, icir:0.15, corr:0.9
LightGBM 稳健档lr 0.01 / num_leaves 15 / max_depth 6 / min_data 500 / l1 2 / l2 5 / ff 0.5 / bag 0.7 / rounds 3000 / es 100
基准CN SH000300、HK HSI、US SPX、CRYPTO BTC、FUTURES CL.FUT

4. 导入后前端会做什么(务必转告用户)

  1. 校验通过后弹预览:会标出「当前目录缺失的特征 / 市场变化 / 目录版本变化」。
  2. 确认后整体覆盖表单;不在当前因子目录里的特征会被丢弃。
  3. factor_catalog_version 只是提示,实际训练用页面当前已发布版本,不是回放旧版本。
  4. QuantDB 直读市场还需满足「目录已发布 + 数据覆盖就绪 + 训练节点就绪」,否则「开始训练」按钮不可用。
  5. 若日期间隔不足 horizon+1,后端会自动平移 val/test 起点并在 system_notices 提示。

5. 演示配置(可直接导入)

文件场景
templates/cn-l1l2-t5-lightgbm.ymlCN / L1L2 / T+5 / LightGBM 稳健档(推荐起手)
templates/cn-l1l2-t3-lightgbm.ymlCN / L1L2 / T+3 / LightGBM 基线(与上一份同特征,做周期对照)
templates/cn-l1l2-t5-gru.ymlCN / L1L2 / T+5 / GRU 深度学习
templates/hk-t5-lightgbm.ymlHK / T+5 / LightGBM 跨市场
templates/quantmind-training-L1L2-ICIR-100-T5.ymlCN / ICIR 优选 100 特征 / T+5 / LGB 重正则(大 preset)

改这些文件比重头写更稳:它们已通过校验脚本、且特征 key 全部存在于本地目录。 仓库根目录另有两个规模更大的成品 preset(quantmind-training-L1L2-120-*.yml)可作参考。

6. 校验脚本(交付前必跑)

纯标准库优先(JSON 可无需依赖;YAML 需 PyYAML):

bash
# 本地直接跑(本机有 PyYAML 时)
python3 skills/model-training-config/scripts/validate_training_config.py <你的配置.yml>

# 无 PyYAML 时进容器跑(env-contract §2)
docker cp <你的配置.yml> quantmind:/tmp/cfg.yml
docker cp skills/model-training-config/scripts/validate_training_config.py quantmind:/tmp/
docker exec -w /app quantmind python3 /tmp/validate_training_config.py /tmp/cfg.yml

脚本检查:kind/schema_version、市场、日期顺序、horizon+1 间隔、模型类型白名单、 params 未知键、factor_filter 钳制区间、标签字段混入、factor_source 与直读市场一致性。 退出码 0=通过(可含 warning)、1=有 error。error 必须清零;warning 要逐条判断是否符合预期。

7. 相关技能

  • [[model-train-infer-backtest-report]] — 提交训练/推理/回测/出报告(本技能只负责「生成可导入的配置」)。
  • [[quantmind-operations]] — 平台运营总指南(训练 5 步流程、模型管理)。
  • [[quantdb-fields]] — 字段单位与口径速查(选因子前必读)。
  • [[quantdb-data-structure]] — QuantDB 目录/分区/代码格式。

8. 常见问题

现象处理
导入报「不是受支持的 QuantMind 模型训练配置文件」kind / schema_version 写错
导入报「训练、验证、测试时间段必须按先后顺序」改成 train_end < val_start、val_end < test_start
导入报「配置中的模型类型不受支持」model_type 不在 13 种里
导入后特征少了很多不在当前目录的 key 被过滤;对照预览提示换用存在的 key
超参没生效用了非白名单键(如 lgb_learning_rate),被静默丢弃;改用共享键
训练时 val/test 起点和配置不一致间隔 < horizon+1,后端自动平移
Start 按钮灰着直读市场目录未发布/覆盖未就绪,或训练节点未就绪
文件选择器看不到文件扩展名不是 .yml/.yaml/.txt

© qusong0627, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 8 other files (scripts, references) in skills/model-training-config of qusong0627/QuantMind.

  • SKILL.md
  • references/factor-families.md
  • references/schema.md
  • scripts/validate_training_config.py
  • templates/cn-l1l2-t3-lightgbm.yml
  • templates/cn-l1l2-t5-gru.yml
  • templates/cn-l1l2-t5-lightgbm.yml
  • templates/hk-t5-lightgbm.yml
  • templates/quantmind-training-L1L2-ICIR-100-T5.yml

Open the folder on GitHubat commit 2e93d9a

Compare with similar skills

QuantMind Training Config Generator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

QuantMind Training Config Generator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
QuantMind Training Config Generator this skillqusong0627/QuantMind1.7k—~1.5kAutomated safety check: PassAGPL-3.0
Machine Learning Trading StrategyHKUDS/Vibe-Trading35k—~3.2kAutomated safety check: PassMIT
Longbridge Quanthelsome/folio2711 repos~1.6kAutomated safety check: PassMIT
Quant Statistical MethodsHKUDS/Vibe-Trading35k—~4kAutomated safety check: PassMIT
Feature Engineeringagiprolabs/claude-trading-skills410—~2.7kAutomated safety check: PassMIT
Walk Forward Validationagiprolabs/claude-trading-skills410—~2.2kAutomated safety check: PassMIT

Similar skills

  • Trains scikit-learn models with walk-forward validation on features from OHLCV data to predict return direction and turn the predictions into trading signals.

    35k GitHub stars~3.2k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Longbridge Quant

    helsome/folio

    Quantitative strategy frameworks: pairs trading/cointegration, volatility regime strategies, seasonality/calendar effects, multi-factor models (IC/IR), factor research and screening, correlation…

    271 GitHub starsUsed in 1 repo~1.6k tokens
    Data & AnalyticsAuto-check passed
  • Quant Statistical Methods

    HKUDS/Vibe-Trading

    Guides your agent through unit-root, cointegration, GARCH, bootstrap and regression-diagnostic tests on financial time series, using a tested helper module.

    35k GitHub stars~4k tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Feature Engineering

    agiprolabs/claude-trading-skills

    Feature construction from market data for ML trading models including price, volume, on-chain, and microstructure features

    410 GitHub stars~2.7k tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Walk Forward Validation

    agiprolabs/claude-trading-skills

    Walk-forward validation framework for trading strategies and ML models with time-series-aware splits, overfit detection, and regime-aware validation

    410 GitHub stars~2.2k tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Scikit Learn

    zLanqing/codex-claude-academic-skills

    Machine learning in Python with scikit-learn. An agent skill from zLanqing/codex-claude-academic-skills.

    4.7k GitHub starsUsed in 16 repos~3.9k tokens
    Data & AnalyticsAuto-check passed

More from qusong0627/QuantMind

All 27 skills in this repo
  • A-Share Daily Review

    qusong0627/QuantMind

    Produces a post-market review report for the China A-share market from local QuantDB data, news sentiment and model signals, ending in a next-day direction call.

    1.7k GitHub stars~1.9k tokensUpdated today
    Auto-check passed
  • Queries Futu quotes, options, fundamentals and accounts and places orders through the Futu OpenAPI Python SDK, defaulting to simulated trading.

    1.7k GitHub stars~3.3k tokensUpdated today
    Auto-check: notes
  • Tiger Brokers OpenAPI SDK

    qusong0627/QuantMind

    Covers the Tiger Brokers OpenAPI Python SDK for market data, stock, futures and options trading, push subscriptions, a CLI and an MCP server, defaulting to paper trading.

    1.7k GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Tiger Brokers C++ OpenAPI SDK

    qusong0627/QuantMind

    Guides an agent through the Tiger Brokers OpenAPI C++ SDK for build setup, market data, orders and real-time push, defaulting to paper trading.

    1.7k GitHub stars~942 tokensUpdated today
    Auto-check passed
  • Tiger Brokers OpenAPI C# SDK

    qusong0627/QuantMind

    Guides building C# and .NET apps on the Tiger Brokers OpenAPI SDK: setup, market data, orders, accounts, options and real-time push, defaulting to paper trading.

    1.7k GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Tiger Brokers OpenAPI Go SDK

    qusong0627/QuantMind

    Reference guides for building Go trading apps on the Tiger Brokers OpenAPI: SDK setup, market data, stock, futures and options orders, accounts and push streams.

    1.7k GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Works with

Questions about QuantMind Training Config Generator

What does QuantMind Training Config Generator do?

Turns a plain-language model training request into a validated QuantMind training config file that can be imported from the Model Training page. The skill is written in Chinese for QuantMind.yml` file of kind `quantmind-model-training-config`, with YAML or JSON content.

When should I use QuantMind Training Config Generator?

QuantMind Training Config Generator fits situations like: generating an importable training configuration file for QuantMind; batch-creating training presets for different markets and horizons; checking an existing training config file against the schema.

How do I install QuantMind Training Config Generator in Claude Code?

Run `npx skills add qusong0627/QuantMind --skill model-training-config -a claude-code`. Or copy the skill folder (skills/model-training-config in qusong0627/QuantMind) into .claude/skills/model-training-config in your project. Claude Code loads it when a task matches its description.

How do I install QuantMind Training Config Generator in Codex?

Run `npx skills add qusong0627/QuantMind --skill model-training-config -a codex`. Or copy the skill folder (skills/model-training-config in qusong0627/QuantMind) into .agents/skills/model-training-config in your project. Codex loads it when a task matches its description.

Can I use QuantMind Training Config Generator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add qusong0627/QuantMind --skill model-training-config -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/model-training-config, .gemini/skills/model-training-config, .github/skills/model-training-config and .opencode/skills/model-training-config in your project.

What does QuantMind Training Config Generator need to run?

Going by SKILL.md and its folder, QuantMind Training Config Generator needs Python for the scripts in its folder and the command-line tools its instructions call (docker and python3). Our summary lists: Python 3 for the validation script; A QuantMind front end with the Model Training page for importing the file.

Does QuantMind Training Config Generator access the network?

SKILL.md contains no URLs. Its commands use docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is QuantMind Training Config Generator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does QuantMind Training Config Generator use?

QuantMind Training Config Generator is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does QuantMind Training Config Generator use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 3.2k tokens, read only when the agent opens those files.

What are the alternatives to QuantMind Training Config Generator?

Skills that share tags, products or a category with QuantMind Training Config Generator: Machine Learning Trading Strategy (HKUDS/Vibe-Trading, 35k stars), Longbridge Quant (helsome/folio, 271 stars), Quant Statistical Methods (HKUDS/Vibe-Trading, 35k stars) and Feature Engineering (agiprolabs/claude-trading-skills, 410 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains QuantMind Training Config Generator?

qusong0627 (a GitHub user) maintains it in qusong0627/QuantMind, which has 1,725 GitHub stars. The repository holds 27 skills in this directory. The repository was last updated on October 10, 2026.

Source: qusong0627/QuantMind on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.