RESEARCH &
METHODOLOGY

247-day backtest. 5921 hours of real market data. Walk-forward validation. Four variants tested to isolate ML contributions.

Ablation Study. ML value-add quantified.

Four variants tested on identical 247-day period (June 2024 - March 2026) to prove each ML component's contribution.

+11.68%
APY improvement from regime detection + adaptive leverage (27% relative gain)
63%
Reduction in rebalance frequency with no-trade zones (246 → 92 rebalances)
4.32
Best Sharpe ratio achieved by regime-aware allocation
$694
Extra profit per $10k from ML vs static baseline
Variant APY Sharpe Max DD Sortino Profitable Hours Rebalances
A: Static 3x 42.94% 3.06 -9.49% 2.42 54.4% 246
B: + Regime + Adaptive Leverage 54.61% 4.32 -7.58% 4.06 53.8% 246
C: + Funding Prediction 46.62% 3.94 -7.49% 3.63 53.2% 246
D: Full System (Production) 52.10% 4.05 -8.11% 3.56 53.9% 92

Key Findings. What each component adds.

Regime Detection
HMM regime classification drives adaptive leverage: 3x in calm markets, 2x in trending, 1.5x in volatile. This adds +11.68% APY and improves Sharpe from 3.06 to 4.32.
Funding Prediction
LightGBM model forecasts SOL-PERP funding rates 24h ahead, enabling tactical basis trade sizing. Contributes incremental funding income through better entry timing.
No-Trade Zones
Regime-dependent rebalance bands (calm: ±8%, volatile: ±15%) prevent excessive trading. Reduces rebalances from 246 to 92 (63% reduction), saving $435 in transaction costs.
Production Choice
Variant D (full system) selected for deployment. Prioritizes cost efficiency with 52.10% APY and 63% fewer transactions. Better for live trading than max-performance Variant B.

Leverage Comparison. Risk vs reward.

hJLP strategy tested at 1x, 2x, and 3x leverage levels. Our edge: adaptive leverage that shifts with market regime instead of a static multiplier.

Configuration Leverage APY Sharpe Max DD Final Value
Conservative 1.0x 20.75% 3.78 -4.29% $11,359
Moderate 2.0x 33.94% 3.50 -7.00% $12,184
Fixed 3x 3.0x 37.54% 2.73 -9.48% $12,404
Our System (Adaptive 3x) 1.5x - 3.0x 54.61% 4.32 -7.58% $13,425
How Leverage Works:
• Borrow loop: Deposit USDC → buy JLP → borrow more USDC → repeat
• Gross yield: 25% base JLP fees × 3.0 = 75% gross income
• Borrow cost: 10% APY on 2x borrowed capital = ~20% annual cost
• Net advantage: 55% net yield, but 3x delta exposure requires hedging
• Our edge: Regime-adaptive leverage (calm=3x, volatile=1.5x) beats fixed 3x

Methodology. Rigorous validation.

Walk-forward validation with realistic position modeling and transaction costs.

Walk-Forward
  • Initial training: 90 days
  • Retrain interval: 180 days
  • Prevents look-ahead bias
  • Models realistic deployment
Position Modeling
  • hJLP: 3x leveraged JLP + short perp hedge (47% SOL delta × 3)
  • Basis: Long staked SOL (7% APY) + short SOL-PERP
  • Lending: Simple interest at 6% APY
  • Funding conversion: raw S3 rate / oracle price
Transaction Costs
  • Drift taker fee: 0.1% per perp open/close
  • JLP entry/exit: 0.3% each way
  • Borrow cost: 10% APY on leveraged capital
  • Effective rebalance cost: ~0.2% of capital moved
Data Sources
  • JLP NAV: Birdeye API (hourly)
  • SOL price: Pyth oracle data
  • Funding rates: Drift S3 dumps
  • 5921 hours total (Jun 2024 - Mar 2026)
Production Data Feeds
  • JLP NAV: Jupiter API (real-time)
  • SOL price: Pyth on-chain oracle (sub-second)
  • Funding rates: Drift SDK (real-time, on-chain)
  • Lending rates: Kamino / Marginfi APIs
  • Vault state: Solana RPC (confirmed commitment)

PnL Decomposition. Where returns come from.

Full system (Variant D) breakdown on $10,000 initial capital over 247 days.

$2,134
JLP fee income (leveraged)
-$565
Borrow costs (10% APY on 2x)
$224
SOL staking yield (7% APY)
$94
USDC lending income (6% APY)
$1,444
Funding rate capture
-$631
Transaction costs (92 rebalances)
Net PnL: $3,277
32.77% total return | 52.10% annualized APY

Future Work. What's next.

Planned improvements and expansion of the vault strategy.

Multi-Asset Basis Trade
Expand beyond SOL-PERP to scan all Drift perp markets (ETH, BTC, etc.) for optimal funding rate opportunities. Dynamically allocate basis capital to whichever market offers the best risk-adjusted funding.
Cross-Venue Execution
Route trades across multiple Solana DEXs and perp venues for better fills and reduced slippage. Integrate with additional lending protocols as they mature.
Advanced ML Pipeline
Online model retraining with live data. Ensemble methods combining HMM + transformer-based regime detection. Expanded feature set including on-chain flow metrics.
Multi-Vault Strategy
Separate risk-tiered vaults: conservative (lending-heavy, 1x), balanced (current strategy), and aggressive (higher leverage, more basis). Let depositors choose their risk profile.

Deep dive. Full documentation.

Complete methodology, code, and analysis available in our documentation.

Read Full Docs View Source Code Live Dashboard