吃单查询换成 Hummingbot 的 OrderBook.get_vwap_for_volume:手写的 walk_book 返回的是按计价币吃单的加权均价,但框架的 get_price_for_quote_volume 返回 边际价、get_vwap_for_volume 收基础币量,两者语义不同。改为按基础币下单 (真实委托与 PositionExecutor.amount 均是基础币计价),深度不足由 query_volume/result_volume 判定,框架此时返回 nan 而非一个看似正常的 部分成交均价。 落盘完整盘口(双边 50 档)。此前只记三个固定名义额的成交价,这批数据的 寿命就等于那几个档位的寿命;存完整深度后任意资金量级的冲击都能离线重算。 仓位档同时从 1k/5k/20k 提到十万量级,此前低估真实仓位约两个数量级。 订阅成交流,按根按价位聚合。买卖分开存——多头在目标位挂卖出靠主动买盘 成交,混在一起会把成交率高估约一倍。BTC 每根总成交额中位与 210 天历史 的 volume×close 差 0.3%,可确认采集完整。 新增两项测算: - 冲击不是绑定约束。32 万仓位单边冲击 0.19~2.39bp,对 8.58~20.64bp 的 预算只占 1.6~14.2%,冲击反推的资金上限 100~500 万。 - maker 成交率才是。止盈位被首次触及时,限价在该根价格区间中的位置 中位 k=0.28(63.9 万次触及,三币一致);合并每根成交额后,32 万仓位 的全额成交率仅 30.1%/15.6%/1.5%。要 80% 全额成交,仓位须 ≤ 4.7 万 /1.4 万/0.26 万——比冲击反推的上限低 40~370 倍。 回测把这些止盈按「全额成交在目标价」计,故预算所依据的收益流本身需重估。 Co-authored-by: Cursor <cursoragent@cursor.com>
48 lines
1.0 KiB
Plaintext
48 lines
1.0 KiB
Plaintext
# MacOS
|
|
.DS_Store
|
|
|
|
# Python
|
|
__pycache__/
|
|
*.py[cod]
|
|
*$py.class
|
|
*.pyc
|
|
*.pyo
|
|
.pytest_cache/
|
|
|
|
# Logs & databases
|
|
*.log
|
|
*.sqlite
|
|
*.sqlite-shm
|
|
*.sqlite-wal
|
|
|
|
# Office documents kept alongside the repo but not part of it.
|
|
# "~$" files are Excel's lock files, recreated every time a workbook is opened.
|
|
*.xlsx
|
|
*.xls
|
|
~$*
|
|
|
|
# Local data
|
|
data/
|
|
|
|
# Exchange history fetched by research/live/*.py. 40MB and re-fetchable from
|
|
# the venue, so it stays local; the small result CSVs it feeds are committed.
|
|
research/live/cache/
|
|
|
|
# Scratch outputs from short shakedown runs, superseded by the real collection.
|
|
research/out/archive/
|
|
|
|
# Per-trade simulation dumps from research/step*.py. 70MB+ and regenerable by
|
|
# rerunning the step; the summaries they feed live in HANDOFF.md.
|
|
research/out/*.feather
|
|
|
|
# Virtualenvs. venv writes its own .gitignore since 3.11, but only for the
|
|
# directory it creates — declare it here so other layouts are covered too.
|
|
.venv/
|
|
venv/
|
|
|
|
# Local tooling
|
|
.gstack/
|
|
research/out/*.jsonl.gz
|
|
research/out/penetration.csv
|
|
research/out/shadow_*.csv
|