Skip to content

research: add Lighter vault-of-vaults backtests NB01-NB02 - #44

Open
miohtama wants to merge 1 commit into
masterfrom
research/lighter-vault-of-vaults
Open

research: add Lighter vault-of-vaults backtests NB01-NB02#44
miohtama wants to merge 1 commit into
masterfrom
research/lighter-vault-of-vaults

Conversation

@miohtama

Copy link
Copy Markdown
Contributor

What

Ports the Hyperliquid vault-of-vaults research chain to the Lighter (ZK-rollup perps DEX) public-pool universe — synthetic chain 9998, 34 USDC pools, synthetic lighter-pool-{account_index} addresses. Restricting to USDC also excludes Lighter's separate USDG-denominated Robinhood Chain deployment published under the same synthetic chain id.

01-lighter-initial.ipynb

Replicates hyperliquid-waterfall-rc/17-backtest-overspent-fix.ipynb on Lighter: positive trailing-180-day-Sharpe gate, 0.875-year age ramp, 20-pool basket, 20% concentration and pool-TVL caps, synchronous-cash cap, 100,000 USD initial capital, 2025-08-01 → 2026-07-10.

Metric Result
Cumulative return / CAGR 20.60% / 22.12%
Sharpe / Sortino 0.70 / 1.12
Max drawdown -26.65%
Trades / positions 1,985 / 99
Mean accepted deployment / mean cash 80.4% / 21.5%

The synchronous-cash cap completes without OutOfSimulatedBalance. Capacity is the binding constraint: the young, thin cohort leaves ~1.9 signals per cycle pool-size-capped.

02-backtest-rebalancing-method-trials.ipynb

Reruns all 31 catalogued rebalancing methods (NB22–NB158) on the same Lighter universe, mirroring hyperliquid-waterfall-rc/04-backtest-rebalancing-method-trials.ipynb. All 31 complete. Best holdout Sharpe is 1.49 (NB101, age ramp + 30d trend overlay), with the NB158 waterfall baseline a co-leader at 1.48 and the highest holdout CAGR (73.72%). Method ranking inverts relative to Hyperliquid — NB28 (diversified waterfall), the Hyperliquid headline winner, is the single worst method on Lighter.

The dominant robustness caveat: neutralising each method's top 5% of profitable days turns all 31 methods negative over the full period, so the entire Lighter result is tail-driven. Full analysis in the notebook headings; a venue-comparison analysis of why Lighter underperforms Hyperliquid follows as a PR comment.

Dependencies

Needs the Lighter universe support merged today: trade-executor #1572 with companions trading-strategy #241 and web3-ethereum-defi #1348 (all merged).

🤖 Generated with Claude Code

Port the Hyperliquid vault-of-vaults research chain to the Lighter
(ZK-rollup perps DEX) public-pool universe (synthetic chain 9998,
34 USDC pools):

- 01-lighter-initial.ipynb — replicates the Hyperliquid overspent-fix
  release candidate (positive 180d-Sharpe gate, 0.875y age ramp,
  20-pool basket, synchronous-cash cap) on Lighter. Completes without
  OutOfSimulatedBalance: 20.60% cumulative return, 22.12% CAGR,
  0.70 Sharpe, -26.65% max drawdown, 1,985 trades.

- 02-backtest-rebalancing-method-trials.ipynb — reruns all 31
  catalogued rebalancing methods on the same Lighter universe.
  Best holdout Sharpe is 1.49 (NB101 age ramp + trend overlay) vs
  3.81 on Hyperliquid; outlier-neutralising the top 5% of profitable
  days turns every method negative, so the whole Lighter result is
  tail-driven.

Requires trade-executor PR #1572 with companion trading-strategy #241
and web3-ethereum-defi #1348 (all merged) for Lighter universe support.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@miohtama

Copy link
Copy Markdown
Contributor Author

Why does Lighter underperform Hyperliquid — weaker vaults, or something else?

A first-pass, strategy-free comparison of the two raw vault populations (current metrics feed, same eligibility floors: peak TVL ≥ $7.5k, deposits open) says the raw Lighter pools are not weaker — their medians are slightly better:

Population stat Hypercore (n=351) Lighter USDC (n=34)
Median age 0.67y 0.73y
Median lifetime CAGR −19.8% −8.5%
Share with positive lifetime CAGR 35% 44%
Median 3M Sharpe −0.01 0.56
Median current/peak TVL 48% 32%

Both populations are majority-losing; both venues' profits live in a winning tail. So the backtest gap (3.8 holdout Sharpe on Hyperliquid vs ~1.5 on Lighter) needs another explanation.

Suspected drivers, ranked

  1. Universe curation asymmetry (prime suspect). The Hyperliquid backtests do not run on the raw population — build_hyperliquid_vault_universe() takes the top 120 of ~350+ eligible vaults sorted by trailing 1-year CAGR. That is recent-winner pre-selection baked into the universe before the strategy runs (disclosed in the HL trial plan as static-membership survivorship bias). The Lighter universe is all 34 eligible pools — there is nothing to cut, so its numbers are more honest. Part of the gap is likely that the Hyperliquid numbers are inflated, not that Lighter is deficient.
  2. Breadth / selectivity. A 20-vault basket from a curated 120 picks the top ~17% of a winner-tilted pool. A 20-pool basket from 34 is 59% of the universe — selection has almost no room to avoid the losing majority. Evidence: in NB01 a single pool (K Pool, +32.1k USD) earns more than the entire net profit (+20.6k USD), i.e. the median held pool detracts.
  3. Early-window scarcity. Few Lighter pools pass the gates before ~Nov 2025. The full-period vs holdout split already shows it: NB158 scores 0.72 Sharpe over the full period but 1.48 on the clean extension holdout.
  4. Residual venue effects. Pool composition (discretionary perp-trader pools), data quality/discrete NAV jumps feeding the tail-driven result. Probably second-order given the population stats above.

How to test each driver

  • A. Curation ablation (cheapest, most decisive): rerun the Hyperliquid NB158 baseline with top_n=None — the full eligible Hypercore population instead of the top-120-by-1Y-CAGR. If Hyperliquid collapses toward Lighter's numbers, the gap is mostly curation, not venue quality.
  • B. Matched-breadth test: run the Hyperliquid baseline on ~20 random 34-vault subsamples of its universe; compare the Sharpe distribution against Lighter's 0.72. Prices the breadth penalty directly.
  • C. Strategy-free equal-weight buy-and-hold index per venue over the identical backtest window from the daily share-price data: median vault return, % positive, pooled skew/kurtosis. Ground truth for "are the assets weaker over this exact window".
  • D. Signal efficacy (rank IC): Spearman correlation between the age-ramp/Sharpe ranking at t and forward 30-day vault returns, per venue — does the signal predict on Lighter at all, or is there no cross-sectional dispersion to harvest?
  • E–F. Age-aligned event-time return curves and BTC/ETH beta regressions if A–D leave a residual gap (BTC fell ~44% over the window).

One more piece of existing evidence: the Hyperliquid trials survived outlier-neutralisation (NB158 stayed strongly positive after removing its best day), while on Lighter all 31 methods go negative — consistent with the breadth story: Hyperliquid had enough winners to diversify the tail, Lighter has ~3–5 pools carrying everything.

Suggested next step: a single 03-research- notebook implementing A + B (both are reruns of existing machinery with a changed universe argument), with C/D added in the same notebook since the universe data is already loaded there.

🤖 Generated with Claude Code

@miohtama

Copy link
Copy Markdown
Contributor Author

How to make a Lighter allocation strategy profitable

Refocusing from venue parity to strategy design: given 34 majority-losing pools, breadth-style allocation (hold ~20 names) is structurally unprofitable here — the trials confirm every diversified method is tail-driven. The design has to become selective and defensive. Grounding facts from the metrics feed and the NB01/NB02 runs:

  • LLP (the protocol market-making pool) is the hurdle. 1.5y of history, 0% operator fee, net CAGR: 19.1% (1Y), 8.8% (3M), 4.7% (1M). Our NB01 strategy did 22.12% CAGR with a -26.65% drawdown — it barely beats passive LLP on return and almost certainly loses after risk. A Lighter strategy earns its complexity only if it beats LLP-plus-cash on risk-adjusted terms.
  • The left tail is structural, and visible in advance. 7 of 34 eligible pools have lost ≥50% lifetime, and most are declared levered directional bets — "LINK 2x long" (-100%), "ETH 3x long" (-97%), "BTC 3x long" (-84%). These are leveraged market beta wearing a vault costume; holding them in a vault-of-vaults during a -44% BTC window does exactly what the label says.
  • Exits are actually executable on Lighter. Pool withdrawal cooldown is 5 minutes (LIGHTER_POOL_LOCKUP), versus multi-day epochs elsewhere. Stop-loss discipline that is aspirational on other venues is real here.

Proposed design, mapped to tools we already have

  1. LLP core + quality satellite. Make LLP the default allocation and park all un-deployed capital there instead of cash — the existing YieldManager queue-vault machinery (built for the phase-aware strategies) does exactly this. Satellites: 5–8 concentrated picks, per-name cap raised to ~25–30%.
  2. Structural exclusion before statistical selection. Classify and exclude single-asset levered directional pools (name/description-based, curated into EXCLUDED_VAULTS). This removes most historical blow-ups with zero look-ahead — the leverage is in the pool's own label.
  3. Hard quality gate for satellites. The NB02 trials tell us which tools work here: PSR confidence-scaling (NB54 — best full-period CAGR, 41.8%), trend overlay on the age ramp (NB101 — best holdout Sharpe, 1.49), and dynamic re-ranking with willingness to hold back (NB29 — best full Sharpe 1.18 at only -8.7% drawdown). Combine: PSR floor + minimum track record + trend quality, sized by confidence.
  4. Cut the left tail mechanically. Per-pool drawdown-from-high-water-mark exit plus quarantine (the curator.py QUARANTINE_PERIODS machinery already exists), with no minimum hold on losers — keep slow-in (age ramp) but add fast-out. The 5-minute cooldown makes this honest in live trading.
  5. Regime scaling. The BTC/ETH benchmark pairs are already loaded in the universe; most Lighter pools are directional, so scale satellite gross exposure down when the market regime is negative and let the LLP core carry the book.
  6. Small data addition for a Lighter-native edge. Operator skin-in-the-game (pool_info.operator_shares / total_shares) and net flows exist in the Lighter public API but are not yet in our metrics feed (leader_fraction, netflow are unpopulated for chain 9998). A small eth_defi pipeline extension would unlock "operator has meaningful stake, low performance fee" as a forward selection prior — performance fees are already in the feed (0–30% spread across pools).

Expectations

A realistic target on today's universe is LLP-beating rather than Hyperliquid-matching: Sharpe ≥ 1.5, drawdown under ~10%, CAGR in the high teens to twenties — scaling up as the venue's pool count grows. Until then Lighter is best treated as a sleeve inside the existing cross-chain machinery rather than a standalone product.

Suggested notebook sequence

  • 03-research-pool-quality-panel — classify pools (structural beta vs discretionary), LLP standalone baseline with drawdown profile, simulate the drawdown-exit + quarantine rule ex-post, and signal IC for the gate candidates.
  • 04-backtest-llp-core-quality-satellite — LLP core + 5–8 pick satellite with PSR/trend gate, drawdown exits, regime scaling; benchmark against 100% LLP.
  • 05-opt — optimise gate thresholds and stop levels against the clean extension holdout only.

🤖 Generated with Claude Code

miohtama added a commit that referenced this pull request Jul 24, 2026
…3-NB05 (#47)

Continue the Lighter vault-of-vaults research chain (NB01-NB02, PR #44) to
its allocation conclusion:

- 03: rerun all 31 rebalancing methods on the 27-pool universe with declared
  leveraged-beta pools excluded (new curator blacklist rules), 5 positions,
  33% concentration. Headline Sharpe improves (best holdout 3.38, NB29) but
  outlier-neutralisation still turns every method negative.

- 04: port the Hyperliquid survivorship-free NB26 baselines (composite
  selection, equal vs inverse-vol + ret30 gate). The gate halves the
  drawdown (-41% -> -22%) but neither baseline is profitable.

- 05: implement the point-in-time redesign — LLP core plus hygiene-gated
  inverse-vol satellites (TVL floor, stale-mark and TVL-collapse rules),
  weekly cadence — against a 100% LLP benchmark. Finds and fixes a real
  framework hazard (weight normalisation scaling a lone satellite to 3x its
  cap ahead of Guinea Pool's collapse). Final verdict: 100% LLP dominates
  (Sharpe 2.33, -4.8% max drawdown) and vault trades fill fee-free at NAV,
  so the result is not a cost artefact.

Requires the pending trade-executor `build_lighter_vault_universe(
exclude_leveraged_beta=True)` blacklist-rule change (working tree, PR to
follow) on top of merged trade-executor #1572.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant