Infrastructure livebacktestingliquiditymodelingrisk

Why Overlooking Liquidity Leads to Misleading Backtest Results

Explore how unrealistic liquidity assumptions inflate backtest performance and learn practical ways to model depth, spread, latency and fees for credible

By the Felix team6 min read

Produced with automation, then checked by deterministic quality rules and an independent source-grounded review before publication.

Key takeaways
  • 01Assuming infinite market depth removes realistic price impact and slippage.
  • 02Pricing trades at the mid‑price hides the true cost of the bid‑ask spread.
  • 03Zero‑latency assumptions inflate fill rates and distort win ratios.
  • 04Flat fee models ignore volume‑based commission structures and maker‑taker differentials.
  • 05High‑turnover strategies require dynamic impact modeling to avoid inflated returns.

Assuming that any amount of capital can be bought or sold instantly at the quoted price creates an overly optimistic view of a strategy’s performance. In reality, market depth, bid‑ask spreads, execution latency and fee structures all limit how much can be filled without moving the price, and ignoring these factors makes a backtest appear more profitable than it would be in live trading.

How does understanding Market Depth and Price Impact work?

Market depth describes the quantity of orders available at each price level in the order book. When a strategy submits a large order, it may consume the best‑available quotes and push the execution price deeper into the book. This price impact is a direct cost that reduces net returns.

  • The order book often thins during volatile periods, increasing impact.
  • Large orders may only fill partially, leaving residual exposure.
  • Depth varies across asset classes; crypto markets typically have shallower books than large‑cap equities.

How can I estimate realistic depth without live snapshots?

If live depth data is unavailable, use statistical models that relate typical volume to price impact based on similar assets, or calibrate a simple linear impact function using historical execution reports.

How does incorporating the Bid‑Ask Spread work?

Many backtests price trades at the mid‑price, effectively treating the spread as zero. In practice, every trade incurs at least half the spread, and aggressive orders pay the full spread. This hidden cost reduces net profit and can turn a marginally profitable strategy into a loss‑making one.

A realistic spread model is essential; otherwise the backtest ignores a fundamental source of trading friction.

Should I use the mid‑price or the last price for simulation?

The mid‑price is useful for passive, limit‑order strategies that capture the spread. For aggressive or market‑order strategies, the last trade price or a price adjusted for spread and depth provides a more accurate representation.

Modeling Execution Latency

Latency between signal generation and order placement allows market prices to move. Assuming zero latency creates a best‑case scenario where the intended price is always available. Incorporating realistic latency-often measured in milliseconds for high‑frequency contexts-adds uncertainty to fill prices and success rates.

  1. 01Measure typical latency on the target venue and use it as a baseline.
  2. 02Add a random delay within a realistic range to each simulated order.
  3. 03Re‑evaluate performance metrics after latency inclusion.

Dynamic Transaction Cost Modeling

Fixed commission assumptions ignore volume‑based fee schedules and maker‑taker differentials. As turnover rises, fees can increase non‑linearly, eroding profitability. Modeling fees as a function of trade size, side and market conditions provides a more accurate cost picture.

Impact of High Turnover on Realism

High‑turnover strategies generate many orders, amplifying the cumulative impact of spread, slippage and fees. Assuming low turnover while the strategy actually trades frequently creates a mismatch between simulated and real performance.

For deeper insight, see related discussions in Why Realistic Liquidity Modeling Matters for Backtests, How to Model Slippage Accurately in a Trading Backtest, and How Strategy Turnover Shapes Backtest Realism.

Frequently asked questions

What is the simplest way to add slippage to a backtest?

Apply a percentage or fixed‑point cost that scales with order size and market volatility, calibrated against historical execution data.

Is it ever acceptable to assume infinite liquidity?

Only for very small, low‑frequency strategies where order size is negligible relative to average market volume, and even then the assumption should be documented as a limitation.

How can I estimate realistic order‑book depth without live data?

Use statistical models that relate typical volume to price impact based on similar assets, or analyze historical depth snapshots if they are available.

What role does latency play in backtest accuracy?

Latency introduces price movement between signal and execution, so modeling a realistic delay prevents over‑optimistic fill assumptions.

How should fees be modeled for high‑turnover strategies?

Incorporate maker‑taker differentials and volume‑based tiered fees, adjusting the cost per trade based on size and side.

Sources and verification

Product claims in this article were checked against these first-party references. Runtime status remains authoritative for current availability.

Build with Felix now.

Felix infrastructure is live through MCP and the API. The Felix V1 retail quant-desk private beta is planned for September 22.

Keep reading

Not a brokerage, exchange, or investment adviser. Not investment advice. Trading involves risk, including total loss.