top of page
Search

Why the Bid/Ask Spread Matters in Backtesting

  • Sebastien Chabot
  • Apr 6
  • 2 min read

When conducting backtesting, most traders rely on publicly available market data, which typically provides a single price per time unit—whether it’s the last traded price, open, high, low, or close. However, this doesn’t reflect the true mechanics of the market.


In reality, at any given moment, there are two prices:

✔ The Bid – The highest price someone is willing to pay for an asset.

✔ The Ask – The lowest price someone is willing to sell at.


A trade only happens between these two prices, meaning any backtest that ignores the bid/ask spread could be inherently flawed.





How the Bid/Ask Spread Affects Backtesting Accuracy

A proper trading simulator should allow for different ways to model executions, such as:

🔹 Midpoint Execution (Aggressive Simulation) – Assuming you always execute at the average of the bid/ask spread. This optimistic approach can overestimate profits, especially for less liquid assets.

🔹 Market Execution (More Realistic for Many Strategies) – Assuming all buys happen at the Ask and all sells at the Bid. This accurately accounts for the cost of crossing the spread.

🔹 Adjusted Execution (For Wide Bid/Ask Spreads) – If a spread is particularly wide, it’s possible to model execution slightly inside the spread rather than at the extremes, assuming partial liquidity.

For high-frequency strategies, the impact of the bid/ask spread is even more pronounced. If a system makes hundreds of trades per day, failing to account for execution costs can create a false sense of profitability in backtests.

In contrast, for long-term strategies with infrequent trades, the spread has a much smaller impact—but should still be considered.






Key Takeaways for Traders and Quants

✔ Backtests ignoring bid/ask spreads tend to overestimate profits.

✔ The more frequent the trades, the more critical it is to model spreads properly.

✔ A realistic backtesting engine should allow for multiple execution models to simulate real-world conditions.


At TTG, we built Histo Data to capture high-precision bid/ask data for realistic backtesting. Our simulator allows traders to fine-tune their execution assumptions, ensuring their backtests reflect real-world market behavior.



Next Up: The Hidden Cost of Money in PnL Calculations

In our next article, we’ll discuss one calculation most traders forget in their profit and loss (PnL) models—the time value of money and how it impacts trading performance.



 
 
 

Commentaires


bottom of page