Avi-L commited on
Commit
df74e67
·
verified ·
1 Parent(s): eb9cbc3

sweep verdict + corrected cost model + corrected demo results

Browse files
Files changed (1) hide show
  1. README.md +41 -13
README.md CHANGED
@@ -6,8 +6,9 @@ tags: [ml-intern, crypto, finance, backtesting, evaluation]
6
 
7
  [![Built with ML Intern](https://huggingface.co/datasets/huggingface/badges/resolve/main/built-with-ml-intern-sm.svg)](https://hf.co/chat?mode=ml-intern)
8
 
9
- Institutional-grade evaluation harness for crypto quant trading strategies.
10
- The companion dataset lives at [Avi-L/crypto-quant-eval-data](https://huggingface.co/datasets/Avi-L/crypto-quant-eval-data).
 
11
 
12
  ## What this eval measures
13
 
@@ -18,7 +19,7 @@ A strategy "passes" only if it survives all of:
18
  | No lookahead (purge + embargo) | `crypto_eval/cv.py` | label window `[t, t+h]` must never overlap a test block; embargo >= horizon (8h = one funding interval) enforced |
19
  | Leakage audit | `crypto_eval/cv.py` | independent per-segment audit of every CPCV fold; run fails loudly on violation |
20
  | Fee-aware PnL | `crypto_eval/costs.py` | 5 bps taker / 2 bps maker (Binance VIP0), funding accrued at 8h ticks |
21
- | Slippage | `crypto_eval/costs.py` | square-root impact `k*sqrt(notional/ADV)`, 2 bps floor |
22
  | Deflated Sharpe (DSR) | `crypto_eval/stats.py` | accept only if DSR > 0.95 |
23
  | Probability of Backtest Overfitting (PBO) | `crypto_eval/stats.py` | accept only if PBO <= 0.5 |
24
  | Min Track Record Length | `crypto_eval/stats.py` | how long the track record must be before SR is significant |
@@ -43,21 +44,48 @@ Strategies are functions `(bars, funding) -> positions`; add yours to
43
  structurally: a bar starting at `t` closes at `t+freq`, so signals use
44
  `shift_bars` (last closed bar at `t-1`); the engine and audit catch peeking.
45
 
46
- ## Validation results (2026-10-23)
47
 
48
  Run on real curated data: BTCUSDT 1h, 59,654 bars (2020-01 → 2026-10),
49
  5,295 funding ticks, $1M initial capital, CPCV N=6/K=2, horizon=embargo=8h.
50
- Full JSON in `results/`.
51
 
52
- | Strategy | Net PnL | Fees | Slippage | Funding | Mean SR (ann.) | PBO | DSR/PSR mean | Verdict |
53
- |---|---|---|---|---|---|---|---|---|
54
- | `funding_carry` | **-$69,773** | $2,856 | $95,031 | +$5,940 | -0.93 | 0.214 | 0.141 | **REJECT** |
55
- | `ma_crossover` | **-$1,522,405** | $29,208 | $1,508,181 | -$3,469 | -4.95 | 0.014 | 0.000 | **REJECT** |
56
 
57
- Both demo strategies are deliberately naive, and the harness correctly
58
- rejects them: the carry trade's funding income (+$5.9k) is swamped by
59
- slippage ($95k), and the MA crossover's $1.5M of turnover cost destroys
60
- the strategy outright. A gross-return backtest would have flattered both.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
 
62
  Note on the DSR column: per-combination values are PSR (n_trials=1 within
63
  a combination); DSR applies when multiple strategy configurations are
 
6
 
7
  [![Built with ML Intern](https://huggingface.co/datasets/huggingface/badges/resolve/main/built-with-ml-intern-sm.svg)](https://hf.co/chat?mode=ml-intern)
8
 
9
+ Institutional-grade evaluation harness for crypto quant trading strategies,
10
+ plus a systematic strategy sweep. The companion dataset lives at
11
+ [Avi-L/crypto-quant-eval-data](https://huggingface.co/datasets/Avi-L/crypto-quant-eval-data).
12
 
13
  ## What this eval measures
14
 
 
19
  | No lookahead (purge + embargo) | `crypto_eval/cv.py` | label window `[t, t+h]` must never overlap a test block; embargo >= horizon (8h = one funding interval) enforced |
20
  | Leakage audit | `crypto_eval/cv.py` | independent per-segment audit of every CPCV fold; run fails loudly on violation |
21
  | Fee-aware PnL | `crypto_eval/costs.py` | 5 bps taker / 2 bps maker (Binance VIP0), funding accrued at 8h ticks |
22
+ | Slippage | `crypto_eval/costs.py` | square-root impact `k·σ_daily·√(Q/ADV)`, σ_daily = realized daily vol from the data (317 bps on this dataset), 2 bps floor |
23
  | Deflated Sharpe (DSR) | `crypto_eval/stats.py` | accept only if DSR > 0.95 |
24
  | Probability of Backtest Overfitting (PBO) | `crypto_eval/stats.py` | accept only if PBO <= 0.5 |
25
  | Min Track Record Length | `crypto_eval/stats.py` | how long the track record must be before SR is significant |
 
44
  structurally: a bar starting at `t` closes at `t+freq`, so signals use
45
  `shift_bars` (last closed bar at `t-1`); the engine and audit catch peeking.
46
 
47
+ ## Strategy sweep verdict (2026-10-25, corrected cost model)
48
 
49
  Run on real curated data: BTCUSDT 1h, 59,654 bars (2020-01 → 2026-10),
50
  5,295 funding ticks, $1M initial capital, CPCV N=6/K=2, horizon=embargo=8h.
 
51
 
52
+ A 136-configuration grid (TSMOM × lookback/long-only/vol-target/band, Donchian,
53
+ funding carry, funding-extreme events, mean-reversion controls) was run through
54
+ the full harness on real data — every config a counted trial. Full 136-config
55
+ ranking in `results/sweep_report_v1.json`; runner: `sweep.py`.
56
 
57
+ **VERDICT: FAIL — no configuration passes the institutional gate.**
58
+
59
+ | Rank | Config | OOS mean SR (CPCV) | Combos positive | Net PnL | Gates |
60
+ |---|---|---|---|---|---|
61
+ | 1 | Donchian 55d long-only | 0.41 | 12/15 | +$61,557 | DSR≈0 ✗, PBO 0.63 ✗ |
62
+ | 2 | TSMOM 65d long-only | 0.35 | 11/15 | +$54,597 | DSR≈0 ✗ |
63
+ | 3 | TSMOM 200d long-only + vol-target 30% + 20% band | 0.39 | 11/15 | +$35,178 | DSR≈0 ✗ |
64
+
65
+ The best strategies are modestly positive OOS (SR ~0.3-0.4, essentially
66
+ long-bias trend capture in a 2020-2026 bull market) but **cannot clear the
67
+ multiple-testing bar**: after 136 counted trials, DSR ≈ 0, and PBO 0.63 says
68
+ config selection inside this grid is worse than a coin flip. Mean-reversion
69
+ and short-horizon momentum controls are strongly negative, as the literature
70
+ predicts. Funding carry is positive (+$22k) but individually insignificant
71
+ (PSR 0.53).
72
+
73
+ That is the honest institutional answer: a deployable edge is not found by
74
+ grid search on one asset's 1h bars. The harness is doing its job.
75
+
76
+ ## Demo-strategy validation results (costs corrected 2026-10-25)
77
+
78
+ NOTE: the original 2026-10-23 run used a mis-scaled slippage model (missing
79
+ the σ_daily term, impact ~50× overstated). All results below use the corrected
80
+ model. The correction is reported openly because it changed the carry verdict.
81
+
82
+ | Strategy | Net PnL | Fees | Slippage | Funding | Mean OOS SR | PBO | Verdict |
83
+ |---|---|---|---|---|---|---|---|
84
+ | `funding_carry` | **+$22,242** | $2,856 | $3,016 | +$5,940 | +0.17 | 0.100 | **REJECT** (PSR 0.53) |
85
+ | `ma_crossover` | **−$62,096** | $29,208 | $47,872 | −$3,469 | −0.21 | 0.057 | **REJECT** |
86
+
87
+ The MA crossover remains a cost-loser. The carry trade flips positive once
88
+ slippage is realistic, but PSR 0.53 is nowhere near significance.
89
 
90
  Note on the DSR column: per-combination values are PSR (n_trials=1 within
91
  a combination); DSR applies when multiple strategy configurations are