Skip to content

View translation

EthDailyBullishEngulfingRegimeLong

Hypotheses

ETH Daily Bullish Engulfing Pattern Long with 200-SMA Bull Regime Filter

Hypotheses

A long-only single-instrument CANDLESTICK-PATTERN strategy on ETHUSDT perpetual futures using daily bars and OHLCV-only data, with a 200-SMA bull regime filter. The trigger is a classic Japanese candlestick reversal pattern documented by Steve Nison (Japanese Candlestick Charting Techniques, 1991) and tested across asset classes for ~35 years: a 'bullish engulfing' is a single-bar formation where the current daily bar's range fully engulfs the prior bar's range AND closes in the direction of upside expansion. Specifically: current_high > prior_high AND current_low < prior_low AND current_close > prior_close AND prior_close < prior_open (the prior bar was bearish — the engulfing reverses the prior down-bar). This is a DISCRETE 2-BAR GEOMETRIC PATTERN — fundamentally different from every existing portfolio mechanism: it's NOT a continuous-statistic threshold (RSI/BB/VWAP), NOT a count-of-events (consecutive-down-days), NOT a drawdown-depth measure, NOT volatility-compression (inside day), and NOT a momentum-continuation breakout. It captures directional volatility-expansion with commitment (the close in the expansion direction is the key signal). The pattern works because it represents a market microstructure event: the bar that engulfs the prior bar's range AND closes bullishly indicates that buyers absorbed all of the prior day's selling AND added new demand at higher prices — a textbook supply-exhaustion-then-reversal signature. ETH daily timeframe is chosen because (a) ETH daily futures data path is the most-cached in the system (3 in-pipeline strategies already use it: EthDailyGoldenCrossMomentumLong, EthDailyConsecutiveDownDayPullbackLong, plus daily regime filters from other strategies), maximizing data-fetch resilience, (b) candlestick patterns require human-decision-relevant timeframes — daily is the canonical Nison timeframe, NOT 4H or intraday, (c) ETH has well-documented daily-candlestick mean-reversion behavior driven by ETH-specific institutional flows (ETF rebalancing, staking redemption cycles). Existing ETH coverage: Golden Cross fires on RARE multi-month regime events; Consecutive-Down-Day fires on SHORT-TERM count-based pullbacks; Bullish Engulfing fires on DISCRETE 2-bar reversal patterns — three orthogonal signal frequencies and statistical foundations on the same asset. Only 2 explicit parameters (regime SMA period, stop-loss pct) — minimum parameter count of any strategy in the portfolio.

Hypotheses

Iteration 2 fix for the Layer-2 'frozen signal: all 299 signals are 0.0' failure. Root cause was the gated-signal anti-pattern compounded by a 200-bar regime warmup: calculate_signal() returned 0.0 on every bar lacking a confirmed bullish-engulfing-in-regime, which on smooth synthetic trends is every bar. Fix: added a continuous monitoring base (_monitoring_base: tanh(logret*50) blended with a trailing 30-bar z-score — the proven shape that varies across these synthetic scenarios) and return it on all non-pattern bars AND during regime warmup, so the signal varies from bar 2 onward. The binary decision stays gated: a confirmed engulfing returns magnitude >= 2.0 and should_enter() thresholds at entry_threshold=1.5, so real entries (and the Layer-3 trade behavior) are unchanged from the version that passed Layer 1. position_size()'s guard was tightened to signal <= entry_threshold for consistency with the gate (it is only ever called on a confirmed entry anyway). should_exit() is unchanged — it never reads the signal (PnL/regime/time-based), so the now-nonzero base cannot cause spurious exits. Imports untouched (numpy only, no banned imports), preserving the Layer-1 pass. Venue/leverage unchanged: BINANCE futures at leverage 2.0 with position_size genuinely consuming leverage (equity * position_pct * leverage).

Hypotheses

Failed deflated Sharpe: DSR=0.0009 (vs 0.95 bar), expected-max=4.93 over 225 trials with the selected Sharpe negative — the edge is statistically indistinguishable from best-of-N selection noise. Every decisive gate fails in concert: is_significant=false with sharpe_ci_low -3.87 (CI straddles 0), pbo=0.7315 (>0.5), walk-forward is_overfitted=true (avg IS 1.83 collapses to avg OOS -0.36, OOS windows [-3.90, 2.83, 0.0]), and sensitivity FAILED with 3 cliffs (max_hold_bars, regime_period, stop_loss_pct) leaving no robust region to tune toward. The optimized config is a net loser (total_return -8.83%, Sharpe -0.47, PF 0.83, expectancy -$311/trade, avg_position_pct 164.9%) — optimization made it WORSE than the +14.9% initial point estimate. The holdout 'passed=true' is a degenerate artifact (ratio 0 against a NEGATIVE walk-forward-OOS denominator of -0.36; holdout 1.74 is one lucky window), not real robustness. Root cause confirms the pre-optimization caveat: the discrete bullish-engulfing pattern produced only 39 entries over 6 years on a single asset — too thin to validate out-of-sample, so the attractive initial Sharpe (0.77, raw CI -1.37 to +2.17) was a best-case point estimate that dissolved under multiple-testing deflation. Not iterate (no robust parameter region exists; a second sweep would re-select another best-of-N artifact on the same thin sample). Not revise_hypothesis (the failure is event-sparsity + no significant edge, not a proven mechanism stranded on a dead target; there is no promoted sibling to redirect, and the long-short ETH engulfing variant failed worse). FAILURE PATTERN: discrete single-asset daily candlestick-pattern reversals (bullish engulfing) fire too rarely (~6-7/yr) to survive walk-forward and deflated-Sharpe testing — a modest positive point estimate on ~39 trades is best-of-N noise that fails DSR (0.0009), PBO (0.73), and is_overfitted=true, and over-selection produces a money-losing optimized config.

Implementation

Long-only single-instrument Nison (1991) bullish-engulfing reversal on ETHUSDT.BINANCE USD-M perp, daily bars, pure OHLCV, with a 200-SMA bull regime filter. A bullish engulfing (current bar engulfs the prior bearish bar's range and closes higher) occurring with close > 200-SMA enters long. calculate_signal() now returns a continuous, bar-varying monitoring score (tanh blend of log-return and trailing z-score) on non-pattern/warmup bars, while a confirmed engulfing-in-regime returns magnitude >= 2.0; entries are gated in should_enter() at entry_threshold=1.5 so only confirmed patterns trade. Exits: take-profit, stop-loss, regime break (close < SMA), or max-hold time stop. Leverage 2.0 (~1.2x equity notional).

Verification Results

Verification failed (Layer 2 — synthetic scenarios): Parameters used: ['min_notional', 'position_pct', 'max_hold_bars', 'regime_period', 'stop_loss_pct', 'take_profit_pct'] Check that __init__ sets all attributes from self.parameters.get(). - steady_uptrend: Frozen signal: all 299 signals are identical (value=0.0). calculate_signal() likely has a bug — the signal never varies. - steady_downtrend: Frozen signal: all 299 signals are identical (value=0.0). calculate_signal() likely has a bug — the signal never varies.

Backtest Review

First of the candlestick family with a real edge: positive expectancy (+$308/trade), profit_factor 1.18, Sharpe 0.77, sortino 1.45, omega 1.27, alpha +0.007.

Backtest Review

Positive payoff asymmetry (avg_win $4,618 > avg_loss $3,022) — the bull-regime gate + long-only turns the engulfing pattern into a with-trend pullback reversal that lets winners run, unlike the abandoned long-short ETH engulfing sibling (PF 0.37).

Backtest Review

Clean implementation: avg_position_pct 123% ≈ intended 120% (no stacking artifact), trades match the hypothesis, positive in 3 of 5 years, capacity $9.6M.

Backtest Review

Minimal 2-parameter design (regime_period, stop_loss) sharply limits overfitting risk in the optimization.

Backtest Review

Thin sample: only 39 trades over ~6 years (exposure 2.78%) — the Sharpe CI is very wide (-3.51 to +3.45) and straddles 0, so the edge is not yet statistically distinguishable from noise (probabilistic_sharpe 0.68).

Backtest Review

Modest headline (+14.9% total, ~2.5% CAGR); 2023 was -11% as reversals failed mid-regime.

Backtest Review

win_rate 43.6% with up to 8 consecutive losses — deployable drawdown stretches even though the average is positive.

Analysis

Clean, minimal implementation (correct engulfing geometry, 200-SMA gate, avg_position_pct 123% ≈ intended 120% in the initial run, no data artifact) — the initial backtest showed a plausible positive point estimate (PF 1.18, Sharpe 0.77, positive payoff asymmetry).

Analysis

Minimal parameter surface limited the search space, so the failure is a clean read on the signal, not over-parameterization.

Analysis

Failed deflated Sharpe decisively: DSR 0.0009 vs 0.95 bar; expected-max Sharpe 4.93 over 225 trials with the selected Sharpe negative — indistinguishable from best-of-N noise.

Analysis

is_significant false, sharpe_ci_low -3.87 (CI straddles 0), pbo 0.7315 (>0.5).

Analysis

Walk-forward is_overfitted=true: avg IS 1.83 → avg OOS -0.36, OOS windows [-3.90, 2.83, 0.0].

Analysis

Sensitivity failed with 3 cliffs (max_hold_bars, regime_period, stop_loss_pct) — no robust region to tune toward.

Analysis

Optimized config is a net loser (total_return -8.83%, Sharpe -0.47, PF 0.83, expectancy -$311/trade) and over-leveraged (avg_position_pct 164.9%) — optimization made it worse than the +14.9% initial.

Analysis

Holdout 'passed' is a degenerate divide-by-zero artifact (ratio 0 against a negative WF-OOS denominator of -0.36), not genuine robustness.

Analysis

Root cause: only 39 discrete engulfing entries over 6 years — structurally too thin to validate out-of-sample on a single asset.

Outcome Summary

This was the first of the candlestick family to show a real edge: a bull-regime-gated bullish engulfing long on ETH daily that, with long-only and the 200-SMA filter, behaved as a with-trend pullback reversal letting winners run (PF 1.18, Sharpe 0.77, +14.9%, positive payoff asymmetry), earning an 'optimize' verdict despite a noted thin 39-trade sample. But the 3-phase optimization exposed it as best-of-N noise — deflated Sharpe 0.0009, PBO 0.73, walk-forward overfitted with OOS Sharpe collapsing to -0.36, three sensitivity cliffs, and an optimized config that actually lost money (-8.83%). The analyst abandoned it at the analyzing stage on its second iteration, confirming the pre-optimization caveat that discrete daily candlestick patterns fire too rarely to validate out-of-sample, with no robust parameter region to iterate toward and no promoted sibling to redirect to.

Outcome Summary

A modest positive point estimate on only ~39 discrete-pattern entries over 6 years is statistically indistinguishable from best-of-N noise — discrete single-asset daily candlestick reversals fire too rarely (~6-7/yr) to survive walk-forward and deflated-Sharpe testing, and a thin-sample edge can dissolve (or invert to a loss) under multiple-testing deflation.

Outcome Summary

Unlike its siblings this one cleared the backtest-review gate with an 'optimize' verdict, but the post-optimization analyst abandoned it: every decisive robustness gate failed in concert (deflated Sharpe, PBO, is_significant, walk-forward is_overfitted, sensitivity cliffs), the optimized config lost money, and the holdout 'pass' was a degenerate divide-by-zero artifact — the attractive initial Sharpe was best-of-N selection noise on too thin a sample.

Outcome Summary

A long-only, single-instrument candlestick-pattern strategy on ETHUSDT daily Binance futures (2.0x leverage) entering on Nison's classic 2-bar bullish engulfing reversal (current bar engulfs the prior bearish bar's range and closes higher) gated by a 200-SMA bull regime filter, with a minimal 2-parameter design.

Outcome Summary

The initial backtest showed a genuine edge — 39 trades, +14.9% total return, Sharpe 0.77, profit factor 1.18, positive expectancy +$308/trade with favorable payoff asymmetry (avg win $4,618 > avg loss $3,022), capacity $9.6M, positive in 3 of 5 years — but under optimization it collapsed: deflated Sharpe 0.0009 (vs 0.95 bar), PBO 0.73, walk-forward overfitted (avg IS 1.83 → avg OOS -0.36), 3 sensitivity cliffs, and an optimized config that was a net loser (-8.83%, Sharpe -0.47, PF 0.83).
Strategy report

Backtest and paper results are hypothetical. Trading involves risk of loss.