Improve jq microcap execution semantics

This commit is contained in:
boris
2026-04-18 18:02:50 +08:00
parent 9f4165e689
commit 0e2c25e4c4
26 changed files with 5058 additions and 362 deletions

View File

@@ -0,0 +1,21 @@
聚宽原始脚本 `/Users/boris/WorkSpace/fidc-backtest-engine/聚宽微盘股策略.py` 已映射到
`聚宽微盘股策略.engine_spec.json`
映射关系:
- `g.refresh_rate = 15` -> `engineConfig.refreshRate = 15`
- `g.stocknum = 40` -> `engineConfig.rankLimit = 40`
- `g.XS = 4 / 500` -> `engineConfig.dynamicRange.xs = 0.008`
- `current_price` 基准指数 `000001.XSHG` -> `signalSymbol = 000001.SH`
- `set_benchmark('000852.XSHG')` -> `benchmark.instrumentId = 000852.SH`
- `g.CloseRate = 1.07` -> `takeProfitMultiplier = 1.07`
- `g.LossRate = 0.93` -> `stopLossMultiplier = 0.93`
- `g.RSIRate = 1.0001` -> `rsiRate = 1.0001`
- `g.TradeRate = 0.5` -> `indexThrottle.defensiveExposure = 0.5`
- 个股均线过滤 `5/10/20` -> `stockMaFilter.short/mid/longDays`
- 指数均线过滤 `5/10` -> `indexThrottle.short/longDays`
说明:
- 原脚本里 `validate_date()` 虽然定义了停运窗口,但 `check_stocks()` 里紧接着把 `g.OpenYN = 1` 强制打开,
所以实际执行日志中停运窗口无效。当前 spec 因此使用 `skipWindows = []`,以匹配真实聚宽执行结果。