Why Overly Simple Liquidity Models Mislead Backtests
Explore how basic liquidity assumptions inflate backtest results and learn practical ways to add depth, slippage and cost realism for trustworthy simulations.
Produced with automation, then checked by deterministic quality rules and an independent source-grounded review before publication.
- 01Assuming unlimited market depth hides slippage and market impact.
- 02Treating every order as instantly fillable ignores order‑book dynamics.
- 03Leaving out commissions, fees and spread costs inflates profit estimates.
- 04Using stale mid‑prices or missing bars misrepresents execution conditions.
- 05Applying realistic turnover and position sizing narrows the gap between backtest and live performance.
Assuming perfect liquidity in a backtest creates a false sense of certainty. When a model treats every order as instantly filled at the quoted price, it ignores the frictions that real markets impose. This article explains the most common liquidity shortcuts that distort backtest outcomes and provides concrete methods for building more realistic simulations.
Why Liquidity Is Central to Backtest Accuracy
Liquidity determines how much of an asset can be bought or sold without moving the market price. In live trading, limited depth, order‑book gaps and latency all affect execution. A backtest that assumes unlimited depth will report fills that could never be achieved in practice, inflating returns and understating risk. For related context, see What Data Leakage Scenarios Can Invalidate a Trading Backtest?.
What Happens When Infinite Market Depth Is Assumed?
Many backtesting frameworks default to a fill‑at‑mid rule, where every trade is executed at the midpoint of the bid‑ask spread regardless of size. This removes slippage from the calculation, making strategies appear more profitable than they would be under real conditions.
- Large orders may cross multiple price levels, raising the average execution price.
- Hidden liquidity can disappear during volatile periods, leading to partial fills.
- Without depth modeling, risk metrics such as maximum drawdown are understated.
How Do Order‑Book Dynamics Influence Execution?
Real order books contain discrete price levels and varying volumes. When a strategy submits an order larger than the available volume at the best price, the remainder must consume deeper levels, increasing the effective price. Ignoring this can cause a backtest to miss the cost of market impact.
- 01Model the order book as a set of price‑volume buckets.
- 02Apply a realistic fill algorithm that walks the book until the order size is satisfied.
- 03Include a probability of partial fill when depth is insufficient.
Can Transaction Costs Be Ignored Safely?
Transaction costs include commissions, exchange fees and the spread. Even small per‑trade costs compound over high‑turnover strategies, eroding net returns. A backtest that omits these costs will overstate profitability.
A strategy that trades 1,000 times per day can lose a significant portion of its edge if each trade incurs a modest fee.
How Does Data Freshness Affect Liquidity Assumptions?
Historical price data may lack depth information or contain gaps. Using stale mid‑prices as a proxy for execution can misrepresent the true market state at the time of the trade. Proper handling of missing bars and timestamp verification is essential.
For guidance on handling missing historical bars, see How to Handle Missing Historical Bars in a Backtest.
What Are the Downside Risks of Over‑Optimistic Liquidity Modeling?
When a backtest ignores realistic liquidity constraints, the resulting performance metrics become unreliable. Traders may deploy capital based on inflated expectations, only to encounter execution failures, higher slippage and unexpected drawdowns in live markets.
Frequently asked questions
Apply a fixed percentage or basis‑point offset to the execution price based on trade size, then adjust it dynamically for market volatility.
Full order‑book modeling provides the highest fidelity but can be computationally intensive. For many strategies, a tiered depth model that captures the top few levels is a practical compromise.
Liquidity conditions can change with market regime shifts. Re‑evaluating depth and spread assumptions quarterly helps keep the backtest aligned with current market behavior.
Yes. Incorporating realistic turnover ensures that the frequency of trades matches what the strategy would generate in live conditions, which in turn affects transaction cost and slippage estimates.
Read the related article [Liquidity Assumptions That Can Skew Backtest Results](/blog/liquidity-assumptions-skew-backtest) for deeper analysis.
Sources and verification
Product claims in this article were checked against these first-party references. Runtime status remains authoritative for current availability.
- Felix documentationfirst party
- Felix machine referencefirst party
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.
AI agents that trade without confirming current market, account, and system status can create costly mistakes. This article explains why runtime checks are essential and how to implement them responsibly.
AI agents act as disciplined overseers for a suite of trading models, handling order routing, risk limits, data verification and emergency stops. This guide explains the core functions, required controls and practical steps for safe deployment.