Repository navigation
fix(paper): 科创板 689 号段模拟盘涨跌停按 ±20% - #486
Merged
Merged
Conversation
shy3130
force-pushed
the
fix-paper-star-689
branch
from
October 18, 2026 06:38
2a3d04f to
a767be6
Compare
Owner
|
感谢提交,已合并进 main 🎉 描述的「全库只有 paper.py 这一处漏 689」经核实属实。 |
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]>
Dancetofigureoutyourshadow
pushed a commit
to Dancetofigureoutyourshadow/tick-stock-panel
that referenced
this pull request
Oct 20, 2026
(cherry picked from commit dfbc316)
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.
问题
strategy/paper.py::limit_pct的科创板前缀只有688,漏了 689 号段(科创板存托凭证,如 689009.SH 九号公司)。689 开头的股票落到最后的return 0.10,模拟盘按 ±10% 计算涨跌停价:价格涨 12% 的委托会被当成超过涨停价拒绝/卡价,与真实规则(±20%)不符。项目里的其它判断(
price_limits.board_limit_pct、polars_price_limit_pct、fuyao / tdxquant 的_price_limit、_board)都已经把689算作科创板,只有模拟盘这一处不一致。修改
limit_pct的 20% 前缀加上689,docstring 同步。测试
新增
tests/test_paper_trading.py::test_limit_pct_star_689:limit_pct("689009.SH", "stock")应为 0.20。修改前失败(得到 0.10),修改后通过;tests/test_paper_trading.py全部 35 个用例通过。(与 #485 独立:#485 处理创业板 302 号段,本 PR 只处理模拟盘的 689。两者改动同一行附近,先合并哪个另一个都只需简单 rebase。)
AI 辅助说明:本 PR 在 AI 编码助手协助下完成,改动与测试均已本人审阅并在本地运行。