自动执行链一行都还没写(下单/持仓状态/跨重启持久化/对账/熔断),而过全部 滤网的信号只有约 5.3 笔/天——低到人手能接。先手工跑一批,就能在写自动化 **之前**拿到真实费率档、真实成交价、真实出场行为,让执行链的每个假设都有 实测对照,而不是写完再发现出场模型不对。 推送内容按手工执行需要给全:参考成交价(回测口径的次根开盘)、按 2/3/8 ATR 换算的绝对价位、下单数量、该币滑点预算,以及一句「偏离超过预算就不值得做」。 剩余半仓止损保持 2ATR 不移成本,这是回测参数,移了就不是同一个收益结构。 时效是这条路最大的风险,所以起点取 kline_ts 而不是信号产生时刻——参考价就是 在 kline_ts 那一刻存在的,从信号时刻起算会漏掉数据延迟加计算那 0.5~1.5s,而 那段不可压缩。超过 TG_STALE_S 直接标记已失效,不让人自己判断:宁可漏做,不 要在偏离预算之外入场。 三条防线:lag 退化时不推(与「停开新仓」同一条规则,不能只在自动化里执行); 按 (币, K线时刻, 方向) 去重,避免补根或池重建重放导致开两次仓;无预算的币 (如 TRX)不推。推送任何失败只打日志,不连坐采集——已验假 token 下降级为 HTTP 401 日志而非抛异常。 凭据走 tg.env(已 gitignore),给了 tg.env.example 说明怎么拿 token 和 chat id。 Co-authored-by: Cursor <cursoragent@cursor.com>
52 lines
1.1 KiB
Plaintext
52 lines
1.1 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
|
|
research/out/run_meta_*.json
|
|
|
|
# Telegram 凭据。**不要提交**
|
|
research/live/deploy/tg.env
|