源文件:research/quant_digests/2026-04-14_1758_bollinger-bandtouch-makerfirst-shell.md
README.md + config/accounts.json + src/main.py + src/perps_trading.py + tests/test_signals.py + tests/test_exit_flow.py + tests/test_stop_logic.py + tests/test_pnl.py + test/compare_backtest_vs_live.py)+ Binance Spot 5m/15m public-data portability probe主来源是 GitHub 仓库:
这份 repo 的价值,不只是“BB+EMA”这套老指标,而是它把一条 真能下单的完整 MR 壳 写得很细:限价进场、60 秒未成交撤单、止损、对侧 band 目标位、TP 漂移后的 break-even、maker/taker 费用、仓位 sizing、同向仓位上限、以及回测 vs live 对照脚本。
band-touch mean reversion + maker-first execution + dynamic break-even TP refresh 这条完整 raw alpha 壳;它不像纯 filter,也不是只会讲故事的 demo。5m/15m 数据上,直接看 trades、胜率、净 bps/笔、stop / breakeven 占比。price <= lower band & price > EMA 做多,price >= upper band & price < EMA 做空;收益来自 价格从 band 外侧向对侧 band 回归,EMA 只是顺着长周期方向过滤逆势单。src/perps_trading.py 里已经把 60s pending limit、stop-market、opposite-band maker TP、TP 反穿 entry 时改成 break-even、same-direction exposure cap、min_band_width_pct 过滤都写出来了;test_signals / test_exit_flow / test_stop_logic / test_pnl 也说明作者不是只写 README。BB(20,2), SL 2.5%, target_risk 8%;当前 config/accounts.json 里 active BTC 已变成 BB(10,1.8), SL 4.0%, target_risk 10%,而且同一账户还挂了 12 个 active tokens,src/main.py 会把资金按 active token 数自动平分,结果 BTC 实际 capital_pct 会被压到约 8.33%,不再是 README 里那种“单 BTC 重仓”口径。compare_backtest_vs_live.py 的费率假设(maker 1bp,stop taker 5bps),过去约 180d 的 Binance Spot BTCUSDT 上,README canonical 5m 壳得到 468 笔 / 63.0% 胜率 / +29.13 bps/笔净值 / 持有中位 132.5 分钟;15m 也还有 172 笔 / 58.7% 胜率 / +26.60 bps/笔。当前 active BTC 配置更激进:5m 954 笔 / +21.34 bps/笔,15m 301 笔 / +35.14 bps/笔。5m canonical 约 35.9%、active config 约 46.6% 的平仓都是 break-even,这说明这条壳的 edge 不只是“赌对侧 band 一定打满”,而是 用动态 TP refresh 把坏单尽量压到只亏手续费。这轮值得进素材池,因为它满足你这轮最想要的那类候选:
5m,而 15m transfer 也没有马上失真;touch outer Bollinger band -> revert toward opposite bandEMA(200) 方向过滤,只做顺长周期方向的反身回归min_band_width_pct、max_same_direction、60 秒未成交撤单、价格走远撤单target_risk_pct -> capital_pct、stop-market、maker TP、TP 漂移时 break-even、ALO rejected 后 retry / GTC fallbackBTCUSDT(按 repo 原设作为 signal source)5m / 15m180dreadme_shell: BB(20,2), EMA(200), SL 2.5%live_config_btc: BB(10,1.8), EMA(200), SL 4.0%1bp;target/breakeven exit maker 1bp;stop exit taker 5bpsreports/artifacts/quant_digests/2026-04-14_bandtouch_makerfirst_probe.pyreports/artifacts/quant_digests/bandtouch_makerfirst_probe_summary_2026-04-14.csvreports/artifacts/quant_digests/bandtouch_makerfirst_probe_detail_2026-04-14.csvALO reject / retry / timeout cancel / price-moved-away cancel 真正模拟进去。20/2/2.5 和 10/1.8/4.0 谁更稳,再决定要不要继续压 1m/3m。这份 repo 可以名正言顺地进 raw alpha / 完整策略壳素材池。更诚实的读法不是“又一个 BB bot”,而是:
> band-touch mean reversion 这条 alpha 本体清楚,源码已经把它包成了 maker-first、可回放、可实盘拆件的 production-ish shell;README 虽然有点过时,但这反而说明 repo 真在往可执行方向进化。
当前最合理的落点不是直接信 README 年化,而是把它作为 5m native first、可向 15m 平移、并且能继续拆 fill model 的完整 raw alpha 候选。