Philosophy
Backtesting market making strategies cannot perfectly simulate reality:- Queue Position — Order books are FIFO (First In, First Out). You never know your position in the queue because exchanges don’t reveal participant order positions.
- Path Dependency — If one fill differs between backtest and live, all subsequent behavior diverges. The correlation breaks with a single mismatched order.
- Order Book Opacity — Thick order books (like USDT/BRL with $600K at the first level) mean your orders may never fill even if price touches your level.
What Backtesting Is Good For
Supported Executors
The backtesting engine works with controllers using these executors:Candle Resolution
One-second candles are crucial for market making backtests. With one-minute candles, the engine can only simulate one fill per minute. Real market making often has 30+ fills per minute. One-second resolution captures the granularity needed.Currently, only Binance Spot provides one-second candles. You may need a server in a region where Binance is accessible, or use Tailscale to route requests through an allowed region.
Running Backtests
Via Hummingbot Scripts
Hummingbot includes backtesting scripts in thescripts/ folder:
- Processing time (e.g., “34 seconds for 0.5 days”)
- Interactive Plotly chart in browser
Via Condor Web Dashboard
- Navigate to Bots → Backtest
- Select a controller config
- Set the time range
- Run and view results
Interpreting Results
Chart Panes
The Plotly output has three panes:P&L Lines
Executor Colors
Example Analysis
Portfolio Allocation: 2% vs 10%
2% allocation:- Inventory builds gradually
- Trading continues through drawdowns
- More consistent activity
- Inventory builds quickly
- May hit max position during drawdowns
- Trading stops if position is underwater and at max (profit protection enabled)

