Validates whether recent trading days' turnover (Shanghai + Shenzhen indices) is complete before review. Fills gaps using full_tick or optional history download.
Ships in qmt-trading-skill. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
实现状态:✅
index_turnover_recent.py·backfill_recent_index_kline.py
共享逻辑:_shared/market_turnover_util.py
在执行复盘前,校验近 N 日(默认 3)两市成交额是否齐全:
000001.SH399106.SZ(tick 缺 amount 时回退 399001.SZ)迅投知识库(指数数据):
| 场景 | 官方 API | 本项目复盘热路径 |
|---|---|---|
| 当日成交额 | get_full_tick → amount | ✅ GET /api/market/full_tick |
| 历史指数日 K | download_history_data + get_market_data_ex | ❌ 禁用(易 BSON 崩溃) |
| 历史缺口 | 需本地已下载数据 | ✅ reports/market_turnover_daily.json 每日 tick 累积 |
复盘/校验默认不调用 download_batch、get_local_data、get_market_data_ex、get_market_data。
可选 --try-history:先 download_batch 指数日线,再 get_market_data 子进程补历史并写入缓存(QMT 异常时慎用)。
推荐补齐近 3 日缺口(历史缺失时):
# 1. 下载指数日线(仅 3 只,勿全市场)
python -c "
from datetime import date, timedelta
import sys; sys.path.insert(0,'skills/_shared')
from common import load_env_files, make_client
import argparse
load_env_files()
c,_=make_client(argparse.Namespace(host='127.0.0.1',port=8080,api_key='test-auto',account_id=None),False)
e=date.today().strftime('%Y%m%d'); s=(date.today()-timedelta(days=12)).strftime('%Y%m%d')
print(c.download_batch(['000001.SH','399106.SZ','399001.SZ'], period='1d', start_time=s, end_time=e))
"
# 2. 读 amount 写入缓存并展示明细
python skills/qmt-bridge-kline-backfill/scripts/index_turnover_recent.py \
--host 127.0.0.1 --port 8080 --try-history
# 查看近3日上证+深证成交额明细(亿元)
python skills/qmt-bridge-kline-backfill/scripts/index_turnover_recent.py \
--host 127.0.0.1 --port 8080
# 查看近3日成交额明细;历史缺口加 --try-history
python skills/qmt-bridge-kline-backfill/scripts/index_turnover_recent.py \
--host 127.0.0.1 --port 8080
# 可选:尝试从本地 K 线补历史(慎用,优先用上一条)
python skills/qmt-bridge-kline-backfill/scripts/index_turnover_recent.py \
--try-history --host 127.0.0.1 --port 8080
# 兼容旧入口(同上逻辑)
python skills/qmt-bridge-kline-backfill/scripts/backfill_recent_index_kline.py --json
| 参数 | 说明 |
|---|---|
--days | 需要覆盖的最近交易日数量(默认 3) |
--try-history | 可选尝试 get_market_data 补历史(默认关闭) |
--json | 输出机器可读结果 |
ok=true:近 N 个交易日缓存/tick 均有沪+深成交额ok=false:列出缺失交易日;连续多日收盘复盘会自动写入缓存method:默认 full_tick+cache--try-historyWhat SKILL.md sets; muted values are Claude Code's defaults
/atorber-qmt-trading-skill:qmt-bridge-kline-backfillfrom qmt-trading-skill
Generated from the plugin's indexed repository (atorber/qmt-trading-skill) — no native marketplace selected
npx claudepluginhub p/atorber-qmt-trading-skill23 skills in this plugin
/qmt-bridge-convertible通过 QMT Bridge 查询可转债列表与条款信息,辅助转债双低、强赎等策略观察。 在用户提到可转债、转债、强赎、转股时使用。只读。/qmt-bridge-credit-margin通过 QMT Bridge 查询融资融券账户:担保品、可用保证金、信用相关交易端点。 在用户提到两融、融资融券、保证金、信用账户时使用。按需启用;写操作须确认。/qmt-bridge-daily-pnl通过 QMT Bridge 查看当日盈亏:结合当前持仓、昨仓与当日买卖成交计算,含已清仓标的。 在用户提到今日盈亏、当日收益、赚了多少、盘面盈亏时使用。只读。/qmt-bridge-etf通过 QMT Bridge 查询 ETF 列表、申赎清单与相关行情,辅助 ETF 投资与套利观察。 在用户提到 ETF、申赎、指数基金、ETF 套利时使用。只读。/qmt-bridge-event-calendar通过 QMT Bridge 查询交易日历、节假日、交易时段,并支持用户自定义的财报/持仓事件检查规程。 在用户提到是否交易日、节假日、交易时间、财报日、日历时使用。只读。/qmt-bridge-execution-review通过 QMT Bridge 生成当日交易复盘:客观证据(委托/成交/滑点/不操作基线/规则标签)+ Agent 层投顾/基金经理/交易员三角色专家评审与综合裁决。 在用户提到今日成交、交易复盘、今日操作评估、执行质量、三角色复盘、专家复盘、 不操作少赚多亏时使用。只读。Other plugins' skills for the same job