Strategies
ETH OKX SuperTrend Band-Flip Entry with a Tighter Chandelier Exit and an Explicit Flat State, Long-Short (ETHUSDT.OKX 4H, canonical ATR10 x 3, pure OHLCV)
Outcome: Abandoned
EthOkxSuperTrendFlipChandelier
Outcome Summary
EthOkxSuperTrendFlipChandelier moved the SuperTrend flip to 4H ETH on OKX, with a chandelier exit and an explicit flat state, and passed backtest review to optimization after a +170.9% first backtest. That result was fragile, with Sharpe 0.60, PF 1.17 and a 53% drawdown. Optimization tightened the bands, which more than doubled turnover and led to a -81% realized return, and the holdout came back at Sharpe -0.43. The analyst abandoned it after 2 iterations as no_edge, noting a suspected MTM marking artifact behind the passing robustness stats and that the SuperTrend flip family on ETH has now failed in two forms.
Hypothesis
Iteration 2 fixes leverage_set_but_unused. position_size now reads self.config.leverage directly (the old getattr() form hid it from the gate) and uses it in the notional cap. risk_pct goes from 0.02 to 0.03 so that the leverage-scaled cap (1.5x equity) actually binds when ATR is low: it takes effect whenever the stop distance is under 2%, i.e. 4H ATR below about 1% of price. Leverage is therefore not inert. Signal, entry and exit logic, and imports are unchanged.
Implementation
ETHUSDT.OKX 4H long-short. SuperTrend (Wilder ATR10 x 3.0 on hl2, ratcheting bands) direction flips are the only entry trigger. Each position exits on a close through a 2xATR chandelier trail (extreme since entry) or on an adverse flip, then stays flat until the next flip. Positions are sized to risk 3% of equity against the chandelier stop distance, with notional capped at 0.75 x equity x config leverage (2x).
Verification Results
Consider risk_pct 0.015-0.02. Optionally, add a bracket stop at the initial chandelier level so the stated risk holds intra-bar.
Per-trade risk budget is risk_pct=0.03 (3% of equity) against the chandelier distance. Lesson L148 asks for stop distance x size <= 1-2% of equity. The stop is also evaluated on the 4H close, so gaps and fast bars can overshoot it. Gross notional is independently capped at max_notional_frac(0.75) x leverage(2) = 1.5x equity, which is within the venue cap. There is a flat state, so this is not the compounding-blowup shape. Sandbox avg_position_pct is 76% and it was not liquidated.
No change required. If the pure flat-after-flip reading is intended, clear _armed_dir when the exit was caused by the adverse flip.
When a position is still open at the moment of an adverse SuperTrend flip, should_exit closes it on the flip bar. The armed flip then enters the opposite direction on the next bar (the base template never exits and enters on the same bar). This is a one-bar-delayed reversal. It is consistent with 'flip is the only entry trigger, in either direction', but it is closer to stop-and-reverse than the 'never reverses automatically' phrasing suggests. In practice the 2xATR chandelier usually fires before the 3xATR band flip, so this path is uncommon.
Keep as is.
min_bars_required override shadows the base method (static warning). It is harmless: it returns atr_period+5, and the SuperTrend state is seeded from self._bars[:-1] on the first calculate_signal call, including during live warmup.
Sandbox (one unoptimized draw, 2299 days): +198% total, Sharpe 0.49 with CI [-0.26, 1.24], PSR 0.79, PF 1.20, max DD 49% with a 1207-day DD duration, and a negative information ratio against buy-and-hold. The 2022 rate shock was -15%. Per-trade return is 0.51% of notional, which clears the OKX round trip (~0.10%) comfortably. The weak points are significance and drawdown, not fees. Also, funding_folded=false with funding_events_available=0, so OKX perp funding is NOT in PnL. At ~29% exposure over 2-day holds this is a modest omission, but the long leg in bull years is flattered. Check first: whether the result survives funding, and whether edge is concentrated in 2020-2021.
Backtest Review
- Sharpe
- 0.60
- Total return
- 170.93%
- Max drawdown
- 53.46%
- Trades
- 310
- Win rate
- 38.7%
- Profit factor
- 1.17
The sample is reliable: 310 trades over 2,299 days, 155 long and 155 short. That fits a 4H SuperTrend flip entry with a chandelier exit and a flat state. entry_diag is clean: 310 signals, 310 submitted, none dropped.
The trades implement the hypothesis. Entries are balanced long and short on flips, holds average about 2 days, and exposure is 29%.
Per-trade economics clear costs. avg_trade_return_pct is 0.51% (the unweighted mean is 0.29%), against an OKX round trip of about 0.10%. Commission is 4.6% of gross and impact is 13%.
Funding is now credited (-$27.6k) and the result still survives: the realized ledger ends at $270.9k, which reconciles with +170.9% total return, and end_unrealized is 0.
The QA concern is only partly borne out. The edge is not confined to 2020-21: 2024 made +$111k realized. Beta is 0.02 and correlation 0.05, so this is not a closet long.
Drawdown is genuine. Rebuilding equity from the closed trades gives a max DD of 53.8%, which lasted 1,207 days, against a 20% futures default. Sizing is aggressive: risk_pct 0.03 and avg position 84% of equity.
Significance is weak. Sharpe is 0.60 with a CI of -0.13 to 1.36, and PSR is 0.85. PF is 1.17 and win rate 0.387 (lesson L142 shape, advisory).
The long leg has about zero edge: +$15k across 155 trades. The shorts carry +$156k.
Year-by-year realized P&L is inconsistent: 2022 -$41k, 2023 -$31k, 2025 -$20k. That is right at the 60% positive-years floor.
Suspected metrics artifact, mechanism not verified. daily_returns has recurring paired prints of about -17% then +21% on days with no open position (e.g. 2023-04-16/17, 2023-03-24/25), and they grow to -29.6/+40.5 by 2024. They inflate vol, VaR and the Sharpe denominator. Flag this for a harness check.
Analysis
The mechanism was implemented as hypothesized: entries only on SuperTrend flips, a chandelier trail exit, an explicit flat state, and balanced long and short legs (155/155 on the first report, 394/394 optimized).
The first report clears the fee floor: avg_trade_return_pct 0.51% against a ~0.10% OKX round trip (0.15% floor), with commissions at 4.6% of gross.
No cliff parameters. PBO 0.07, CPCV OOS 1.62, DSR 0.978.
It is not beta: beta 0.02, correlation 0.05.
HARD holdout failure: Sharpe -0.43 on 167 trades over 459 unseen days (2025-01-05 to 2026-04-09), z_vs_oos -2.2, consistent_with_oos=false. This is an adequate sample giving a measured negative forward result.
The optimized realized ledger collapsed: total_return -81.4%, PF 0.90, max drawdown 93.8% against the pre-registered 30%, avg_trade_return_pct -0.037% (below cost), and 2024 at -100%. The optimizer tightened st_factor to 1.51 and chandelier to 1.19, which more than doubled turnover (310 to 788 trades) and pushed avg_position_pct to 172%.
metrics_reliable=false. The optimized Sharpe of 1.47, the CPCV Sharpes and the DSR all come from an MTM daily series whose sign disagrees with the -81% realized return. That series shows recurring paired -X%/+Y% days (for example -60.19/+137.94 on 2022-09-12/13 and -86.28/+612.72 on 2024-08-06/07). The first report shows the same pattern with identical repeated pairs (-17.0582/+20.5665 on both 2023-03-24/25 and 2023-04-16/17). I suspect a marking artifact but have not verified the mechanism. The consequence is that the 'robust' OOS/DSR/PBO statistics that passed are not evidence of an edge.
The first report was already weak: Sharpe 0.60 with a CI of -0.13 to 1.36 (straddles 0), PF 1.17, win rate 0.387, max drawdown 53% against the pre-registered 30%, losing years in 2022, 2023 and 2026, and a max drawdown duration of 1207 days.
Pre-registered prediction met 3 of 6 checks, missing max drawdown, PF and avg_trade.
Does not survive programme FDR.
Iteration History
Verification failed (leverage_set_but_unused): config sets leverage=2.0 but the strategy never references leverage in sizing. Size positions on it — notional = equity * fraction * leverage / price (read self.config.leverage) — or set leverage=1.0. As written the leverage is inert and the backtest is identical to 1x.
Outcome Summary
Clearing the fee floor per trade is not enough: SuperTrend/ATR-band flips on a single major need a new conditioning signal, and optimizer-tightened bands that multiply turnover should be distrusted when the robustness stats come from an unreliable MTM series.
The analyst abandoned the strategy as no_edge. It failed the HARD holdout gate (Sharpe -0.43 over 459 unseen days, z_vs_oos -2.2), and the passing CPCV OOS 1.62, DSR 0.978 and PBO 0.07 came from an MTM series flagged metrics_reliable=false whose sign disagreed with the realized PnL. The first report was already weak: its Sharpe CI straddled 0, drawdown exceeded the pre-registered 30%, it had losing years in 2022, 2023 and 2026, and it did not survive programme FDR.
A long-short ETHUSDT.OKX 4H strategy that used a canonical SuperTrend (ATR10 x 3) band flip only as an entry trigger, exited on a tighter 2xATR chandelier trail, and then stayed flat until the next flip, restating a 15m stop-and-reverse source strategy to keep it clear of fees.
The first backtest made +170.9% over 2,299 days on 310 trades (155 long, 155 short), with avg_trade_return_pct 0.51%, Sharpe 0.60 (CI -0.13 to 1.36), PF 1.17 and a 53% max drawdown. The optimized config (st_factor 1.51, chandelier 1.19) returned -81.4% on 788 trades with a 93.8% drawdown and avg_trade_return_pct -0.037%, and it failed the holdout with Sharpe -0.43 on 167 trades.
Analysis
SuperTrend V.1--超级趋势线系统
Backtest and paper results are hypothetical. Trading involves risk of loss.