Repository navigation
fix(price-limits): 创业板 302 号段按 ±20% 与创业板规则处理 - #485
Merged
Merged
Conversation
This was referenced Oct 17, 2026
Owner
|
感谢提交,已合并进 main 🎉 维护者验证:rebase 到最新 main 后全量回归 2805 个测试通过;把 另外我在合并后补了一处你这批 PR 之外的遗漏: |
This was referenced Oct 18, 2026
flyme8899
added a commit
to flyme8899/tick-stock-panel
that referenced
this pull request
Oct 18, 2026
) (#158) 同步上游 shy3130#485/shy3130#486/shy3130#488:创业板纳入 302,科创板纳入 689,涨跌停、板块筛选与前端标签共用同一号段口径。 Co-authored-by: Cursor Agent <[email protected]> Co-authored-by: flyme8899 <[email protected]>
yanbaobao010913
pushed a commit
to yanbaobao010913/tick-stock-panel
that referenced
this pull request
Oct 20, 2026
shy3130#485 修了创业板 302 但科创板分支仍只有 688; 689 (CDR 号段, 如 689009.SH) 在 price_limits/matrix/overview/paper 均已覆盖, 引擎 选股漏配 — 选「科创板」时 689 标的被静默排除。与 shy3130#488 口径对齐, 附板块过滤号段回归测试。 (cherry picked from commit f5ca4e1)
Dancetofigureoutyourshadow
pushed a commit
to Dancetofigureoutyourshadow/tick-stock-panel
that referenced
this pull request
Oct 20, 2026
(cherry picked from commit 7f02c04)
Dancetofigureoutyourshadow
pushed a commit
to Dancetofigureoutyourshadow/tick-stock-panel
that referenced
this pull request
Oct 20, 2026
shy3130#485 修了创业板 302 但科创板分支仍只有 688; 689 (CDR 号段, 如 689009.SH) 在 price_limits/matrix/overview/paper 均已覆盖, 引擎 选股漏配 — 选「科创板」时 689 标的被静默排除。与 shy3130#488 口径对齐, 附板块过滤号段回归测试。 (cherry picked from commit f5ca4e1)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
深交所创业板已启用 302 号段:中航电测(300114)完成重组后,自 2025-02-17 起证券代码变更为 302132.SZ(中航成飞),仍是创业板股票,涨跌幅 ±20%。
但项目里判断板块的前缀只认
300/301,302 开头的代码一律落到「主板 10%」分支:price_limits.board_limit_pct/price_limit_pct/polars_price_limit_pct:涨跌停价按 ±10% 计算,指标管线和回测里的涨停/跌停信号、可成交判断全部算错(302132 涨 15% 会被当成"超过涨停");price_limits.no_limit_window_days:302 号段新股的上市初期无涨跌幅窗口按主板注册制日期判定;strategy/paper.py::limit_pct:模拟盘的涨跌停价按 10% 卡单;strategy/engine.py选股「创业板」板块过滤漏掉 302;api/overview.py/services/market_overview_builder.py的_board把它归为「深主板」;_price_limit同样按 10%。修改
上述各处的创业板前缀统一加上
302,不改其它逻辑。测试
tests/test_price_limits.py::test_chinext_302_codes_use_growth_board_rules:price_limit_pct("302132.SZ", ...)与polars_price_limit_pct应为 0.20;tests/test_price_limits.py::test_chinext_302_no_limit_window_follows_gem_registration_date:2021 年上市的 302 新股应有 5 日无涨跌幅窗口;tests/test_paper_trading.py::test_limit_pct_chinext_302:模拟盘limit_pct("302132.SZ")应为 0.20。修改前三个用例均失败(得到 0.10 / 0),修改后通过。
tests/test_price_limits.py与tests/test_paper_trading.py全部 55 个用例通过;ruff 对改动文件的告警数与修改前一致(均为既有告警)。AI 辅助说明:本 PR 在 AI 编码助手协助下完成,改动与测试均已本人审阅并在本地运行。