Sweep Optimization Plan — 10 Steps
Created: 13 Apr 2026
Context: Bybit DCA Z-VWAP bot parameter optimization via backtesting
Status Overview
Step 10: Live Bot Config (Zvwap)
- PM2:
zvwap-bot (was bybit-bot)
- Deposit: $159.64
- BO: $20, Leverage 3x, Max 6 positions
- Margin: $120 max (75% of dep)
- Entry: Z > 3.0, Z < 3.5 (skip breakout)
- Exit: TP 3% / SL 1% (R:R 3:1) OR Z exit < 0.3
- Filters: NATR 0.5-2.0%, CHOP ≥ 45, Vol > $20M
- No DCA, no SOs, no Time Stop (pure MR)
- TMM tag: "Zvwap" + "L"/"S"
- TMM desc: Z, NATR, CHOP, TP/SL prices at entry; PnL, ROI, duration, R:R at close
- Risk per trade: $0.60 (SL 1% × $20 × 3x)
- Est worst DD: ~$10 (6.3% of dep)
- TODO later: analyze live stats → tune TP/SL (maybe 4.5/1.5), add Time Stop
Step 7 Sub-steps
Step 7 Results Summary (7d data)
- 8208 valid combos, 70 "golden" (PnL>0, PF>1.3, trades≥50)
- Best R:R: 3:1 dominates (TP=4.5% SL=1.5% — top 18 of 20)
- Best absolute PnL: +$79.5 (Z=2.2/3.5, NATR 0.5-2.0, CHOP≥55, 195 trades)
- Best PF: 1.50 (Z=2.5/3.0, same TP/SL, 111 trades)
- Sensitivity: Z_entry=3.0 best avg, NATR_min=0.5 best, NATR_max=2.0 best, CHOP≥55 best
- Avoid: 5:1 R:R with TP=7.5% (worst combos, -$174), Z_entry=2.0 (too early)
- 5 candidates saved for step 8 (14d robustness)
Step 8 Results — Robustness Check (7d vs 14d)
- 10 candidates tested (5 from step 7 + 5 bonus diverse Z=3.0 + different R:R)
- Only 1 stable (PnL>0 AND PF≥1.2 on 14d):
Z3.0 tighter TP/SL (3:1, TP=3%, SL=1%)
- ALL combos degrade on 14d — PF drops 0.17-0.32 (🔴 most)
- Best 14d PnL: Top1 from 7d → +$55.5 (PF 1.17, 307 trades) — still profitable but PF below 1.2
- Best 14d PF: Z3.0 TP=3%/SL=1% → PF 1.21, +$45.0, 307 trades — ONLY stable candidate
- Key insight: 7d sweep was likely biased by favorable week. 14d normalizes. Tighter TP/SL (3/1) more robust than wide (4.5/1.5)
- 4:1 and 5:1 R:R collapse on 14d (PF 1.06-1.08) — too greedy for MR
- Files: robustness_report.txt, robustness_results.json
Sweep Data
- File: sweep_results_7d.json (2.8MB)
- Date: 2026-04-13
- Valid combos: 8208 / 8640
- Elapsed: 595.6s
- Quick insight: Top = 3:1 R:R, TP=4.5%, SL=1.5%, Z=2.2, CHOP≥55
Current Live Config (known negative PnL)
- TP=1.5%, SL=8%, Z_entry=1.8, Z_max=2.5
- NATR 0.75-2.5%, CHOP≥45, MaxSO=3
- This config is NOT in the sweep grid (SL 8% not tested — too wide for no-DCA)
Files
| File |
Purpose |
| step1_fetch_data.py |
Fetch 30d klines → JSON cache |
| step2_sweep_z_tp_sl.py |
Core Z×TP×SL sweep |
| backtest_core.py |
Library: run_backtest(symbols, params) |
| download_data.py |
Download → pickle cache (7d/14d) |
| sweep_runner.py |
Full 8640 combo sweep |
| analyze_sweep.py |
Step 7: analysis script |
| data_cache_7d.pkl |
7-day cached data |
| data_cache_14d.pkl |
14-day cached data |
| sweep_results_7d.json |
8208 results from sweep |