Skip to content

Strategy Backtesting

Robonet backtests use the Jesse Framework with historical data from Hyperliquid. This guide covers execution, parameters, and result interpretation.

Running Backtests

Request backtests conversationally:

"Backtest Momentum Strategy on ETH-USDC from 2024-01-01 to 2024-06-30 using 4h timeframe"
"Run a backtest on BTC-USDC for the last 6 months"

Results display as equity curve charts and performance metrics. See Chat Interface Guide for details.

Parameters

Required

ParameterDescriptionFormatExample
strategy_nameStrategy identifierStringMomentumStrategy
symbolTrading pairBASE-QUOTEBTC-USDC, ETH-USDC
timeframeCandle interval1m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1D, 3D, 1W4h, 1D
start_dateBacktest startYYYY-MM-DD2024-01-01
end_dateBacktest endYYYY-MM-DD2024-06-30

Optional

ParameterDescriptionDefaultValid Range
starting_balanceInitial capital (USDC)10,000100 - 1,000,000
leveragePosition leverage1x1x - 10x
feeTrading fee percentage0.04%0% - 1%
slippageExpected slippage0.1%0% - 2%
warmup_candlesIndicator warmup period30050 - 1000

Default fee (0.04%) matches Hyperliquid's maker/taker rates. Default slippage (0.1%) is conservative for typical market conditions.

Result Metrics

Returns

MetricDescriptionTarget
Total ReturnCumulative P&L percentagePositive
Annual ReturnAnnualized return rate>15-20%
Net ProfitTotal P&L in USDC after feesPositive
Profit FactorGross profit ÷ Gross loss>1.5

Risk

MetricDescriptionTarget
Max DrawdownLargest peak-to-trough decline<20%
Sharpe RatioRisk-adjusted returns (volatility)>1.0
Sortino RatioRisk-adjusted returns (downside only)>1.5
Calmar RatioAnnual return ÷ Max drawdown>1.0

Trade Statistics

MetricDescriptionTypical
Win RatePercentage of winning trades45-65%
Total TradesNumber of trades executed30+ for statistical significance
Average Win/LossMean profit vs mean loss per tradeWin > Loss
ExpectancyExpected profit per tradePositive
Max Winning/Losing StreakLongest consecutive run

Position Breakdown

MetricDescription
Longs Count / Shorts CountLong vs short position count
Longs % / Shorts %Directional bias percentage
Average Holding PeriodMean trade duration (hours)

Equity Curve

Results include equity curve data (timestamp and portfolio value pairs) for charting. Look for steady progression, reasonable drawdown depth/duration, and consistency across market regimes.

No Trades Generated

If a backtest produces zero trades:

  • Entry conditions may be too restrictive
  • Timeframe may not match indicator requirements
  • Date range may be insufficient for strategy logic
  • Symbol volatility may not trigger conditions

Test longer periods, different timeframes, or adjust entry thresholds.

Data & Execution

Historical Data

  • Source: Hyperliquid production OHLCV candles
  • Symbols: All Hyperliquid Perpetual pairs (BTC-USDC, ETH-USDC, SOL-USDC, etc.)
  • Timeframes: 1m, 3m, 5m, 15m, 30m, 45m, 1h, 2h, 3h, 4h, 6h, 8h, 12h, 1D, 3D, 1W, 1M
  • History depth: 1-3 years depending on symbol
  • Quality: No gaps or missing data

If a symbol/timeframe combination lacks sufficient history for your date range, try shorter periods or more established symbols (BTC/ETH have longest history).

Execution Engine

  • Framework: Jesse Framework
  • Speed: 20-40 seconds for typical 6-month backtest
  • Price model: Candle close prices for entry/exit
  • Fees/slippage: Realistic modeling with configurable parameters

Validation Best Practices

Overfitting Prevention

Standard backtesting limitations apply: strategies can be over-optimized for historical data and fail forward. Key indicators of overfitting:

  • Win rate >75%
  • Very few trades (<30 in test period)
  • Dramatic performance drop on out-of-sample data
  • Excessive complexity (>10 indicators or conditions)

Walk-Forward Testing

Validate strategies on multiple time periods:

  1. Train on Period A (e.g., 2023)
  2. Optimize if needed
  3. Validate on Period B (e.g., 2024) without modification
  4. Similar performance across periods indicates robustness

Example: Robust strategy

Training (2023): +32% return, 1.8 Sharpe, 52% win rate
Validation (2024): +28% return, 1.6 Sharpe, 49% win rate

Example: Overfitted strategy

Training (2023): +45% return, 2.5 Sharpe, 78% win rate
Validation (2024): -8% return, 0.3 Sharpe, 42% win rate

Other Limitations

  • Market regime changes may invalidate historical patterns
  • Backtests don't capture exchange outages, liquidity gaps, or execution issues
  • Slippage can exceed assumptions during high volatility
  • Ensure indicators don't use look-ahead data

Common Issues

IssueSolution
No data availableSymbol/timeframe lacks sufficient history. Try shorter date range or check Trading Venues.
No trades generatedEntry conditions too restrictive. Test longer periods or adjust thresholds.
Slow execution (>2 min)Long date ranges (>2 years) or high-frequency timeframes (1m). Use shorter ranges or lower frequency.