What Is Backtesting?

What Is Backtesting?

Backtesting lets you test a trading strategy against historical market data to see how it would have performed. Instead of risking real money, you validate your strategy's logic with past prices.

Why Backtest?

  • Validate logic: Does your strategy actually work?

  • Measure performance: What returns, drawdown, and win rate can you expect?

  • Compare strategies: Which approach performs better?

  • Optimize parameters: Find the best indicator settings

  • Build confidence: Trade with conviction, backed by data

How It Works in HyperSync

Your Strategy Config


┌──────────────────────┐
│  Backtest Engine       │
│                        │
│  1. Fetch historical   │ ← Hyperliquid candle data
│     candle data        │
│                        │
│  2. Calculate          │ ← RSI, MACD, BB, etc.
│     indicators         │
│                        │
│  3. Simulate trades    │ ← Walk through each candle
│     bar by bar         │
│                        │
│  4. Track performance  │ ← PnL, equity curve, metrics
│                        │
│  5. Include funding    │ ← Hyperliquid funding rates
│     rates              │
└──────────────────────┘


  Detailed Results Report

What You Get

Performance Metrics

Metric
Description

Total Return

Overall percentage gain/loss

Sharpe Ratio

Risk-adjusted return (higher is better, >1 is good)

Sortino Ratio

Like Sharpe but only penalizes downside volatility

Calmar Ratio

Annual return / max drawdown

Max Drawdown

Largest peak-to-trough decline

Win Rate

Percentage of profitable trades

Profit Factor

Gross profit / gross loss (>1 means profitable)

Average Win/Loss

Average winning trade vs average losing trade

Total Trades

Number of trades executed

Visual Results

  • Equity Curve: Chart showing account value over time

  • Drawdown Chart: Visualization of drawdown periods

  • Trade Markers: Entry and exit points on the price chart

  • PnL Distribution: Histogram of trade returns

Trade-by-Trade Breakdown

Every simulated trade is logged:

  • Entry time and price

  • Exit time and price

  • Side (long/short)

  • Position size

  • PnL (dollar and percentage)

  • Duration

Key Features

  • Historical Hyperliquid data: Uses real candle data from Hyperliquid

  • Funding rate inclusion: Accounts for Hyperliquid's funding rates

  • Realistic simulation: Includes slippage estimates and fee calculations

  • Custom date ranges: Test any historical period

  • Fast execution: Runs in a background worker for non-blocking UX

Last updated