Strategies
limin TqSdk Turtle: Faithful 20/10-Day Breakout and Frozen-N Pyramiding on LTC Hyperliquid
Outcome: Abandoned
LiminLtcTickTurtle
Outcome Summary
LiminLtcTickTurtle tried to replicate limin's Apache-2.0 TqSdk Turtle example on Hyperliquid LTC, executing on trade ticks and keeping N and unit size fixed for the length of each campaign. Over 3 iterations the code never got past verification. Every Layer-2 synthetic scenario crashed at setup on a self-imposed check that parameters.leverage must equal config.leverage. The pipeline abandoned the run in the verification loop, so backtesting, optimization, analyst review and risk review never ran.
Hypothesis
Translate limin's Apache-2.0 TqSdk Turtle demonstration at the supplied commit, preserving its actual rules rather than substituting textbook Turtle rules. Replace the original expired SHFE.au2006 gold contract with LTCUSD.HYPERLIQUID, a linear perpetual permitting both directions. Defaults are donchian_channel_open_position=20, donchian_channel_stop_profit=10, atr_day_length=20 and max_risk_ratio=0.5. Maintain a 100-slot daily candle buffer, including the developing current candle. Execution responds to changed last-trade prices, not daily closes. Start with target position=0 and last_price=NaN. Run parameter recalculation initially and subsequently only when a new daily candle starts WHILE FLAT. While invested, N and unit remain frozen, but the rolling 10-completed-day exit channel continues changing. Historical trade ticks are required to reconstruct the developing candle and execution sequence; daily OHLCV alone cannot faithfully reproduce this example. Missing adequate tick history makes the faithful experiment infeasible, rather than authorizing a close-only substitute.
The explicit request for faithful reproduction takes precedence over the preference against another daily trend strategy. Hyperliquid is underrepresented at 8.0% versus its 20% target, and both trading directions address the portfolio's 82.8% long-only concentration. LTC avoids adding another BTC or ETH experiment; corpus_concentration is empty, so its recent utilization cannot be verified. This preserves source-specific frozen-N sizing and quote-event sequencing, but remains in the broad Turtle family already represented by EtcTurtleDonchianBreakoutLS. It is a requested reproduction, not a claim of novel mechanism. Do not adopt performance claims or introduce optimization to rescue the reproduction.
verification_loop: Verification failed (Layer 2 — synthetic scenarios): Parameters used: ['leverage', 'kline_length', 'min_notional', 'atr_day_length', 'max_risk_ratio', 'pyramid_step_n', 'stop_distance_n', '_optimization_plan', 'unit_risk_fraction', 'contract_multiplier', 'donchian_channel_stop_profit', 'donchian_channel_open_position'] Check that __init__ sets all attributes from self.parameters.get(). - steady_uptrend: Setup error: RuntimeError: parameters.leverage must equal config.leverage - steady_downtrend: Setup error: RuntimeError: parameters.leverage must equal config.leverage - flat_ranging: Setup error: RuntimeError: parameters.leverage must equal config.leverage - volatility_spike: Setup error: RuntimeError: parameters.leverage must equal config.leverage - zero_volume: Setup error: RuntimeError: parameters.leverage must equal config.leverage - price_gap: Setup error: RuntimeError: parameters.leverage must equal config.leverage
Implementation
Faithful translation of limin's TqSdk Turtle on LTCUSD.HYPERLIQUID: trade-tick-driven 20-day Donchian breakout entries (long/short), frozen-N unit sizing (1% equity / N, N = simple-MA ATR(20) including the developing candle), 0.5N pyramiding gated by margin ratio <= 0.5, 2N stop from last adjustment price, and 10-completed-day channel exit. Daily candles are rebuilt from trade ticks.
Iteration 3 fixes Layer 1.5 (optimization_plan fixes leverage at 2.0): parameters now include 'leverage': 2.0 (float, type-matched) mirroring config.leverage=2.0; the code reads it, asserts it equals config.leverage, and uses it for the target margin-capacity check. Every other fixed plan value is present with the plan's exact type. No signal, entry, exit or sizing logic changed. Daily bars are reporting-only; execution requires historical trade ticks, and missing tick days fail loudly rather than falling back to closes.
Verification Results
Verification failed (Layer 2 — synthetic scenarios): Parameters used: ['leverage', 'kline_length', 'min_notional', 'atr_day_length', 'max_risk_ratio', 'pyramid_step_n', 'stop_distance_n', '_optimization_plan', 'unit_risk_fraction', 'contract_multiplier', 'donchian_channel_stop_profit', 'donchian_channel_open_position'] Check that __init__ sets all attributes from self.parameters.get(). - steady_uptrend: Setup error: RuntimeError: parameters.leverage must equal config.leverage - steady_downtrend: Setup error: RuntimeError: parameters.leverage must equal config.leverage - flat_ranging: Setup error: RuntimeError: parameters.leverage must equal config.leverage - volatility_spike: Setup error: RuntimeError: parameters.leverage must equal config.leverage - zero_volume: Setup error: RuntimeError: parameters.leverage must equal config.leverage - price_gap: Setup error: RuntimeError: parameters.leverage must equal config.leverage
Iteration History
Verification failed (Layer 1.5 — hypothesis/config consistency) [class=hypothesis_mismatch]: - optimization_plan fixes leverage at 2.0
Outcome Summary
Do not add hard constructor assertions that tie parameters to config values the verification harness may set differently; read leverage directly from self.config.leverage so the strategy can start in the synthetic and sandbox environments.
After 3 iterations the run was abandoned in the verification loop at Layer 2 (synthetic scenarios). All six scenarios failed at setup with 'RuntimeError: parameters.leverage must equal config.leverage', because the strategy's own __init__ guard raised an error whenever the leverage parameter did not match the harness config.
A faithful translation of limin's TqSdk Turtle demo to LTCUSD.HYPERLIQUID: tick-driven entries on a 20-day Donchian breakout, exits on a 10-day channel, and pyramiding sized by an N (20-day ATR) and unit that stay frozen while a position is open, with max_risk_ratio=0.5 and leverage fixed at 2.0.
No performance data exists: the backtest report is empty and there is no optimization report, so there are no return, Sharpe or trade-count figures.
Abandon Reason
verification_loop: Verification failed (Layer 2 — synthetic scenarios): Parameters used: ['leverage', 'kline_length', 'min_notional', 'atr_day_length', 'max_risk_ratio', 'pyramid_step_n', 'stop_distance_n', '_optimization_plan', 'unit_risk_fraction', 'contract_multiplier', 'donchian_channel_stop_profit', 'donchian_channel_open_position'] Check that __init__ sets all attributes from self.parameters.get(). - steady_uptrend: Setup error: RuntimeError: parameters.leverage must equal config.leverage - steady_downtrend: Setup error: RuntimeError: parameters.leverage must equal config.leverage - flat_ranging: Setup error: RuntimeError: parameters.leverage must equal config.leverage - volatility_spike: Setup error: RuntimeError: parameters.leverage must equal config.leverage - zero_volume: Setup error: RuntimeError: parameters.leverage must equal config.leverage - price_gap: Setup error: RuntimeError: parameters.leverage must equal config.leverage
Analysis
Turtle
Backtest and paper results are hypothetical. Trading involves risk of loss.