mirror of
https://github.com/shy3130/tick-stock-panel.git
synced 2026-11-02 10:26:13 +00:00
fix(paper): 科创板 689 号段模拟盘涨跌停按 ±20% (#486)
This commit is contained in:
@@ -307,12 +307,12 @@ def sell_fee(qty: int, price: float, commission_pct: float, stamp_tax_pct: float
|
||||
def limit_pct(symbol: str, asset_type: str) -> float:
|
||||
"""涨跌停幅度。V1 简化: ST 未识别 (无名称数据), 基金统一 10%。
|
||||
|
||||
股票: 创业板 300/301/302 与科创板 688 → 20%; 北交所 43/83/87/92 开头 → 30%; 其余 10%。
|
||||
股票: 创业板 300/301/302 与科创板 688/689 → 20%; 北交所 43/83/87/92 开头 → 30%; 其余 10%。
|
||||
"""
|
||||
if asset_type == "etf":
|
||||
return 0.10
|
||||
code = symbol.split(".")[0]
|
||||
if code.startswith(("300", "301", "302", "688")):
|
||||
if code.startswith(("300", "301", "302", "688", "689")):
|
||||
return 0.20
|
||||
if code.startswith(("43", "83", "87", "92")):
|
||||
return 0.30
|
||||
|
||||
@@ -688,3 +688,9 @@ def test_auto_order_events_shape(tmp_path):
|
||||
def test_limit_pct_chinext_302():
|
||||
# 创业板 302 号段 (2025-02-17 起的 302132.SZ 中航成飞) 为 ±20%
|
||||
assert paper.limit_pct("302132.SZ", "stock") == 0.20
|
||||
|
||||
|
||||
def test_limit_pct_star_689():
|
||||
# 科创板 689 号段 (存托凭证, 如 689009.SH 九号公司) 为 ±20%,
|
||||
# 与 price_limits.board_limit_pct 一致
|
||||
assert paper.limit_pct("689009.SH", "stock") == 0.20
|
||||
|
||||
Reference in New Issue
Block a user