Agent skill

Smart Strategy Stock Picking

by qusong0627 in qusong0627/QuantMind

智能策略选股 — 基于 QuantDB 数据的条件选股。在 QuantBot / Claude Code 中按自然语言或条件筛选股票、构建股票池、生成策略时使用。触发词:筛选股票、股票池、条件选股、智能策略、按条件选股、自然语言选股、帮我选出

AGPL-3.0Auto-check passed

Install Smart Strategy Stock Picking

skills CLI
$ npx skills add qusong0627/QuantMind --skill smart-strategy-stock-picking -a claude-code

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

GitHub CLI
$ gh skill install qusong0627/QuantMind smart-strategy-stock-picking --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/smart-strategy-stock-picking .claude/skills/smart-strategy-stock-picking && 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
smart-strategy-stock-picking
GitHub stars
1.7k
Token cost
~1.4k tokens
SKILL.md length
257 words
Files
1
Skills in repo
27
Repo updated
First seen
Licence
AGPL-3.0

At a glance

智能策略选股 — 基于 QuantDB 数据的条件选股。在 QuantBot / Claude Code 中按自然语言或条件筛选股票、构建股票池、生成策略时使用。触发词:筛选股票、股票池、条件选股、智能策略、按条件选股、自然语言选股、帮我选出

  • Works in 7 steps: 常用选股因子(前 30 高频字段) → 方式一:自然语言解析(推荐给用户用) → 方式二:结构化条件解析(最可控) → …
  • SKILL.md covers 数据基础, 认证, 1. 常用选股因子(前 30 高频字段) and 2. 方式一:自然语言解析(推荐给用户用), plus 5 more sections
  • Calls curl and python3

What it does

Smart Strategy Stock Picking is an agent skill from qusong0627/QuantMind. 智能策略选股 — 基于 QuantDB 数据的条件选股。在 QuantBot / Claude Code 中按自然语言或条件筛选股票、构建股票池、生成策略时使用。触发词:筛选股票、股票池、条件选股、智能策略、按条件选股、自然语言选股、帮我选出

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: QuantMind(量化大脑)开源版是一款面向个人开发者与投研团队的 AI 原生多市场量化交易平台。深度集成微软 Qlib、RD-Agent 因子演化与 QuantBot全能工作台,提供从 300+ 维因子挖掘、13 种机器学习与深度学习模型工场、Qlib 高性能回测、截面批量推理、7x24… The licence is AGPL-3.0.

Example prompts

  • “/smart-strategy-stock-picking”

Requirements

  • Python 3

Workflow steps

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

  1. 常用选股因子(前 30 高频字段)
  2. 方式一:自然语言解析(推荐给用户用)
  3. 方式二:结构化条件解析(最可控)
  4. 方式三:DSL 直接查询(执行选股)
  5. 实战示例(可直接复用)
  6. 分析建议
  7. 常见问题

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

    Shell commands in SKILL.md call:

    • curl
    • python3

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

  • Network

    No URLs in SKILL.md. Its commands use curl, 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

Smart Strategy Stock Picking loads about 1.4k tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 257 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~38
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

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); files beside SKILL.md are not scanned.

SKILL.md

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

Download SKILL.mdSave it as .claude/skills/smart-strategy-stock-picking/SKILL.md (or your agent's skills folder).
name
smart-strategy-stock-picking
description
智能策略选股 — 基于 QuantDB 数据的条件选股。在 QuantBot / Claude Code 中按自然语言或条件筛选股票、构建股票池、生成策略时使用。触发词:筛选股票、股票池、条件选股、智能策略、按条件选股、自然语言选股、帮我选出

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

智能策略选股技能

基于 QuantDB 数据的条件选股。支持自然语言、结构化条件、DSL 三种方式,选出符合要求的股票池并附带量化指标。

数据基础

选股完全基于 QuantDB 本地 parquet。字段映射以后端字典为准:backend/services/engine/ai_strategy/steps/step1_stock_selection.py(DSL 字段 → QuantDB 表/列),覆盖以下数据源:

QuantDB 数据源字段覆盖
l1_factors66动量/流动性/概念热度/资金流
technical_indicators24均线/RSI/KDJ/MACD/波动率
financial20财务指标
valuation15PE/PB/市值/ROE
sentiment14市场情绪
margin10融资融券
stock_list6行业/ST/上市天数
daily/turnover3量价

认证

bash
BASE=http://127.0.0.1:8000
TOKEN=$(curl -s -X POST $BASE/api/v1/auth/login -H "Content-Type: application/json" \
  -d '{"username":"admin","password":"admin123","tenant_id":"default"}' \
  | python3 -c "import sys,json; print(json.load(sys.stdin).get('access_token',''))")
AUTH="Authorization: Bearer $TOKEN"
CT="Content-Type: application/json"

1. 常用选股因子(前 30 高频字段)

字段含义单位
market_cap / total_mv总市值亿
float_mv流通市值亿
pe / pe_ttm市盈率—
pb市净率—
roe净资产收益率%
close收盘价元
pct_change当日涨跌幅%
turnover_rate换手率%
ma5 / ma10 / ma20 / ma60均线元
ma_gap_5 / ma_gap_20均线偏离度%
rsi_6 / rsi_14RSI—
kdj_k / kdj_d / kdj_jKDJ—
macd_dif / macd_dea / macd_histMACD—
future_return_1d / future_return_3d / future_return_5d / future_return_20d / future_return_60d未来 N 日收益(标签,勿作过滤)%
vol_std_5 / vol_std_20 / vol_std_60波动率%
vol_atr_1414日ATR—
beta_2020日Beta—
volume_ratio_5 / volume_ratio_20量比—
main_flow主力资金净流入元
flow_net_amount资金净流入总额万元(2026-09 起;读入归一为元)
inst_ownership机构持仓%
concept_ai / concept_chip 等概念热度—
industry行业—
is_st是否ST—
listed_days上市天数天

完整字段清单与映射以后端字段字典为准(backend/services/engine/ai_strategy/steps/step1_stock_selection.py + api/schemas/stock_pool.py)。⚠️ 前端 electron/src/features/strategy-wizard/factors/dictionary.ts 已移除,勿再引用。

2. 方式一:自然语言解析(推荐给用户用)

bash
# 解析自然语言为 DSL(内部:可先用此步确认字段能否被识别)
curl -s -X POST "$BASE/api/v1/strategy/parse-text" -H "$AUTH" -H "$CT" \
  -d '{"text":"市值大于500亿且ROE大于15%的沪深300成分股,剔除ST"}' \
  -o /tmp/pt.json -w "HTTP %{http_code}\n"
cat /tmp/pt.json | python3 -m json.tool --no-ensure-ascii | head -30

3. 方式二:结构化条件解析(最可控)

bash
curl -s -X POST "$BASE/api/v1/strategy/parse-conditions" -H "$AUTH" -H "$CT" \
  -d '{"conditions":{"type":"numeric","factor":"pe","operator":"<","threshold":15}}' \
  -o /tmp/pc.json -w "HTTP %{http_code}\n"
cat /tmp/pc.json | python3 -m json.tool --no-ensure-ascii

条件结构:

  • 数值条件:{"type":"numeric","factor":"pe","operator":"<|<=|>|>=|=","threshold":15}
  • 趋势条件:{"type":"trend","factor":"ma5","window":5,"direction":"above|below"}
  • 复合条件:{"type":"composite","op":"and|or","children":[...]}(可嵌套)

返回:dsl(如 SELECT symbol WHERE pe < 15)+ mapping + quantdb_filters(如 [{field:"pe_ttm", operator:"<", value:15, table:"quantdb_valuation"}])

4. 方式三:DSL 直接查询(执行选股)

bash
curl -s -X POST "$BASE/api/v1/strategy/query-pool" -H "$AUTH" -H "$CT" \
  -d '{"dsl":"SELECT symbol WHERE pe < 15 AND roe > 10","market":"CN","exchange":"SH"}'

参数:

  • dsl:SELECT symbol WHERE 条件 [AND/OR 条件...](字段用上面的因子名)
  • market:CN / HK / US / CRYPTO
  • exchange:SH / SZ / BJ(仅 A 股)

返回:items(每只股票 symbol/name/metrics,metrics 含市值/PE/ROE 等)+ summary(matchRate/totalCandidates/universeTotal/asOf)

5. 实战示例(可直接复用)

5.1 低估值蓝筹(PE<15 且 市值>500亿)
bash
curl -s -X POST "$BASE/api/v1/strategy/query-pool" -H "$AUTH" -H "$CT" \
  -d '{"dsl":"SELECT symbol WHERE pe < 15 AND market_cap > 500 AND roe > 10","market":"CN"}'
5.2 动量强势(过去 20 日收益>10% 且 RSI>60)
bash
curl -s -X POST "$BASE/api/v1/strategy/query-pool" -H "$AUTH" -H "$CT" \
  -d '{"dsl":"SELECT symbol WHERE mom_ret_20d > 0.10 AND rsi_14 > 60 AND turnover_rate < 20","market":"CN"}'

勿用 future_return_*(旧名 return_*)做选股过滤——那是未来收益标签,会造成泄漏。

5.3 高波动小盘(波动大 + 市值小)
bash
curl -s -X POST "$BASE/api/v1/strategy/query-pool" -H "$AUTH" -H "$CT" \
  -d '{"dsl":"SELECT symbol WHERE vol_std_20 > 5 AND market_cap < 100 AND pct_change > 0","market":"CN"}'
5.4 资金流入 + 概念热门(AI/半导体)
bash
curl -s -X POST "$BASE/api/v1/strategy/query-pool" -H "$AUTH" -H "$CT" \
  -d '{"dsl":"SELECT symbol WHERE main_flow > 10000000 AND concept_ai > 0.5","market":"CN"}'
5.5 剔除 ST + 特定行业 + 换手活跃
bash
curl -s -X POST "$BASE/api/v1/strategy/query-pool" -H "$AUTH" -H "$CT" \
  -d '{"dsl":"SELECT symbol WHERE is_st = false AND industry = 半导体 AND turnover_rate BETWEEN 3 AND 15","market":"CN"}'

6. 分析建议

选出的股票池可结合其他技能深入分析:

  • 查新闻:/news/articles 带 tickers 看利好/利空 → [[quantmind-operations]] 第 7 节
  • 查推理分数:/models/inference/stock/{symbol}/history 看模型评分
  • 挖新因子:[[rd-agent-factor-mining]] 补充更多筛选维度
  • 训练模型:选出的池子可喂给模型训练 → [[quantmind-operations]] 第 1 节

7. 常见问题

现象原因处理
422 字段不匹配DSL 用了映射表外字段用上面的常用因子名,或查后端字典 step1_stock_selection.py
选股结果为空条件过严放宽阈值,或去掉 AND 条件
summary.matchRate 极低条件偏窄检查 totalCandidates 是否正常
想要全市场dsl 用 SELECT symbol WHERE true返回全部候选

© 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

Just SKILL.md in skills/smart-strategy-stock-picking of qusong0627/QuantMind.

Open the folder on GitHubat commit 2e93d9a

Compare with similar skills

Smart Strategy Stock Picking 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.

Smart Strategy Stock Picking compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Smart Strategy Stock Picking this skillqusong0627/QuantMind1.7k—~1.4kAutomated safety check: PassAGPL-3.0
Stock Picking By Common Stocks Uncommon Profitssimbajigege/book2skills183—~1.2kAutomated safety check: PassProprietary
Smart Contract Formal Verificationsickn33/agentic-awesome-skills47k1 repos~1.4kAutomated safety check: PassMIT
Smart Contract Upgrade Governancesickn33/agentic-awesome-skills47k1 repos~1.4kAutomated safety check: PassMIT
StockMagicCube/agentara516—~1.1kAutomated safety check: PassNone
Flutter Cherry Pickflutter/flutter180k—~1.8kAutomated safety check: PassBSD-3-Clause

Similar skills

  • Apply Philip Fisher's growth stock investment framework from Common Stocks and Uncommon Profits.

    183 GitHub stars~1.2k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Smart Contract Formal Verification

    sickn33/agentic-awesome-skills

    Foundry and Soroban formal invariant verification register: state transition rules, boundary invariant properties, and symbolic execution checks.

    47k GitHub starsUsed in 1 repo~1.4k tokens
    Backend & APIsAuto-check passed
  • Smart Contract Upgrade Governance

    sickn33/agentic-awesome-skills

    Soroban WASM upgrade governance register: executable bytecode hash, timelocked migration delays, and multi-sig authorization quorum.

    47k GitHub starsUsed in 1 repo~1.4k tokens
    Backend & APIsAuto-check passed
  • Stock

    MagicCube/agentara

    Query stock quotes for US stocks, Hong Kong stocks, and A-shares.

    516 GitHub stars~1.1k tokensUpdated 5 mo ago
    Business, Finance & HRAuto-check passed
  • Flutter Cherry Pick

    flutter/flutter

    How to land a formal cherry-pick of a merged PR for the flutter/flutter repo stable or beta channel.

    180k GitHub stars~1.8k tokensUpdated today
    MobileAuto-check passed
  • Stock Analysis

    alirezarezvani/claude-skills

    Produce a rigorous, sector-relative, multi-factor fundamental analysis of a publicly listed company — Indian (NSE/BSE) or US/global.

    28k GitHub stars~8.5k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-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
  • Turns a plain-language model training request into a validated QuantMind training config file that can be imported from the Model Training page.

    1.7k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • 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

Questions about Smart Strategy Stock Picking

What does Smart Strategy Stock Picking do?

智能策略选股 — 基于 QuantDB 数据的条件选股。在 QuantBot / Claude Code 中按自然语言或条件筛选股票、构建股票池、生成策略时使用。触发词:筛选股票、股票池、条件选股、智能策略、按条件选股、自然语言选股、帮我选出. Smart Strategy Stock Picking is an agent skill from qusong0627/QuantMind.

How do I install Smart Strategy Stock Picking in Claude Code?

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

How do I install Smart Strategy Stock Picking in Codex?

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

Can I use Smart Strategy Stock Picking 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 smart-strategy-stock-picking -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/smart-strategy-stock-picking, .gemini/skills/smart-strategy-stock-picking, .github/skills/smart-strategy-stock-picking and .opencode/skills/smart-strategy-stock-picking in your project.

What does Smart Strategy Stock Picking need to run?

Going by SKILL.md and its folder, Smart Strategy Stock Picking needs the command-line tools its instructions call (curl and python3). Our summary lists: Python 3.

Does Smart Strategy Stock Picking access the network?

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

Is Smart Strategy Stock Picking 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. Review the folder before installing.

What licence does Smart Strategy Stock Picking use?

Smart Strategy Stock Picking 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 Smart Strategy Stock Picking use?

About 1.4k tokens (SKILL.md is roughly 5.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Smart Strategy Stock Picking?

Skills that share tags, products or a category with Smart Strategy Stock Picking: Stock Picking By Common Stocks Uncommon Profits (simbajigege/book2skills, 183 stars), Smart Contract Formal Verification (sickn33/agentic-awesome-skills, 47k stars), Smart Contract Upgrade Governance (sickn33/agentic-awesome-skills, 47k stars) and Stock (MagicCube/agentara, 516 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Smart Strategy Stock Picking?

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.