safe-stock-grid
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "safe-stock-grid" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-0d39f6e6a9cda92b264a8b651057512496bf537eb373bae3987dcae950438859. Verify the upstream source and version against https://skillhub.cn/skills/user_c1ee5550/safe-stock-grid before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
High-margin stock filtering and T+1 grid parameter optimization: filters stocks that are very unlikely to be delisted and suitable for T+1 grid trading, and optimizes grid parameters for scenarios such as base-position+grid, high-dividend grids, and bank-stock or blue-chip grids. Triggered when users mention phrases like “low delisting risk,” “high margin of safety,” “stocks that won’t be delisted,” “stocks suitable for grid,” “base+grid,” “high-dividend grid,” “bank-stock grid,” or request stocks that are almost never delisted and suitable for grid trading. Note: not applicable to T0 instruments such as ETFs/convertible bonds (use grid-optimizer T0 mode) and not intended for pure fundamental analysis or market timing.
Introduction source: third_party · user_c1ee5550 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: safe-stock-grid
slug: safe-stock-grid
version: "1.0.0"
displayName: Safe Stock Grid
description: 高安全边际个股筛选与T+1网格参数优化。当用户提到"退市风险低"、"安全边际高"、"不会退市的股票"、"适合网格的股票"、"底仓+网格"、"高股息网格"、"银行股网格"、"蓝筹网格",或要求筛选几乎不会退市且适合网格交易的个股时触发。不适用于ETF/可转债等T0品种的网格优化(应使用grid-optimizer技能的T0模式),也不适用于纯基本面分析或择时预测。Safe Stock Grid — 永不退市·高安全边际·底仓+网格
概述
帮助用户找到"几乎不会退市 + 极高安全边际 + 适合网格交易"的个股,输出T+1适配的网格参数 + 综合收益测算。
v4更新:直接使用grid-optimizer的--mode t1原生T+1模式,无需手动适配。
筛选标准:
- 退市风险极低:央企/行业龙头、万亿级市值、国有资产背景、行业刚需永续
- 安全边际极高:PE < 8、PB < 1(破净或接近)、股息率 > 5%
- 网格适配:日均振幅 > 1.2%、日均成交 > 3亿
你的工作方式:
- 搜清单 + 定性筛选:搜索符合标准的股票名单
- 数据验证:拉取各候选标的的实时行情(股价/PE/PB/股息率/成交额)
- K线分析:拉取250日K线数据,用grid-optimizer脚本T+1模式计算振幅统计
- 参数优化:运行grid-optimizer脚本
--mode t1,脚本自动适配T+1逻辑 - 综合收益输出:脚本自动叠加股息率,输出"网格收益+股息"综合年化
Phase 1:候选标的库建立
步骤
- 搜索候选名单:搜索符合条件的股票(关键词:"不会退市 高股息 低PE 央企 A股"、"高安全边际 适合网格 蓝筹"等)
- 构建候选池:聚焦以下永续行业:
- 🏦 国有大行/股份行(几乎不可能退市,PE普遍<7,股息5%+)
- ⛏️ 能源央企(中国神华、陕西煤业等,股息6-10%)
- ⚡ 公用事业(长江电力、中国移动等,垄断永续经营)
- 🏭 制造业龙头(格力电器、中国建筑等,PE<8、深度破净)
- 🏛️ 保险巨头(中国平安等,PE历史低位)
- 拉取实时行情:用
tdx_quotes获取每个候选标的的关键指标:- 当前价、昨收价、涨跌停价
- PE(静态+TTM)、PB、股息率
- 日均成交额、总市值
- 所属行业、是否沪深300成分股
- 打分排序:按以下维度加权评分:
- 安全边际(权重35%):PE越低越好,PB<1加分
- 股息率(权重25%):>5%为佳
- 流动性(权重20%):日均成交>5亿为佳
- 波动适配(权重20%):振幅1.2%-3%为最佳网格区间
输出格式
排名 | 代码 | 名称 | 行业 | 现价 | PE | PB | 股息率 | 日均成交 | 退市风险 | 网格适配度
标记出Top 3推荐并说明理由。
Phase 2:精选标的K线数据采集
步骤
- 用户确认后,对精选标的进行深度分析
- 拉取250日K线:用
tdx_kline分批拉取(25根/批,10个并行API调用),参数period="4"(日线),tqFlag="0"(不复权) - 写入CSV:格式
日期,开盘,最高,最低,收盘,无表头 - 获取实时行情:确认当前价、昨收、涨跌停价
- 确认股息率和资金量:获取最新股息率(TTM)和用户可用资金
Phase 3:运行grid-optimizer脚本(T+1原生模式)
步骤
- 依赖脚本路径:
/sandbox/workspace/skills/grid-optimizer/scripts/grid_optimizer.py - 调用方式(注意
--mode t1):python3 skills/grid-optimizer/scripts/grid_optimizer.py \ --mode t1 \ --data <K线CSV路径> --code <股票代码> \ --current-price <最新价> --yesterday-close <昨收价> \ --limit-up <涨停价> --limit-down <跌停价> \ --cost 0.05 --tick-size 0.01 \ --dividend-yield <股息率> \ --capital <总资金> --base-position-pct 60 \ --mc-trials 200 --sim-days 250 - 关键参数说明:
--mode t1:启用T+1原生模式(简单价格触发,间距2-5%自适应)--tick-size 0.01:A股个股最小变动价位--dividend-yield:年股息率%,脚本自动叠加到综合年化收益--capital:总资金,提供时输出仓位管理方案(底仓+网格资金分配)--base-position-pct:底仓占比%(默认60%)
- 脚本自动完成(无需手动适配):
- T+1网格引擎:简单价格触发(价格上穿→卖出底仓,价格下穿→买入加仓)
- 自适应搜索范围:根据日均振幅自动计算2-5%间距区间
- 仓位管理:底仓股数 + 每层买卖股数 + 资金分配
- 综合收益:网格差价年化 + 股息年化 = 综合资金年化收益率
- 风险指标:最大回撤纳入评分
- 波动率聚集:AR(1)模型模拟趋势行情
Phase 4:解读输出与T+1实操指导
脚本输出要点
- 振幅统计:确认该标的日均振幅是否适合网格(>1.2%为佳)
- 推荐方案:方案A(综合最优)和方案B(对称最优)的上涨/下跌触发%
- 综合年化收益:网格年化 + 股息年化 = 综合年化
- 仓位管理方案:底仓股数、网格资金、每层股数
- 同花顺设置指南:价格上破/下破条件单的具体设置
T+1实操要点(向用户强调)
- 底仓优先:先建好底仓(60-70%资金),再设网格条件单
- 分批建仓:建议分3-5天完成底仓建仓,避免买在短期高点
- T+1约束:当日买入的份额不能当日卖出,只能卖出底仓份额
- 隔夜风险:间距≥2%设计为覆盖隔夜跳空,不要缩小到T0的0.3-0.5%
- 股息再投:分红日可手动调整基准价
- 止损纪律:标的跌超10%暂停网格,等企稳再重启
多轮修改
用户可以调整以下参数重新运行:
- 候选池范围:缩小到特定行业(如只看银行股)
- 评分权重:更看重股息率还是波动率
- 网格间距偏好:通过调整
--vol-persistence影响MC模拟 - 底仓比例:
--base-position-pct 50(保守)到70(激进) - 波动率聚集:
--vol-persistence 0(震荡市)到0.95(趋势市)
工作流示例
示例1:从零推荐
用户:"帮我找几乎不会退市的股票,适合网格交易的"
- Phase 1:搜索候选、拉取行情、打分排序,输出Top 8候选表
- 用户选择兴业银行 → Phase 2:拉250日K线,确认股息率5.9%、资金4.56万
- Phase 3:
--mode t1 --dividend-yield 5.9 --capital 45600 --base-position-pct 60 - Phase 4:解读综合年化收益、仓位方案、同花顺设置
示例2:已有标的要求优化
用户:"帮我看看工商银行适不适合网格交易"
- Phase 1:确认符合安全边际标准(PE<7、股息4.9%)
- Phase 2:拉取250日K线
- Phase 3:
--mode t1 --dividend-yield 4.9 --capital <用户资金> - Phase 4:给出工商银行专属T+1网格参数和综合收益测算
资源目录
scripts/
本技能无独立脚本,复用 skills/grid-optimizer/scripts/grid_optimizer.py(v4,原生支持T+1模式)
references/
(可选)放置行业股息率历史数据、A股退市统计等参考资料
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决用户高安全边际个股筛选与T+1网格参数优化的实际交易痛点
- 逻辑闭环完整,覆盖从候选筛选到实操指导全流程
- 明确排除不适用场景,提升工具精准度
Highlights
- 触发词覆盖全面且边界清晰(如'退市风险低''底仓+网格'等)
- 明确区分T+1与T0品种,避免误触发
Areas to improve
-
description写错位置 Reported severity: Minor
顶层frontmatter中description为空,实际描述内容位于skill_body内部
Recommendation: 将description内容移至顶层frontmatter字段,保持规范一致性
Highlights
- Phase划分清晰,含端到端示例与多轮修改机制
- frontmatter完整,参数说明详尽
Areas to improve
-
缺少When to Use显式章节 Reported severity: Minor
文档未设置显式When to Use章节,但触发词已在description中覆盖
Recommendation: 建议在概述后增加When to Use小节,进一步提升可读性
Highlights
- 依赖脚本路径明确,参数正确(--mode t1适配T+1)
- 覆盖主要异常场景(振幅、流动性、隔夜风险)
- 强调实操纪律与止损机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.