Skip to content

fix(paper): 科创板 689 号段模拟盘涨跌停按 ±20% - #486

Merged
shy3130 merged 1 commit into
shy3130:mainfrom
kevin9327:fix-paper-star-689
Oct 18, 2026
Merged

shy3130 merged 1 commit into
shy3130:mainfrom
kevin9327:fix-paper-star-689

Conversation

@kevin9327

Copy link
Copy Markdown
Contributor

问题

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 编码助手协助下完成,改动与测试均已本人审阅并在本地运行。

@shy3130
shy3130 force-pushed the fix-paper-star-689 branch from 2a3d04f to a767be6 Compare October 18, 2026 06:38
@shy3130
shy3130 merged commit dfbc316 into shy3130:main Oct 18, 2026
@shy3130

shy3130 commented Oct 18, 2026

Copy link
Copy Markdown
Owner

感谢提交,已合并进 main 🎉

描述的「全库只有 paper.py 这一处漏 689」经核实属实。limit_pct 与 #485 改了同一行,rebase 时已解冲突合成全集 ("300", "301", "302", "688", "689"),两个方向的用例都保留并通过(56 passed)。

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants