Skip to content
All strategies

Strategies

BCH Hyperliquid 4H:GARCH–非线性分位数边界反转

Outcome: Abandoned

BchHyperliquidGarchQuantileReversal

Outcome Summary

The Research Lead turned Benson's GARCH-quantile-regression idea into a long/short BCH perpetual strategy on Hyperliquid's 4H bars, trading reversals from fitted quantile bands. After 2 iterations the baseline backtest made 421 trades and returned -25.96% (Sharpe -1.76, profit factor 0.759). Costs swamped a modest gross edge, and the strategy lost in every year and volatility regime. The analyst abandoned it at the backtest review for negative expectancy, so optimization, risk review and promotion were never reached. The analyst noted that this rejects this particular version, not GARCH-quantile methods in general.

Hypothesis

Derived by the Research Lead from 🏆Benson's FMZ article “GARCH-QR非线性回归(GQNR)交易模型”: 将作者提出的“预测条件波动率与上下分位数边界,触及上界看回调、触及下界看反弹”具体化为BCH永续合约4小时双向策略。原文没有完整可执行代码、默认参数、退出规则或明确的VaR响应变量,因此本方案不是作者策略的精确复现。Research Lead选择以单周期对数收益作为分位数回归响应、GARCH预测标准差作为解释变量,并补充因果滚动训练、交易成本门槛、回归目标、保护性止损及时间退出。附件是散点与0.05、0.25、0.5、0.75、0.95分位数曲线及最小二乘曲线的教学图,没有交易品种、K线周期或买卖标记,不构成交易绩效证据。关联GA文章未成功读取,不能复现作者未公开的GA实现;采用确定性的凸分位数损失求解。使用信号柱收盘市场成交,符合连续市场的执行能力;保护性止损由平台在柱内匹配。所有收益数字均为待检验预测。

双向交易优先缓解目前78.7%为long-only的最大方向偏差,同时补充仅11.2%的Hyperliquid覆盖。选择BCH而非BTC,并使用4H以避免Hyperliquid短周期历史不足。corpus_concentration为空,不能声称BCH确实低于15%或从未测试。与列出的SMA、RSI、资金费率反转及配对交易不同,本实验直接检验条件收益尾部分位数能否识别可逆的价格超调。没有为了配额把原文方向反转机制改成期权或跨市场套利。

negative_expectancy: the Research Lead's BCH Hyperliquid 4H operationalization loses after modeled costs on 421 closed trades: average trade return -0.266% versus the +0.15% venue review floor, PF 0.759 and return -25.96%. QA's cost and calm-regime concerns are confirmed with funding now credited. The baseline does not justify a broad parameter search. This rejects this operationalization at its registered sizing and execution assumptions, not Benson's unspecified source model or GARCH–quantile methods generally. The fixed sizing cap cannot be reduced through developer iteration.

Implementation

BCH Hyperliquid 4H two-sided GARCH quantile-boundary reversal. A causal GARCH(1,1)-style forecast sigma_t (weights 0.02 rolling variance / 0.08 r^2 / 0.90 h) is the regressor; the one-bar log return is the response. Every refit_bars bars, Legendre-polynomial (degree 2-4) quantile regressions at tail_quantile, 0.5 and 1-tail_quantile are fit on the trailing training_window (sigma, return) pairs by exact pinball-loss minimisation. When the current return falls below the predicted lower quantile (signal >= 1) it goes long; above the upper quantile (signal <= -1) it goes short, if the reversion target (prior close x exp(median)) clears min_target_return after the fee reserve. It exits at the target or after max_hold_bars, with an intrabar reduce-only stop at stop_sigma x sigma. Sizing: 0.5% equity risk per stop distance, capped at 30% of equity notional.

Iteration 2 fix for Layer 3 'no trades'. Root cause: the ADMM pinball solver's stopping test compared un-normalised max/sum residuals over 480 points against 1e-4, so it never converged within 1000 iterations. _fit_quantiles therefore always returned False, model_ready stayed False and should_enter could never fire. Reproduced on synthetic data: the old rule had not converged after 1000 iterations for any of the three quantiles; it needed 2300-3100. Fix: replace ADMM with the Frisch-Newton primal-dual……Show moreShow less

Iteration 2 fix for Layer 3 'no trades'. Root cause: the ADMM pinball solver's stopping test compared un-normalised max/sum residuals over 480 points against 1e-4, so it never converged within 1000 iterations. _fit_quantiles therefore always returned False, model_ready stayed False and should_enter could never fire. Reproduced on synthetic data: the old rule had not converged after 1000 iterations for any of the three quantiles; it needed 2300-3100. Fix: replace ADMM with the Frisch-Newton primal-dual interior-point LP solver (Koenker-Portnoy rq.fit.fnm). It minimises the same unsmoothed convex pinball loss, matching a 40k-iteration ADMM optimum to ~1e-11, but converges in 10-25 iterations. Its convergence test is a duality gap <= solver_tolerance x n. Offline replay of calculate_signal/should_enter on the last 3669 bars (the sandbox length): about 2700 bars with a valid quantile prediction, about 540 boundary breaches, and about 262 entry signals (126 long / 136 short). That replay approximated hold plus cooldown, so expect fewer actual trades. The replay ran in about 21 s, against 148 s for a converging ADMM. Signal, entry, exit, stop, sizing logic and all research-plan parameters are unchanged; solver_iterations and solver_tolerance are solver internals, not tunable.

Verification Results

Leave as is for this contract. The analyst should weigh impact_cost against capacity on the full backtest. A future contract could cap notional at a fraction of capacity_usd.

position_size() allows notional up to 30% of equity (max_notional_equity_fraction, fixed by the research contract). The sandbox reports capacity_usd ~$23.5k and impact costs about 3.6x commissions, so at $100k equity the cap sits above the measured capacity of BCHUSD.HYPERLIQUID. This faithfully implements the contract, so it does not block.

Optional: seed forecast_variance with the rolling variance on the first full window, or remove the dead branch.

The GARCH recursion starts from h=0 and warms up while the rolling-variance buffer fills. The 'n==variance_window and forecast_variance<=0' initialisation therefore never fires. This does no harm: 0.9^360 is negligible, and training pairs are only collected once the buffer is full. The line is dead code.

None required.

min_bars_required() returns 1. This is intentional: internal warmup (variance_window + training_window, about 840 bars) is enforced through model_ready/prediction_valid, so no entry can occur before the model is fitted. The static-analysis base_shadow warning is a false alarm.

The sandbox (613 days, 335 closed trades, unoptimized) shows avg_trade_return_pct -0.107%, PF 0.87 and Sharpe -0.83. Gross before costs is close to flat. Impact is large: total_impact_usd $20.6k against $5.8k of commission on $12.8M traded notional, roughly 0.16% of notional, with capacity_usd ~$23.5k. The fixed 30%-of-equity notional cap therefore already exceeds BCH Hyperliquid's estimated capacity at $100k equity. This is a contract-fixed value, so it is advisory here, not a sizing defect. funding_events_available=0, so Hyperliquid funding was not credited in the sandbox. What to check first on the full backtest: (1) whether the 0.8% min_target_return gate leaves an average gross reversion clearly above about 0.09% fees plus about 0.16% impact; (2) whether the calm-regime loss (Sharpe -3.0) persists, since tail breaches in calm regimes may be noise rather than overshoot.

Backtest Review

Sharpe
-1.76
Total return
-25.96%
Max drawdown
27.10%
Trades
421
Win rate
46.1%
Profit factor
0.76

Code implements causal lower-tail buying and upper-tail selling; the detail file confirms 200 long and 221 short closed trades with variable sizing.

Accounting reconciles, no positions remain open, and funding is credited: net funding across trades is +$156.43.

QA's economic concern is borne out: 421 trades produce -25.96% return, PF 0.759 and Sharpe -1.76; average trade return is -0.266% versus the Hyperliquid review floor of +0.15%.

Mean directional entry-to-exit price return is only +0.137% before costs. Modeled impact is $26,933 and commission $7,327; restoring both yields approximately +$8,297, so costs overwhelm a modest gross price edge.

Every calendar year and volatility regime loses; calm-regime Sharpe is -3.43. The one-bar forecast diagnostic supplies no positive corroboration: IC -0.0224, t=-1.53.

Buy-and-hold returns -17.39% with approximately 71.41% drawdown on the stored sampled curve; the strategy loses more despite near-zero beta.

The verdict could not be saved to the requested outbox path because filesystem access is read-only.

Iteration History

Verification failed (Layer 3 — sandbox backtest): No trades produced Bar type used: BCHUSD.HYPERLIQUID-4-HOUR-LAST-EXTERNAL, Bars processed: 3669 Diagnostics: should_enter() returned a side 0 times over 3669 evaluated bars -> your ENTRY CONDITION never triggered. Loosen the entry logic / thresholds. Ensure your strategy produces trades with the given data and parameters.

Outcome Summary

The gross price edge was small (about +0.137% per trade before costs) and $26,933 of modeled impact plus $7,327 of commission wiped it out, so a band-reversal signal on 4H BCH needs a much larger edge per trade, or lower trading costs, before it is worth running.

At the backtest review the analyst voted to abandon before optimization because of negative expectancy. The average trade return of -0.266% fell short of the +0.15% Hyperliquid floor, and the analyst judged that the baseline did not justify a broad parameter search.

A two-sided BCH Hyperliquid 4H mean-reversion strategy adapted from Benson's FMZ GARCH-QR article: a GARCH volatility forecast drives a causal rolling polynomial quantile regression of next-bar returns; it buys at the lower quantile band, sells at the upper band, and exits on a median target, a sigma-based stop or a time limit.

Over 421 closed trades (200 long, 221 short) from 2024-08-21 to 2026-10-09, the backtest returned -25.96% with Sharpe -1.76, profit factor 0.759, a 46.1% win rate, an average trade return of -0.266% and a 27.1% max drawdown. It lost money in every volatility regime (calm-regime Sharpe -3.43), and the forecast IC was -0.0224 (t=-1.53).

Analysis

GARCH-QR非线性回归(GQNR)交易模型

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