Skip to content
All strategies

Strategies

Hyperliquid DeFi Pair: Fade Temporary AAVE–UNI Return Dispersion

Outcome: Abandoned

HyperliquidAaveUniDispersionFade

Outcome Summary

The hypothesis was to fade temporary return dispersion between AAVE and UNI on Hyperliquid with an equal-dollar long-laggard/short-leader pair on synchronized 4-hour bars, and catalog inspection found 5,879 shared timestamps. The strategy went through 7 iterations, and the latest code notes that construction was blocked by conflicting source funding observations, with the trading logic kept as-is pending a data/loader repair. The backtest then failed with a FundingObservationError for hyperliquid/AAVEUSD and the run was abandoned. No backtest metrics were produced, and the review, optimization, analysis and risk stages were not reached.

Hypothesis

Test whether temporary disagreement between AAVE and UNI reverses after a shared sector move: buy the relative laggard and short the relative leader using synchronized 4-HOUR bars. This is an event-driven, equal-dollar pair, not a claim that their price levels are cointegrated. HyperliquidCollector supplies perpetual OHLCV. Exact local catalog inspection verified 5,879 shared close timestamps from 2024-01-25 through 2026-10-01, with two missing grid timestamps within that span. Signals use completed bars only; orders execute after signal formation. Expected capture and event frequency below are preregistered predictions, not measured results.

Hyperliquid is materially underrepresented at 6.8% versus its 20% target; this proposal also reduces the excessive single-symbol and long-only shares. Corpus concentration is unavailable, so instrument-specific novelty cannot be established. Unlike same-coin inter-exchange arbitrage, this mechanism targets percentage-point sector dispersion rather than small venue price discrepancies. Unlike the surviving momentum rotation, it takes the opposite side of temporary relative performance. The supplied library excerpts do not establish this mechanism, and no code is copied.

backtest_exception: vation raise FundingObservationError(f"conflicting funding rates in {source} at {second_ns}") src.backtesting.funding_input_audit.FundingObservationError: data_unavailable: conflicting funding rates in hyperliquid/AAVEUSD at 1789297200000000000

Implementation

Trades an equal-dollar AAVE–UNI perpetual pair after a correlated common sector move and temporary six-bar return dispersion. Buys the laggard and shorts the leader using exactly synchronized completed 4-hour bars. Closes both legs on captured dispersion, pair loss, holding limit, or loss of either leg; installs individual protective stops.

Iteration 7 cannot be repaired within strategy scope. The backtest loader raises FundingObservationError for conflicting hyperliquid/AAVEUSD funding observations at 1789297200000000000 before constructing the strategy. Inspection confirms that funding accounting is loaded for both perpetual legs independently of signal supplementary requirements, so removing signal subscriptions cannot fix this. The database query loads all timestamps without a research-window predicate; the reported conflicting timestamp is……Show moreShow less

Iteration 7 cannot be repaired within strategy scope. The backtest loader raises FundingObservationError for conflicting hyperliquid/AAVEUSD funding observations at 1789297200000000000 before constructing the strategy. Inspection confirms that funding accounting is loaded for both perpetual legs independently of signal supplementary requirements, so removing signal subscriptions cannot fix this. The database query loads all timestamps without a research-window predicate; the reported conflicting timestamp is after the locked final-exam boundary of 2026-04-18T00:00:00+00:00. Engineering must restrict funding reads to the authorized evaluation window before loading/auditing and resolve any in-window conflicting observations against authoritative source records, retaining valid per-leg funding accounting. Do not disable funding, select an arbitrary duplicate, change instruments, or loosen entry thresholds. Trading logic is unchanged; only the class docstring records the blocker, and that documentation change does not fix Layer 3. Fixed research values are preserved; tunable values use domain midpoints because the previous configuration was not supplied. No verification or final-exam evaluation was run. The requested outbox file was not written because this environment permits read-only filesystem access.

Verification Results

Add a stale-leg watchdog and a timestamp-based holding deadline that can close both legs independently of synchronized signal formation.

Pair risk checks require synchronized bars. When either leg's bar is missing, pair-loss and holding-limit exits are deferred until synchronized processing resumes. Individual protective stops remain available, but the 12-bar holding limit is not guaranteed during feed gaps.

Engineering should resolve conflicting funding observations within the authorized evaluation window and rerun verification with audited per-leg funding. Preserve funding accounting and the declared instruments.

The configuration reports a pre-construction FundingObservationError, while the supplied successful sandbox reports zero available funding events and no funding accrual. These inputs do not demonstrate a current successful run with valid funding accounting for both perpetual legs.

Profile data loading, funding auditing, engine execution, and order callbacks while preserving the hypothesis and evaluation coverage.

The sandbox required approximately 295 seconds for 4,715 processed bars. Strategy signal calculations use bounded buffers and incremental correlation sums; no expanding-history computation is evident, but runtime warrants engineering investigation before repeated optimization.

The sandbox reports 146 closed positions averaging -0.703% of notional, with profit factor 0.735. Assess full-history convergence after execution costs and valid per-leg funding accounting; these smoke-test results do not establish a correctness failure.

Analysis

Verification failed (Layer 3 — backtest process): the strategy could not be loaded/built in the backtest process: ory/src/backtesting/supp_collector.py", line 684, in _ensure_then_load_supp return await _load_supp_with_per_leg_funding(instrument_id, legs, db_url, keys) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/strategy-factory/src/backtesting/supp_collector.py", line 749, in _load_supp_with_per_leg_funding await load_supplementary_data(instrument_id, db_url=db_url,……Show moreShow less

Verification failed (Layer 3 — backtest process): the strategy could not be loaded/built in the backtest process: ory/src/backtesting/supp_collector.py", line 684, in _ensure_then_load_supp return await _load_supp_with_per_leg_funding(instrument_id, legs, db_url, keys) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/strategy-factory/src/backtesting/supp_collector.py", line 749, in _load_supp_with_per_leg_funding await load_supplementary_data(instrument_id, db_url=db_url, only_keys=keys) File "/opt/strategy-factory/src/backtesting/supp_collector.py", line 812, in load_supplementary_data hl_db_funding = await _load_hl_funding_from_db(db_url, base) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/strategy-factory/src/backtesting/supp_collector.py", line 598, in _load_hl_funding_from_db add_funding_observation(out, ts_ns, row[1], f"hyperliquid/{base_symbol}") File "/opt/strategy-factory/src/backtesting/funding_input_audit.py", line 26, in add_funding_observation raise FundingObservationError(f"conflicting funding rates in {source} at {second_ns}") src.backtesting.funding_input_audit.FundingObservationError: data_unavailable: conflicting funding rates in hyperliquid/AAVEUSD at 1789297200000000000

Iteration History

Verification failed (Layer 1.5 — hypothesis/config consistency) [class=hypothesis_mismatch]: - optimization_plan fixes leverage at 1.0

sandbox_timeout: Verification failed (Layer 3 — sandbox backtest): smoke test exceeded the 300s wall-clock limit on a ~20000-bar window (2400 days of AAVEUSD.HYPERLIQUID-4-HOUR-LAST-EXTERNAL). This almost always means per-bar work that scales with history — e.g. rescanning the full funding/supplementary series, or rebuilding a list and calling min()/sorted() inside calculate_signal()/on_bar() on every bar. Precompute sorted timestamp arrays ONCE in __init__ and use bisect, or cache lookups keyed by timestamp, so per-bar cost is O(log n) not O(n).

Verification failed (Layer 3 — backtest process): the strategy could not be loaded/built in the backtest process: ory/src/backtesting/supp_collector.py", line 684, in _ensure_then_load_supp return await _load_supp_with_per_leg_funding(instrument_id, legs, db_url, keys) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/strategy-factory/src/backtesting/supp_collector.py", line 749, in _load_supp_with_per_leg_funding await load_supplementary_data(instrument_id, db_url=db_url, only_keys=keys) File "/opt/strategy-factory/src/backtesting/supp_collector.py", line 812, in load_supplementary_data hl_db_funding = await _load_hl_funding_from_db(db_url, base) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/strategy-factory/src/backtesting/supp_collector.py", line 598, in _load_hl_funding_from_db add_funding_observation(out, ts_ns, row[1], f"hyperliquid/{base_symbol}") File "/opt/strategy-factory/src/ba

Outcome Summary

Duplicate or conflicting funding observations in the source data (here hyperliquid/AAVEUSD) should be found and fixed at the data/loader level before a strategy is coded, so the iteration budget isn't spent on a data fault that changing the strategy cannot fix.

On iteration 7 the run was abandoned with a backtest_exception: the funding input audit raised FundingObservationError (data_unavailable) because the source data had conflicting funding rates for hyperliquid/AAVEUSD at timestamp 1789297200000000000. Backtest review, optimization, analyst review and risk review were never reached.

An event-driven, equal-dollar Hyperliquid perpetual pair on 4-hour bars that buys the relative laggard and shorts the relative leader when AAVE and UNI returns temporarily diverge after a shared sector move, betting that the dispersion reverses (no claim of price-level cointegration).

No performance was measured: the backtest report is empty and there is no optimization report, so there are no figures for return, Sharpe or trade count.

Abandon Reason

backtest_exception: vation raise FundingObservationError(f"conflicting funding rates in {source} at {second_ns}") src.backtesting.funding_input_audit.FundingObservationError: data_unavailable: conflicting funding rates in hyperliquid/AAVEUSD at 1789297200000000000

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