Anti Gambling Trader
mars-tw/anti-gambling-trader-tw
分析台股 / 台股ETF / 台指期選擇權 / 美股 / 加密貨幣 / 外匯的交易紀錄 (CSV / JSON / Excel),用統計學判斷使用者的獲利是「可重複的優勢」還是 「運氣 + 倖存者偏差(賭博)」,不適合長期投資會明確勸退。內建反詐工具: 掃描群組對話的詐騙話術(scan-text)、檢驗老師宣稱的績效(guru-check)、…
股票市场深度数据分析与导出 — 全市场信号扫描、行业轮动、个股研报级深度分析(基本面/估值/技术/资金筹码/情绪/风险六维)、数据挖掘、CSV/Excel 导出。在 QuantBot / Claude Code 中分析股票市场、挖掘机会、导出分析数据、生成选股报告时使用。触发词:分析市场、数据分析、数据挖掘、全市场扫描、行业轮动、导出数据、导出CSV、挖掘机会、个股研报、个股分析、深度分析
$ npx skills add qusong0627/QuantMind --skill stock-market-analysis -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install qusong0627/QuantMind stock-market-analysis --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/qusong0627/QuantMind.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/stock-market-analysis .claude/skills/stock-market-analysis && rm -rf skills-srcUse ~/.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/
Install the "stock-market-analysis" agent skill from https://github.com/qusong0627/QuantMind/tree/master/skills/stock-market-analysis into .claude/skills/stock-market-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stock-market-analysis", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/qusong0627/QuantMind/tree/master/skills/stock-market-analysisType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add qusong0627/QuantMind --skill stock-market-analysis -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install qusong0627/QuantMind stock-market-analysis --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/qusong0627/QuantMind.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/stock-market-analysis .agents/skills/stock-market-analysis && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "stock-market-analysis" agent skill from https://github.com/qusong0627/QuantMind/tree/master/skills/stock-market-analysis into .agents/skills/stock-market-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stock-market-analysis", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add qusong0627/QuantMind --skill stock-market-analysis -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install qusong0627/QuantMind stock-market-analysis --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/qusong0627/QuantMind.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/stock-market-analysis .cursor/skills/stock-market-analysis && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "stock-market-analysis" agent skill from https://github.com/qusong0627/QuantMind/tree/master/skills/stock-market-analysis into .cursor/skills/stock-market-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stock-market-analysis", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/qusong0627/QuantMind.git --path skills/stock-market-analysis--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add qusong0627/QuantMind --skill stock-market-analysis -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install qusong0627/QuantMind stock-market-analysis --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/qusong0627/QuantMind.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/stock-market-analysis .gemini/skills/stock-market-analysis && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "stock-market-analysis" agent skill from https://github.com/qusong0627/QuantMind/tree/master/skills/stock-market-analysis into .gemini/skills/stock-market-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stock-market-analysis", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install qusong0627/QuantMind stock-market-analysisInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add qusong0627/QuantMind --skill stock-market-analysis -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/qusong0627/QuantMind.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/stock-market-analysis .github/skills/stock-market-analysis && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "stock-market-analysis" agent skill from https://github.com/qusong0627/QuantMind/tree/master/skills/stock-market-analysis into .github/skills/stock-market-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stock-market-analysis", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add qusong0627/QuantMind --skill stock-market-analysis -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install qusong0627/QuantMind stock-market-analysis --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/qusong0627/QuantMind.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/stock-market-analysis .opencode/skills/stock-market-analysis && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "stock-market-analysis" agent skill from https://github.com/qusong0627/QuantMind/tree/master/skills/stock-market-analysis into .opencode/skills/stock-market-analysis/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "stock-market-analysis", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
stock-market-analysis股票市场深度数据分析与导出 — 全市场信号扫描、行业轮动、个股研报级深度分析(基本面/估值/技术/资金筹码/情绪/风险六维)、数据挖掘、CSV/Excel 导出。在 QuantBot / Claude Code 中分析股票市场、挖掘机会、导出分析数据、生成选股报告时使用。触发词:分析市场、数据分析、数据挖掘、全市场扫描、行业轮动、导出数据、导出CSV、挖掘机会、个股研报、个股分析、深度分析
Stock Market Analysis is an agent skill from qusong0627/QuantMind. 股票市场深度数据分析与导出 — 全市场信号扫描、行业轮动、个股研报级深度分析(基本面/估值/技术/资金筹码/情绪/风险六维)、数据挖掘、CSV/Excel 导出。在 QuantBot / Claude Code 中分析股票市场、挖掘机会、导出分析数据、生成选股报告时使用。触发词:分析市场、数据分析、数据挖掘、全市场扫描、行业轮动、导出数据、导出CSV、挖掘机会、个股研报、个股分析、深度分析
Its SKILL.md is about 5.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `REFERENCES/quantdb-full-analysis-design.md` and `REFERENCES/stock-9layer-runbook.md`).
It sits in Documents & Office, covering Stock and market analysis, Excel spreadsheets and CSV and tabular files. It works with Microsoft Excel. The repository describes itself as: QuantMind(量化大脑)开源版是一款面向个人开发者与投研团队的 AI 原生多市场量化交易平台。深度集成微软 Qlib、RD-Agent 因子演化与 QuantBot全能工作台,提供从 300+ 维因子挖掘、13 种机器学习与深度学习模型工场、Qlib 高性能回测、截面批量推理、7x24… The licence is AGPL-3.0.
10 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 2e93d9a. It shows what the files ask for, not the result of running them.
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.
Shell commands in SKILL.md call:
curldockerpython3From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use curl and docker, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Stock Market Analysis loads about 5.4k tokens when it runs, and up to ~13k if it reads all its reference files. Until then it costs about 55 tokens; SKILL.md has 696 words of instructions outside code blocks.
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.
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.
The full file from qusong0627/QuantMind at commit 2e93d9a, republished under its AGPL-3.0 licence (© qusong0627). 696 words, ~5,397 tokens.
.claude/skills/stock-market-analysis/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.⚙️ 本技能遵循公共运行环境契约(最高优先级,先于本文其余内容执行): 详见 _shared/env-contract.md,执行前先读它。
基于 QuantDB 全量数据(K线/财务/估值/技术/315维因子/融资融券/股东户数)的股票市场深度分析 + 数据导出技能。
⚠️ 数据计算零容忍(本技能最高优先级) 所有涉及金额、成交量、比率的计算必须先查 [[quantdb-fields]] 技能核对单位与口径, 并在报告中注明换算步骤。单位/口径错 = 结论全部作废。核心陷阱:
陷阱 正确口径 个股 volume=股、amount=万元 指数 volume=手、amount=万元 close*volume/amount ≈ 1e4(个股自检公式)指数 ≈ 2e4 technical_indicators 的 close=后复权 valuation/market_sentiment=不复权 valuation dividend_rate是百分数(0.148=0.148%),20260814 起才切换之前是小数口径,跨日分析必须 ×10 归一 l1 vol_std_*是小数(0.0406)technical_indicators vol_std_*是 %(4.06),差 100 倍symbols/features API 已换算:市值→亿元、flow*→百万元 parquet 原值:市值=元、flow=元(差 1e8/1e6) l2_factors 分区停滞 20260227 用前先查最新日期,近期 l2 型字段大量 NaN 是正常的 min1/min5 停更 20260724、hsgt_north 停更 202408 别当实时数据用 财务 parquet 单位=元 instrument_detail J_*=万元、Zsz/Ltsz=亿元股息:dividend_factors interest=每10股派息算每股股息要 /10 risk/features 接口的 MA/ATR 是复权口径陷阱(高危):ma*/ma_gap*/vol_atr_14 曾取自 features_daily(后复权),与 OHLCV(前复权)混用 → 比音勒芬 002832 曾被误判「跌破均线」(ma5=147 vs 实际价 26.08) 20260817 起已修复:stock_daily_latest 的 MA/gap/ATR 改为基于前复权 close 重算(ma_gap_N=(close/maN−1)×100,ATR=Wilder)。引用接口 MA 前必须用 /research/kline实际数据自算核对(pandas rolling),接口值 ≠ K线算出的值 → 立即按 K 线为准并标注口径
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"# 全市场扫描:11000+ 信号 → 精简候选
curl -s -H "$AUTH" "$BASE/api/v1/selection/daily"
# 返回: {meta:{trade_date, total_signals, strategy_config}, market_state:{state,should_enter,position_advice}, candidates, industry_signals}
# candidates 每项: {symbol, name, score, industry, trend, buy_reason, warnings}
# 指定策略 / 指定日期 / 忽略 MA20 空仓保护
curl -s -H "$AUTH" "$BASE/api/v1/selection/daily?strategy=aggressive"
curl -s -H "$AUTH" "$BASE/api/v1/selection/daily?date=2026-08-14&ignore_ma20=true"
# 选股历史 / 做空候选(负分分析)
curl -s -H "$AUTH" "$BASE/api/v1/selection/history"
curl -s -H "$AUTH" "$BASE/api/v1/selection/negative"选股响应的 industry_signals 字段包含各行业强度信号(行业 Top1 分数均值、强行业数等):
| 信号 | 阈值 | 含义 |
|---|---|---|
industry_avg_top1 | ≥ 0.09 | 行业整体强度达标 |
strong_industry_count | ≥ 2 | 强行业(Top1≥0.10)数量足够 → 可入场 |
| 谨慎 | 强行业数不足 | 降低仓位预期 |
| 空仓观望 | 无强行业 | 不参与 |
板块热度交叉验证(页面版市场分析端点,见下三条):
curl -s -H "$AUTH" "$BASE/api/v1/market-analysis/money-flow/period?period=5d&dimension=sector&category=shenwan&limit=25"
curl -s -H "$AUTH" "$BASE/api/v1/market-analysis/heatmap?trade_date=2026-08-14"
curl -s -H "$AUTH" "$BASE/api/v1/market-analysis/tags/by-tag?tag=半导体"用户要求"分析/深度分析"某股票时,按 REFERENCES/quantdb-full-analysis-design.md 的 9 层框架执行(L0 市场 → L1 估值 → L2 财务 → L3 技术 → L4 资金筹码 → L4b 订单微结构截面 → L5 行业 → L6 模型 → L7 新闻七维)。 每层必须有具体数值、必须展示计算公式,不做泛泛之谈。输出格式见第 7 节研报模板。
⚡ 跑全流程先读
REFERENCES/stock-9layer-runbook.md(端到端操作手册):一键取数scripts/stock_9layer_fetch.py {code}→ 九层判读模板 → 跨层合成 → 报告落盘命令 → 双案例校准(法拉电子/振华科技)→ 红线清单。设计原则看 design doc,执行标准看 runbook。
两个特化子方法(2026-08 集成):
- L4b 订单微结构:按《L2 微观结构因子系统化分析报告》判 IC 方向 + 计算个股 vs 全市场截面分位。铁律:VPIN 族是正 IC(高位偏多,别当毒性利空)、vol_persistence/toxicity_persistence 是负 IC(高位偏空)、L2 是 T+5/T+10 持续信号(看状态分位而非单日变化)。
- L7 新闻七维:按 [[news-sentiment-research]] +
docs/news_sentiment_deep_report.md§13 做三步纵深——①直接消息判定(无则明写)→ ②相关行业归类(禁止冒充个股消息)→ ③21 条规律对照打分(来源/时段/多篇/首日动量/反转/标签/板块)→ 输出明确新闻面结论。
# ① 全维度特征(估值/技术/动量/波动/流动性/资金流/风格/行业/筹码/概念/微观结构/情绪)
# 注意:单股特征走 symbols/features(POST,body.symbols 数组;返回 data.items[] 快照)。
# API 已换算单位(市值→亿元、flow*→百万元、totalMv→亿元),引用时注明
curl -s -X POST -H "$AUTH" -H "$CT" "$BASE/api/v1/research/symbols/features" \
-d '{"symbols":["600519.SH"]}'
# ② K线(120 日,不复权价 + adj_factor)
curl -s -H "$AUTH" "$BASE/api/v1/research/kline/600519.SH?days=120"
# 多市场 K 线(A-HK-US,daily;A股 QuantDB 本地 parquet 优先)
curl -s -H "$AUTH" "$BASE/api/v1/market/kline?symbol=600519.SH&market=A&period=daily&days=120"
# ③ 模型信号(按 model_id 逐个拉,多模型共识;详见 3.7)
curl -s -H "$AUTH" "$BASE/api/v1/models" # 用户模型列表(items[],含 id/metadata/is_default)
curl -s -H "$AUTH" "$BASE/api/v1/models/inference/stock/600519.SH/history?days=180"
curl -s -H "$AUTH" "$BASE/api/v1/models/inference/stock/600519.SH/history?days=180&model_id=xxx"
# ④ 风险初筛(无独立风险评分端点,用①特征 + ②K线本地判读后填§7.1 风险提示表;
# 策略级回测风险走 [[backtest-center]] §6 /qlib/risk/{backtest_id}/metrics)
# 本地看:估值分位(pe/pb vs 行业)、波动(volStd20)、流动性(金额/换手)、质押/商誉(财务层)、veto 项(ST/*ST/次新/长期停牌直接否决)
# ⑤ 大盘环境(L0,先于一切)
curl -s -H "$AUTH" "$BASE/api/v1/selection/daily" # market_state 牛熊+仓位建议
curl -s -H "$AUTH" "$BASE/api/v1/market/index-kline?symbol=000001.SH&days=60"
curl -s -H "$AUTH" "$BASE/api/v1/market/overview" # 多市场指数概览
# ⑥ 订单微结构截面分位(L4b,2026-08 新增;先确认最新分区)
docker exec quantmind ls /data/quantdb/6_ml_datasets/l2_factors/ | tail -1 # → dt=YYYYMMDD
docker exec quantmind python3 - <<'EOF'
import duckdb, pandas as pd
dt = "YYYYMMDD" # 上一步最新分区
mkt = duckdb.connect().execute(f"SELECT * FROM read_parquet('/data/quantdb/6_ml_datasets/l2_factors/dt={dt}/data.parquet')").df()
s = mkt[mkt.symbol == "600519.SH"].iloc[0]
for f in ["vol_persistence","micro_vpin_vol_ratio","flow_buy_amount","flow_sell_amount",
"micro_toxicity_persistence","flow_order_duration_p90","flow_cancel_lifetime",
"flow_order_arrival_rate","micro_trade_interval_mean","vol_tick_density","vol_realized_jump",
"micro_vpin_50","micro_vpin_ma_20","vol_realized_rrv"]:
print(f, round(float(s[f]),4), f"{round(100*(mkt[f].astype(float)<float(s[f])).mean(),1)}%")
# 判读:负IC族(v_persist/toxicity_persist/flow_buy/sell/order_arrival/tick_density/realized_jump)≥70%高位=利空;
# 正IC族(vpin_vol_ratio/order_duration/cancel_lifetime/trade_interval_mean/vpin_50/ma_20)≤40%低位=缺资金
EOF
# ⑦ 新闻三步纵深(L7,方法论见 docs/news_sentiment_deep_report.md §13)
# ①直接消息:Huntly 库按标题/正文搜 {名称}/{代码}(窗口 T-2~T);②相关行业归类;③21 条规律对照
curl -s -H "$AUTH" "$BASE/api/v1/news/articles?tickers=600519&industries=白酒&limit=30&strong_only=true"
curl -s -H "$AUTH" "$BASE/api/v1/news/articles?tickers=600519&sort=sentiment_bullish&limit=10"财务数据在 parquet(单位=元,季频),symbols/features 快照拿不到, 必须 docker exec 直读:
docker exec quantmind python3 - <<'EOF'
import pandas as pd
base = "/data/quantdb/3_financial_data"
code = "600519.SH"
inc = pd.read_parquet(f"{base}/income/{code}.parquet") # 利润表(元)
bal = pd.read_parquet(f"{base}/balance/{code}.parquet") # 资产负债表(元)
cf = pd.read_parquet(f"{base}/cashflow/{code}.parquet") # 现金流量表(元)
ps = pd.read_parquet(f"{base}/pershare_index/{code}.parquet")# 每股指标(ROE 直接可用)
dv = pd.read_parquet(f"{base}/dividend_factors/{code}.parquet")
hn = pd.read_parquet(f"{base}/holder_num/{code}.parquet")
# 最新 8 期趋势(每期 m_timetag=YYYYMMDD)
for df in (inc, bal, cf, ps):
print(df.tail(8)[["m_timetag"] + [c for c in df.columns if c in (
"revenue","net_profit_incl_min_int_inc","net_cash_flows_oper_act","s_fa_eps_basic",
"s_fa_bps","s_fa_ocfps","equity_roe","net_roe","sales_gross_profit",
"inc_net_profit_rate","inventory_turnover","goodwill","tot_assets","tot_liab",
"account_receivable","inventories","tot_shrhldr_eqy_excl_min_int")]])
print(hn.tail(4)[["endDate","shareholder"]]) # 股东户数(户)
print(dv.tail(4)[["time","interest"]]) # interest=每10股派息(元),每股股息=interest/10
EOF指标公式(全部写死在报告里,禁止心算):
m_timetag - 10000)sales_gross_profit(%);净利率 = inc_net_profit_rate(%)cf.net_cash_flows_oper_act / inc.net_profit_incl_min_int_inc,连续 2 期 < 1 → 红牌equity_roe(%);股息率 = interest/10/close(不复权)×100,与 valuation.dividend_rate 互验docker exec quantmind python3 - <<'EOF'
import pandas as pd, glob
# 拉近 5 年 valuation 序列算历史分位(Hive 分区 dt=YYYYMMDD/data.parquet)
files = sorted(glob.glob("/data/quantdb/5_technical_derived/valuation/dt=*/data.parquet"))[-1260:]
rows = []
for f in files:
df = pd.read_parquet(f, columns=["symbol","time","pe_ttm","pb","ps_ttm","dividend_rate","total_mv","float_mv"])
r = df[df.symbol == "600519.SH"]
if len(r): rows.append(r.iloc[0])
v = pd.DataFrame(rows).sort_values("time").dropna(subset=["pe_ttm"])
cur = v.iloc[-1]
print("当前 PE %.2f 处于近5年 %.0f%% 分位(%d 个交易日)" % (cur.pe_ttm, (v.pe_ttm <= cur.pe_ttm).mean()*100, len(v)))
print("PB %.2f 分位 %.0f%%,股息率 %.3f%%" % (cur.pb, (v.pb <= cur.pb).mean()*100, cur.dividend_rate))
print("总市值 %.0f 亿元 / 流通市值 %.0f 亿元" % (cur.total_mv/1e8, cur.float_mv/1e8))
EOFind_relative_pe(<1 = 相对行业折价,从 symbols/features 快照的 industry 类取)PE 23.1x = 近 5 年 18% 分位,行业相对 0.72 → 估值不构成风险vol_atr_14(元)、vol_std_60(%,technical 口径)、beta_20(高 beta = 大盘放大镜,L0 结论加重)vol_to_ma5/20(量比)、volume_trend_3d(放量上涨 vs 缩量反弹)flowSuperNet(超大单)/flowLargeNet(大单)/flowMediumNet/flowSmallNet——三口径同向才可信;parquet 原值是元(差 1e6)flowNetAmount + flowNetRatio(净流入占成交比)chipProfitRatio20/60(获利盘%)、chipConcentration20、chipPeakDistance、chipProfitDelta5(5日获利盘变化——散户接盘还是主力吸筹)docker exec quantmind python3 - <<'EOF'
import pandas as pd, glob
files = sorted(glob.glob("/data/quantdb/2_base_sector/margin_trading/dt=*/data.parquet"))[-30:]
rows = []
for f in files:
df = pd.read_parquet(f, columns=["symbol","time","finance_balance","finance_buy","finance_repay","finance_net","slo_volume","slo_net"])
r = df[df.symbol == "600519.SH"]
if len(r): rows.append(r.iloc[0])
m = pd.DataFrame(rows).sort_values("time")
cur = m.iloc[-1]
print("融资余额 %.1f 亿元(近30日 %+.1f%%)" % (cur.finance_balance/1e4, (cur.finance_balance/m.iloc[0].finance_balance-1)*100))
print("近30日融资净买入累计 %.1f 万元,融券净卖出 %.0f 股" % (m.finance_net.tail(20).sum(), m.slo_net.tail(20).sum()))
EOFindStrength20/60、indRotationSpeed20、indCrowding20(拥挤度——太热警惕)、indBreadthUp20、indNetflowRank20、indRelativePeconceptHotScore、conceptMomentumTop3、conceptLeaderScore、conceptCrowdingMax/api/v1/models 拉用户模型列表(items[],字段 id + is_default);/api/v1/inference/models(engine 直连)拉系统模型(字段 model_id)model_id 逐个拉 history——不同模型是独立视角(不同训练期/周期 T3/T10/T15/融合)signal_side(BUY/HOLD/SELL)+ score_rank(当天批次内截面排名,越小越靠前)并列引用curl -s -H "$AUTH" "$BASE/api/v1/news/articles?tickers=600519&limit=30"
curl -s -H "$AUTH" "$BASE/api/v1/news/articles?tickers=600519&industries=白酒&strong_only=true"
curl -s -H "$AUTH" "$BASE/api/v1/news/articles?tickers=600519&sort=sentiment_bullish&limit=10"sentiment=bullish|bearish|neutral 分类统计;event_tags 事件标签(并购/财报/解禁/政策)[数据缺失];禁止编造新闻。价值排序:政策 > 公司重大事件 > 行业动态 > 分析师观点 > 市场情绪文curl -s -H "$AUTH" "$BASE/api/v1/admin/data-platform/quantdb/catalog"
curl -s -H "$AUTH" "$BASE/api/v1/admin/data-platform/quantdb/preview?dataset=l1_factors&limit=5"| 分析主题 | 用到的 QuantDB 字段 |
|---|---|
| 动量挖掘 | mom_ret_5d/20d/60d, mom_ma_gap_*, mom_rsi_* |
| 波动率掘金 | vol_std_*, vol_atr_14, vol_parkinson_*, vol_gk_20 |
| 流动性异常 | liq_volume_ratio_5/20, liq_obv_20, liq_mfi_14 |
| 资金流异动 | flow_net_*, flow_large_net, flow_money_flow_index(⚠️ l2 停更 20260227) |
| 筹码集中 | chip_profit_ratio_*, chip_concentration_20, chip_peak_distance |
| 行业强度 | ind_strength_20/60, ind_rotation_speed_20, ind_crowding_20 |
| 概念热度 | concept_hot_score, concept_momentum_top3, concept_leader_score |
| 微观结构 | micro_vpin_*, micro_pin, micro_order_flow_toxicity, micro_kyle_lambda |
curl -s -H "$AUTH" "$BASE/api/v1/selection/daily" -o /tmp/selection.json
python3 <<'EOF'
import json, csv
d = json.load(open('/tmp/selection.json'))
meta = d.get('meta', {}); ms = d.get('market_state', {})
cands = d.get('candidates', [])
with open('/tmp/selection.csv', 'w', newline='', encoding='utf-8-sig') as f:
w = csv.writer(f)
w.writerow(['代码','名称','分数','行业','趋势','买入理由'])
for c in cands:
w.writerow([c.get('symbol'), c.get('name'), round(c.get('score',0),4), c.get('industry'), c.get('trend'), c.get('buy_reason')])
print(f'导出 {len(cands)} 只选股 → /tmp/selection.csv(交易日 {meta.get("trade_date")},市场状态 {ms.get("state")})')
EOFcurl -s -X POST -H "$AUTH" -H "$CT" "$BASE/api/v1/research/symbols/features" \
-d '{"symbols":["600519.SH"]}' -o /tmp/stock_features.json
python3 <<'EOF'
import json
d = json.load(open('/tmp/stock_features.json')).get('data', {})
snap = (d.get('items') or [d])[0] # 快照:嵌套分类 {类: {字段: 值}} 或扁平字段
rows = []
for cat, fields in snap.items():
if isinstance(fields, dict):
for k, v in fields.items():
rows.append([cat, k, v])
elif cat not in ('code', 'symbol'):
rows.append(['base', cat, fields])
with open('/tmp/stock_features.csv', 'w', newline='', encoding='utf-8-sig') as f:
w = csv.writer(f)
w.writerow(['类别','字段','值'])
for r in rows: w.writerow(r)
print(f'导出 {len(rows)} 个字段 → /tmp/stock_features.csv(API 已换算:市值=亿元、flow=百万元)')
EOFcurl -s -X POST -H "$AUTH" -H "$CT" "$BASE/api/v1/research/batch-features" \
-d '{"symbols":["600519.SH","000858.SZ","601318.SH"],"fields":["pe","pb","roe","totalMv","momRet20d","volStd20","mainFlow"]}' \
-o /tmp/batch_features.json
python3 <<'EOF'
import json, csv
d = json.load(open('/tmp/batch_features.json')).get('data', {}).get('items', [])
with open('/tmp/stock_compare.csv', 'w', newline='', encoding='utf-8-sig') as f:
w = csv.writer(f)
if d:
w.writerow(['代码'] + list(d[0].get('values', {}).keys()))
for it in d:
w.writerow([it.get('symbol')] + list(it.get('values', {}).values()))
print(f'导出 {len(d)} 只股票对比 → /tmp/stock_compare.csv')
EOFcurl -s -X POST -H "$AUTH" -H "$CT" "$BASE/api/v1/research/batch-features" \
-d '{"symbols":["600519.SH","000858.SZ","601318.SH"],"fields":["pe","pb","roe","totalMv","momRet20d","volStd20","mainFlow"]}' \
-o /tmp/risk_fields.json
python3 <<'EOF'
import json, csv
d = json.load(open('/tmp/risk_fields.json')).get('data', {}).get('items', [])
with open('/tmp/risk_fields.csv', 'w', newline='', encoding='utf-8-sig') as f:
w = csv.writer(f)
if d:
w.writerow(['代码'] + list(d[0].get('values', {}).keys()))
for it in d:
w.writerow([it.get('symbol')] + list(it.get('values', {}).values()))
print(f'导出 {len(d)} 只风险字段 → /tmp/risk_fields.csv(评分按§7.1 风险提示表人工/模型判读,不虚构端点)')
EOF# 某次推理批次的候选池(含各股行业/概念/指数/分数)
curl -s -H "$AUTH" "$BASE/api/v1/research/overview?limit=100"
# 指定 run 的全池数据(筛选/排序需要全池)
curl -s -H "$AUTH" "$BASE/api/v1/research/universe?run_id=run_20260805_xxx&limit=2000"输出报告时必须采用以下结构。Markdown 表格承载所有数据, 每个表格列名带单位,每个计算指标在下方用小字注明公式与数据来源。
# {股票名}({代码})深度分析报告
> **报告日期**:{YYYY-MM-DD} **数据截至**:{最新交易日,注明各数据集实际日期}
> **分析框架**:市场环境 → 基本面 → 估值 → 技术 → 资金筹码 → 行业 → 模型 → 舆情
> **免责声明**:本报告由 AI 自动生成,仅供研究参考,不构成投资建议。
## 一、投资要点(3-5 条,每条 ≤ 1 行,多空都写)
## 二、核心结论
| 维度 | 评级 | 核心依据(带数值) |
|---|---|---|
| 市场环境 | 中性/偏多/偏空 | 上证 3927 vs MA20 3890,建议仓位 40% |
| 基本面 | 优秀/良好/一般/恶化 | 单季营收 +12.3%,现金流/净利润 1.15 |
| 估值 | 低估/合理/高估 | PE 23.1x = 近5年 18% 分位 |
| 技术面 | 多头/空头/震荡 | 收盘站上 MA20/60,MACD 金叉后柱状放大 |
| 资金面 | 流入/流出/分歧 | 近5日大单净流入 +2.1 亿元 |
| 综合评级 | 买入/增持/中性/减持 | 好公司 + 好价格 + 时机待确认 |
## 三、公司概况与业务透视
(名称、代码、申万行业、上市日期、总市值/流通市值、两融标的与否)
## 四、财务分析(最近 8 个报告期表格 + 趋势解读)
| 报告期 | 营收(亿元) | 单季同比% | 归母净利(亿元) | 毛利率% | 净利率% | ROE% | EPS(元) | 经营现金流(亿元) |
|---|---|---|---|---|---|---|---|---|
(每个 % 值注明:毛利=利润表 sales_gross_profit,同比=本期/去年同期−1,现金流/净利=利润质量)
## 五、估值分析
| 指标 | 当前值 | 近5年分位 | 行业相对 | 判断 |
|---|---|---|---|---|
| PE(TTM) | 23.1x | 18% | 0.72 | 低估 |
| PB | … | … | — | … |
| 股息率 | 0.39% | … | — | … |
## 六、技术分析
(趋势/动能/波动/量价分层 + 关键支撑压力位 + 各指标当前值与判断依据)
## 七、资金面与筹码
(超大单/大单/散户三口径 + 近5日/20日趋势 + 融资融券 + 获利盘 + 派发/吸筹判断)
## 八、行业与概念
(行业强度/拥挤度/资金流排名 + 共振/逆势/掉队分类 + 概念热度)
## 九、AI 模型信号
| 模型 | 周期 | 最新分数 | 180日趋势 | 信号 | 排名 |
|---|---|---|---|---|---|
(共识度 + 与量价背离说明)
## 十、多空证据对照
| 层 | 多方证据 | 空方证据 |
|---|---|---|
(每格带数值,无证据写「—」)
## 十一、风险提示(按严重度排序)
1. **{风险}**:{触发条件 + 影响 + 监测指标}
## 十二、操作建议
| 持仓状态 | 建议 | 触发条件 |
|---|---|---|
| 未持仓 | 等待回踩 62 元或模型转 BUY | 放量突破 68 元可追 |
| 已持仓 | 持有,止损 58 元 | 跌破 MA60 或大单连续 3 日流出减仓 |股息率 = 每10股派息 0.98 ÷ 10 ÷ 不复权收盘 66.19 × 100 = 0.148%[API]、parquet 直读标 [parquet]、模型信号标 [模型]、新闻标 [新闻];缺失标 [数据缺失](注明缺的是哪个数据集)报告生成后必须写入股票报告目录(前端「股票报告」页展示的就是这里):
data/reports/stock_reports/{市场名}/{股票名}/{股票名}{代码}_{日期}_投研分析报告.{md,pdf}
例:data/reports/stock_reports/A股市场/工业富联/工业富联601138_2026-08-16_投研分析报告.mdA股市场(无空格)/ 美股市场 / 港股市场 / 区块链市场 / 期货市场{股票名}{代码}_{YYYY-MM-DD}_投研分析报告,前端按此解析股票名/代码/日期docker cp /tmp/report.md quantmind:/tmp/report.md
docker exec quantmind bash -lc "cd /app && python3 backend/scripts/md_to_pdf_report.py /tmp/report.md /tmp/report.pdf"
docker cp quantmind:/tmp/report.pdf /tmp/report.pdfdata/reports/stock_reports/ 的目录 owner 是容器内 root,宿主机直接 cp md 会 EACCES——必须走 docker cp(容器内路径 /data/reports/stock_reports/...,宿主机的 ./db 挂载到容器 /app/db):docker cp /tmp/report.md quantmind:/data/reports/stock_reports/A股市场/{股票名}/{股票名}{代码}_{日期}_投研分析报告.md
docker cp /tmp/report.pdf quantmind:/data/reports/stock_reports/A股市场/{股票名}/{股票名}{代码}_{日期}_投研分析报告.pdfbackend/scripts/md_to_pdf_report.py 已按券商研报风格输出,报告沿用即可:
> **报告日期**/ **数据截至** blockquote 行)>):米色金边提示框;分隔线(---):金色细线| 级别 | 用时 | 内容 |
|---|---|---|
| 快速体检 | 1-2 min | L0 市场 + 估值 + 技术 + 默认模型 + 风险卡,输出核心结论表 |
| 标准分析 | 3-5 min | 全部 9 层 + 财务 4 期 + 估值分位 + 多模型 + L4b 截面分位 + L7 三步纵深简版 + 完整研报模板 |
| 深度尽调 | 10+ min | 标准分析 + 财务 8 期三表 + 5 年估值分位 + 全模型逐拉 + 融资融券 30 日 + 股东户数趋势 + 分红历史 + L4b 全因子截面 + L7 21 条规律对照全量 + 多空证据对照 + 情景推演(目标价区间) |
scripts/L2_微观结构因子系统化分析报告.md(211 因子 IC 方向 + 截面分位框架,本技能 L4b 层的底座)| 现象 | 处理 |
|---|---|
| 选股 candidates 空 | 检查 total_signals 与 market_state(MA20 空仓保护),或 ignore_ma20=true |
| 个股特征空 | 确认 symbol 格式(600519.SH),用 /research/batch-features 批量试 |
| 财务/融资融券数据拿不到 | 这些不在 API 里,必须 docker exec 直读 parquet(见 3.2/3.5) |
| l2 资金流字段全 NaN | l2 分区停更 20260227(厂商侧),明确标注数据缺失,勿编造 |
| 股息率两个值对不上 | valuation.dividend_rate 20260814 起切换百分数口径,跨日对比先 ×10 归一 |
| risk 接口 MA 与实际价差一个量级(如 ma5=147 vs 价 26) | 复权口径陷阱:接口曾混入后复权 features_daily 的 MA。必须先拉 /research/kline 用 pandas rolling 自算核对,以 K 线为准;20260817 起接口已改为前复权重算,但历史报告/旧缓存仍可能踩坑 |
| 市值/成交额数字离谱 | 单位错:API 市值=亿元、flow=百万元;parquet 市值=元;成交额永远是万元 |
| 导出乱码 | CSV 用 utf-8-sig 编码(已内置 BOM) |
© 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
SKILL.md and 2 other files (references) in skills/stock-market-analysis of qusong0627/QuantMind.
Open the folder on GitHubat commit 2e93d9a
Stock Market Analysis 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Stock Market Analysis this skillqusong0627/QuantMind | 1.7k | — | ~5.4k | Automated safety check: Pass | AGPL-3.0 | |
| Anti Gambling Tradermars-tw/anti-gambling-trader-tw | 907 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Data UpdateSixian-Li/plain-backtest | 204 | — | ~1.6k | Automated safety check: Pass | MIT | |
| Receipts To Expensesskrun-dev/skrun | 210 | — | ~1.1k | Automated safety check: Pass | MIT | |
| Officecli Data DashboardFerroxLabs/wayland | 608 | 4 repos | ~9.2k | Automated safety check: Pass | AGPL-3.0 | |
| Data Table Managern8n-io/n8n | 207k | — | ~2.3k | Automated safety check: Pass | Custom licence |
mars-tw/anti-gambling-trader-tw
分析台股 / 台股ETF / 台指期選擇權 / 美股 / 加密貨幣 / 外匯的交易紀錄 (CSV / JSON / Excel),用統計學判斷使用者的獲利是「可重複的優勢」還是 「運氣 + 倖存者偏差(賭博)」,不適合長期投資會明確勸退。內建反詐工具: 掃描群組對話的詐騙話術(scan-text)、檢驗老師宣稱的績效(guru-check)、…
Sixian-Li/plain-backtest
Operate and assess the Quant workspace market-data layer through the tested data-update CLI.
skrun-dev/skrun
Read a batch of receipt images directly via vision, classify each into expense categories, optionally reconcile against a bank statement CSV, and produce a multi-sheet Excel workbook + a PDF summary.
FerroxLabs/wayland
A skill your agent uses to build a multi-element Excel dashboard - Dashboard sheet on open, multiple formula-driven KPI cards, multiple charts, sparklines, and conditional formatting - from CSV or…
n8n-io/n8n
Load before calling data-tables or parse-file. An agent skill from n8n-io/n8n.
aws-samples/amazon-bedrock-agents-healthcare-lifesciences
Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV.
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.
qusong0627/QuantMind
Queries Futu quotes, options, fundamentals and accounts and places orders through the Futu OpenAPI Python SDK, defaulting to simulated trading.
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.
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.
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.
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.
Works with
Categories
股票市场深度数据分析与导出 — 全市场信号扫描、行业轮动、个股研报级深度分析(基本面/估值/技术/资金筹码/情绪/风险六维)、数据挖掘、CSV/Excel 导出。在 QuantBot / Claude Code 中分析股票市场、挖掘机会、导出分析数据、生成选股报告时使用。触发词:分析市场、数据分析、数据挖掘、全市场扫描、行业轮动、导出数据、导出CSV、挖掘机会、个股研报、个股分析、深度分析. Stock Market Analysis is an agent skill from qusong0627/QuantMind.
Stock Market Analysis fits situations like: tasks that involve Stock and market analysis; tasks that involve Excel spreadsheets; tasks that involve CSV and tabular files.
Run `npx skills add qusong0627/QuantMind --skill stock-market-analysis -a claude-code`. Or copy the skill folder (skills/stock-market-analysis in qusong0627/QuantMind) into .claude/skills/stock-market-analysis in your project. Claude Code loads it when a task matches its description.
Run `npx skills add qusong0627/QuantMind --skill stock-market-analysis -a codex`. Or copy the skill folder (skills/stock-market-analysis in qusong0627/QuantMind) into .agents/skills/stock-market-analysis in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add qusong0627/QuantMind --skill stock-market-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/stock-market-analysis, .gemini/skills/stock-market-analysis, .github/skills/stock-market-analysis and .opencode/skills/stock-market-analysis in your project.
Going by SKILL.md and its folder, Stock Market Analysis needs the command-line tools its instructions call (curl, docker and python3). Our summary lists: Python 3; Docker.
SKILL.md contains no URLs. Its commands use curl and docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
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.
Stock Market Analysis 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.
About 5.4k tokens (SKILL.md is roughly 22k 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 7.8k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Stock Market Analysis: Anti Gambling Trader (mars-tw/anti-gambling-trader-tw, 907 stars), Data Update (Sixian-Li/plain-backtest, 204 stars), Receipts To Expenses (skrun-dev/skrun, 210 stars) and Officecli Data Dashboard (FerroxLabs/wayland, 608 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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.