Files
easy-tdx/examples/23_screen_strength/strength_cli.sh
T
Justin Gu f36e2d6a6c feat(screen): v1.15.0 — 强势股排名 + 修复证券类型识别与名称分批查询
新增:强势股排名(screen strength)
- 全市场按 5/20/60 日涨幅加权合成强势分,纯离线扫描
- 三种预设:steady(稳健)/breakout(妖股)/balanced(均衡)
- CLI: easy-tdx screen strength --preset steady --top 50 --table
- Web API: GET /api/v1/market/strength
- 支持自定义权重、成交额过滤、并发扫描

修复:
- _detect_security_type 代码段不全,ETF/基金/科创板/逆回购被误判为 A 股
- screen strength/rank 名称补齐超 80 只时末尾被丢弃(分批查询)

详见 CHANGELOG.md
2026-06-25 03:33:13 +08:00

79 lines
3.6 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# easy-tdx 强势股排名 — CLI 使用示例
#
# 前提:本地通达信 vipdoc/{sh,sz}/lday/*.day 已同步最新数据
# 可用 `easy-tdx offline sync` 同步
#
# 三种预设模式:
# steady — 中长期稳健(60日主导 + 波动率惩罚),选稳着涨的票
# breakout — 近期妖股爆发(5日主导,纯涨幅),选最猛的票
# balanced — 三周期均衡 + 波动率调整
#
# 用法:去掉命令前的 # 即可实际执行。
echo "================================================================"
echo "1. steady 模式 — 中长期稳健强势 Top 50(表格输出)"
echo "================================================================"
# easy-tdx screen strength --preset steady --top 50 --table
echo ""
echo "================================================================"
echo "2. breakout 模式 — 近期妖股爆发 Top 20(补齐股票名称)"
echo "================================================================"
# easy-tdx screen strength --preset breakout --top 20 --names --table
echo ""
echo "================================================================"
echo "3. balanced 模式 — 三周期均衡 Top 30"
echo "================================================================"
# easy-tdx screen strength --preset balanced --top 30 --table
echo ""
echo "================================================================"
echo "4. 自定义权重(自动归一化,5:3:2 = 0.5:0.3:0.2"
echo "================================================================"
# easy-tdx screen strength --w5 0.5 --w20 0.3 --w60 0.2 --top 30 --table
echo ""
echo "================================================================"
echo "5. 自定义权重 + 关闭波动率惩罚(纯加权涨幅)"
echo "================================================================"
# easy-tdx screen strength --w5 0.6 --w20 0.3 --w60 0.1 --no-vol-adjusted --top 20 --table
echo ""
echo "================================================================"
echo "6. 并发扫描(4 进程,速度提升约 4 倍)"
echo "================================================================"
# easy-tdx screen strength --preset steady --top 100 --workers 4 --table
echo ""
echo "================================================================"
echo "7. 过滤低流动性(最近 5 日日均成交额 ≥ 5000 万)"
echo "================================================================"
# easy-tdx screen strength --preset breakout --top 30 --min-amount 50000000 --table
echo ""
echo "================================================================"
echo "8. 缩小范围(仅深圳)+ 输出到 JSON 文件"
echo "================================================================"
# easy-tdx screen strength --universe sz --top 30 --output sz_strength.json
echo ""
echo "================================================================"
echo "9. 仅上海 + 最小上市天数 120 日(过滤次新股)"
echo "================================================================"
# easy-tdx screen strength --universe sh --min-listed-days 120 --top 30 --table
echo ""
echo "================================================================"
echo "10. 对比三种预设(同一批股票,不同视角)"
echo "================================================================"
echo "--- steady(稳健)---"
# easy-tdx screen strength --preset steady --top 10 --table
echo ""
echo "--- breakout(妖股)---"
# easy-tdx screen strength --preset breakout --top 10 --table
echo ""
echo "--- balanced(均衡)---"
# easy-tdx screen strength --preset balanced --top 10 --table