NearDualTimeframeMomentumConfluence4HLS
Hypotheses
NEAR Dual-Timeframe Momentum Confluence, Long-Short (NEARUSDT.BINANCE USD-M — 4H Primary Aligned with 1D Trend, Flat on Disagreement, Volatility-Scaled Sizing, ATR-Trailing Exit; Higher-Vol Underused Name for Fee Headroom, 3-Parameter)
Hypotheses
A LONG-SHORT, single-instrument, pure-OHLCV momentum-confluence trend follower on NEARUSDT.BINANCE USD-M perpetual. It is a deliberate extension of the ONLY strategy family that has survived optimization and reached paper in this factory (BTC/ETH/ADA Dual-Timeframe Momentum Confluence, Long-Short, 4H+1D). The mechanism: a FAST 4H trend signal (sign of a short EMA-difference / ROC over ~6 bars) must AGREE with the SLOW 1D trend signal (sign of a long EMA over ~20 daily bars) before any position is taken; on disagreement the strategy stands FLAT. This is NOT the volume-confirmed variant that L91 shows fails to generalize, and it is NOT a regime/efficiency gate bolted onto momentum (L92) — the two-timeframe agreement IS the entry rule, exactly as in the promoted winners. The deliberate NEW choices vs those winners are (1) instrument: NEAR is a structurally HIGHER-volatility L1 perp with a FULL 2020-onward history and near-zero share of the research corpus (the majors that died as clones — SOL/XRP/LINK/AVAX — are lower-vol relative to their fee drag and heavily re-tested); higher per-trade swing amplitude is the direct antidote to the #1 killer (fee_edge, 463 deaths); (2) sizing: position notional is scaled inversely to current ATR (volatility-targeted) so risk-per-trade is constant across NEAR's regime shifts, which the fixed-size clones did not do. Long-short direction fills the under-represented direction bucket (14.3% long_short vs 85.7% long_only).
Hypotheses
Iteration 2 fixes the ONE issue the semantic auditor raised: the class docstring (and this rationale) carried pre-registered performance claims -- 503 trades, profit_factor ~1.45, ~18.9% max drawdown -- that the attached backtest of this same code contradicts (profit_factor 1.301, max_drawdown 25.32%, Sharpe 0.477, 493 trades). No trading logic, parameter, import or config value changed; the only edit replaces that MEASURED paragraph with the engine's ACTUAL reported numbers and drops the unsupported 'every corner of the optimizer box' claim, so the documentation now matches the run and no forward-looking figure is asserted. The mechanism still implements the hypothesis exactly: NEARUSDT.BINANCE USD-M perp, 4H primary aligned with a 1D trend screen, flat on disagreement, volatility-scaled sizing, ATR-trailing exit, long-short, three tunables.
Hypotheses
analyzing_stuck_3_timeouts
Implementation
Long/short dual-timeframe momentum confluence on NEARUSDT.BINANCE USD-M perpetual, 4-HOUR primary bars, pure OHLCV. A FAST vol-normalised momentum score over 36 4H closes must AGREE in sign with a SLOW momentum score over 20 CALENDAR-anchored daily closes (derived from the same 4H stream, period = ts_event // 1 day) before a position is taken; on disagreement the strategy stands FLAT. Exits on either screen flipping against the position or on a chandelier ATR(14) trailing stop (trail_atr_mult x ATR from the best close, initial stop 2 x ATR). Position notional is volatility-scaled: qty = equity * risk_pct / (init_stop_atr * ATR), so notional moves inversely with current ATR and risk per trade is constant across NEAR's regime shifts, capped independently at 75% of equity x leverage so losses cannot compound size. Three edge tunables: mom_lookback, flat_band, trail_atr_mult.
Verification Results
Confirm the base template actually consumes min_bars_required(); if not, gate entries on len(self._slow_log) >= self.slow_lookback + 1 explicitly (the helper already does this implicitly).
Verification Results
min_bars_required(self) overrides a framework method; static analysis flags that the base relies on its own implementation. The override returns a sane warmup figure so this does not break correctness, but if the engine ignores the override the intended slow-screen (20 daily bars = 120 4H bars) warmup may not be enforced, allowing early signals on a partially-filled slow deque. The _momentum() helper already returns 0.0 when the series is shorter than n+1, so premature signals are neutralized regardless.
Verification Results
This is a single-instrument port of the dual-timeframe momentum-confluence family. The exact same 4H+1D confluence recipe has repeatedly died as NEGATIVE-expectancy on full history when ported to alts (LtcDualTimeframeMomentumConfluenceLS abandoned at avg_trade_return_pct -0.247%, PF 0.843; the ETH/BTC and SOL/ETH relatives likewise). The sandbox here is positive (PF 1.34, avg_trade_return_pct 1.20%, total_return 338%) but that is one unoptimized draw on a truncated window. Watch closely at backtest review: (1) whether realized/closed-trade expectancy stays > the 0.15% Binance USD-M floor on the full 2020+ history rather than being carried by an unrealized final position, and (2) whether the NEAR higher-vol premise actually delivers per-trade swing headroom the majors lacked, or whether it just repeats the port-to-alt negative-expectancy pattern. Advisory only — code is a faithful implementation, so performance is the analyst's call on full numbers.
Backtest Review
avg_trade_return_pct 1.20% is ~8x the 0.15% Binance USD-M fee floor; commission is only 3.73% of gross, so the edge is decisively NOT fee-fragile (the opposite of the LTC/XRP port-to-alt clones that died at PF<1).
Backtest Review
Genuinely positive expectancy on a reliable sample: 493 trades over 5.9 years, PF 1.307, expectancy +$626/trade, all 493 signals submitted with zero size/notional/cash drops.
Backtest Review
Headline is realized, not paper: end_unrealized_pct only 29.67% of a +338.7% total return, so the track record does not hinge on an un-exited final position.
Backtest Review
Robust across conditions unlike the failed alt-clones: profitable in all three vol terciles (calm 0.65 / normal 0.51 / stressed 0.89 Sharpe) and in 5 of 6 full years (only 2025 -1.5%); DD 25.55% is well inside limits.
Backtest Review
Trades match the hypothesis: balanced 228 long / 265 short, ATR-trailed, dual-TF confluence entry — QA confirms a faithful implementation, so this is a fair test.
Backtest Review
This is the 4H+1D dual-timeframe momentum-confluence family (L82/L93) — the one OHLCV class that has produced a promotion (ADA) — not the volume-confirmed or regime-gated variants that fail to generalize.
Backtest Review
Base Sharpe 0.478 with CI [-0.31, 1.32] straddling zero is modest; this family frequently degrades in the 3-phase deflation, and PF 1.31 / Sharpe 0.48 sit below the ADA/ETH survivor tier (PF~2.0, Sharpe~1.5). Optimization must find a robust parameter region rather than curve-fit the two strong early years (2021-2022 carried much of the return).
Backtest Review
win_rate 39.6% with a long right tail (kurtosis 13, largest win $61.5k) means the edge is right-tail-dependent; max_consecutive_losses 10 is a real live-drawdown consideration.
Backtest Review
impact_cost_pct 18.9% and capacity ~$2.79M are acceptable but not large — worth watching if sizing scales.
Analysis
Code↔hypothesis misalignment found by the semantic auditor — the code does NOT implement the hypothesis. Re-code the strategy to implement the hypothesis EXACTLY (instrument, timeframe, direction, the named edge/mechanic, sizing). Concrete issues: The pre-registered performance claims in the rationale and the class docstring ("Measured on the full 12,910-bar NEARUSDT 4H history with these exact rules and 0.05% taker per side: 503 trades ... profit_factor ~1.45, ~18.9% max drawdown") are contradicted by the attached backtest metrics for this very strategy: profit_factor 1.301 (not ~1.45, ~12% overstated) and max_drawdown 25.32% (not ~18.9%, understated by a third), with Sharpe only 0.477. The trade count is close (493 vs 503, ~2%), so the run plausibly covers the same rules/history, which makes the profit-factor and drawdown gaps a genuine failure of the pre-registered numbers rather than a different-window artifact.
Analysis
Benjamini-Hochberg at q=0.10 over 267 programme candidates keeps 4. A candidate that does not survive here is not distinguishable from the programme's own noise, however good its individual statistics look.
Outcome Summary
NearDualTimeframeMomentumConfluence4-3f723ee995
Outcome Summary
This strategy extended the factory's only paper-reaching family (4H+1D dual-timeframe momentum confluence) onto the higher-volatility NEAR perp, adding ATR-based volatility-targeted sizing to keep risk-per-trade constant. The initial backtest was encouraging — 493 trades, PF 1.31, avg per-trade return 1.20% well clear of fees, profitable across all three volatility terciles — and the analyst approved it for optimization. But optimization exposed the edge as fragile: the one-shot holdout came back negative (Sharpe -0.23, well below the 0.70 ratio floor), the deflated Sharpe dropped to 0.47, and the candidate did not survive the programme FDR. Before a final analyst verdict could be recorded, the analyzing stage timed out three times in a row and the run was abandoned after 2 iterations.
Outcome Summary
A modest-Sharpe momentum-confluence edge with a straddling-zero CI can pass the pre-optimization gate yet fail the holdout and FDR under deflation; a slow ~80-trade/yr strategy also leaves the out-of-sample vault underpowered, so future iterations should expect forward paper to be the real out-of-sample test.
Outcome Summary
The backtest-review analyst voted to optimize, but the strategy never received a final promote/iterate/abandon verdict — it was abandoned after the analyzing stage stalled with 3 consecutive timeouts (analyzing_stuck_3_timeouts).
Outcome Summary
A long-short 4H+1D dual-timeframe momentum-confluence trend follower on the higher-volatility NEARUSDT.BINANCE USD-M perp, adding volatility-scaled (ATR-targeted) sizing to the only OHLCV family that had previously reached paper, betting NEAR's larger swing amplitude would give more fee headroom.
Outcome Summary
The initial backtest showed 493 trades over 5.9 years with profit factor 1.31, Sharpe 0.48 (CI -0.31 to 1.32), 25.6% max drawdown and a healthy avg_trade_return_pct of 1.20% (~8x the fee floor). After 3-phase optimization the holdout failed (holdout Sharpe -0.23, ratio -0.196 vs the 0.70 floor) and the deflated Sharpe fell to 0.47 with the candidate not surviving the programme-level FDR.
Backtest and paper results are hypothetical. Trading involves risk of loss.