Spectra
Browse docs

backtester

Realism settings

How the backtester models slippage, commission, partial fills, and gaps.


The backtester shares its fill engine with live trading. The settings below tune how realistically fills are simulated against historical bars.

Slippage

Mode      →  fixed bps  |  ATR fraction  |  book replay
Default   →  ATR fraction (0.05 × ATR(14))

book replay uses the historical L2 snapshot at the bar boundary — the most accurate option but only available for symbols where Spectra has L2 history (most futures and major crypto pairs).

Commission

Per share / per contract / percent
Default per broker connection (set in Profile → Brokers)

Backtests inherit your live broker's commission schedule by default, so paper P&L matches what you'd see on the same broker live.

Partial fills

Off                 →  every order fills 100% at the modeled price
Volume-weighted     →  fill % = min(qty, bar_volume × participation_cap)

Volume-weighted is more honest on illiquid instruments. Set participation_cap to your real-world ceiling (5% is typical).

Gap handling

Strict gap  →  stops execute at the next available price (worst case)
Best gap    →  stops execute at the gap level (optimistic)
Realistic   →  midpoint between strict and best

Strict is the safest setting for risk-of-ruin estimation. Realistic matches how fills tend to land on actively-traded markets.

Latency

Submission  →  N ms before the next bar opens
Cancellation →  N ms (default: same as submission)

If your strategy fires on bar close, latency models the time between your VM evaluating the bar and the order reaching the broker. 50 ms is realistic for a co-located worker; 250 ms for retail.

Realism settings · Spectra Terminal