Strategies
Howtrader PairTradingStrategy by 用Python的交易员 — Frozen LTC/BCH Bybit Translation
Outcome: Backtesting
HowtraderFrozenLtcBchPair
Howtrader PairTradingStrategy by 用Python的交易员 — Frozen LTC/BCH Bybit Translation
Hypothesis
Faithful reproduction of the supplied MIT-licensed PairTradingStrategy by 用Python的交易员, commit fcad8e2d86825506b9d33441ab78be853c2c3bdd. Platform mapping: LTCUSDT.BYBIT is leg 1 and BCHUSDT.BYBIT is leg 2, both linear perpetuals in a NETTING MARGIN account with $100,000 initial equity and configured leverage 1.0. Preserve price_add=5, boll_window=20, boll_dev=2, fixed_size=1, leg1_ratio=1 and leg2_ratio=1. Crucially, fixed_size is never used: target positions are literally signed one-unit quantities, not capital-relative allocations. Ratios affect the spread only, never order quantities. This is a source-reproduction experiment, not a claim of a fee-viable edge. Do not add hedge estimation, normalized prices, filters, stops, adaptive sizing or optimization.
The explicit request for exact source defaults takes precedence over adapting the mechanism to improve performance. Bybit is under-represented at 2.7%, supports shorting and avoids Hyperliquid's sub-hourly history restriction. Two non-BTC assets reduce reliance on the saturated BTC series; corpus_concentration is empty, so their actual corpus shares cannot be verified. This differs from the failed DOGE inter-exchange OU trade by using two different assets on one venue, a raw arithmetic spread and fixed rolling bands, but retains substantial short-horizon mean-reversion fee risk. No empirical stationarity claim supports this particular instrument mapping.
Implementation
Frozen LTC/BCH Bybit translation using aligned minute bars, calendar five-minute spread observations, 20-observation population-standard-deviation Bollinger bands, opposite literal one-unit targets, midpoint exits, and leg-1-then-leg-2 limit reconciliation.
The reported Layer 1.5 failure comes from the frozen-plan validator checking parameters['leverage'], including its numeric type, independently of config.leverage. Both are now explicitly 1.0; strategy logic is unchanged and only the iteration header was updated. All source defaults and the registered research plan remain frozen. fixed_size remains unused and ratios affect only the spread, as explicitly required. Secondary bars must have exactly the primary timestamp. Native limit execution remains a documented approximation: marketable orders may fill at submission rather than first becoming eligible on a subsequent source bar. No verification was run. The required outbox file could not be written because this workspace permits read-only filesystem access; the complete bound JSON is returned here.
Verification Results
Carry this execution qualification into the experiment report and any comparison with source results.
Native marketable limits can fill at submission rather than on the source backtester's subsequent bar. The code documents this approximation, but the resulting fills do not establish exact source-backtester execution parity.
The truncated sandbox reports average closed-position return of -0.473%, with commissions and impact contributing materially. This is advisory evidence for full-history evaluation, not a correctness failure.
Iteration History
Verification failed (Layer 1.5 — hypothesis/config consistency) [class=hypothesis_mismatch]: - optimization_plan fixes leverage at 1.0
Analysis
PairTradingStrategy
Backtest and paper results are hypothetical. Trading involves risk of loss.