Skip to content
GetProfitable
Search
Dictionary

Stress test

Re-running a strategy under deliberately hostile assumptions to find what breaks it before the market does.

Useful stresses fall into three groups. Cost stresses: triple the spread, add a tick of slippage to every fill, assume the worst price of the bar. Data stresses: remove the best month, insert a three-day gap where the feed died, replay 2008 and March 2020. Structural stresses: halve liquidity, assume no fill on limit orders that only touched the level.

The output is not a number, it is a list of dependencies. If the strategy dies when limit orders need the price to trade through rather than touch, then it is an execution-sensitive strategy and belongs on a different infrastructure budget.

Example: a scalping system showing $8 average profit per trade against an assumed $4 round-trip cost is one tick of extra slippage away from breakeven. That is a stress test result, not a backtest result.

Related: robustness, monte-carlo-simulation

See it drawn

Original diagrams for the ideas on this page. Illustrative, not real market data.

Slippage on a market orderA buy order clears four price levels, so the average price paid is worse than the price first quoted.Buy 1,000 shares at marketpricesell orders resting (bar length = size)20.04300 shares20.03200 shares20.01200 shares20.00300 sharesnothing resting at 20.02order sweeps up the bookaverage fill 20.02SLIPPAGE0.02 a share$20.00 in totalintended 20.00Each level fills at its own price; the average is what you really paid.
Slippage on a market order. You click at 20.00, but only 300 shares are resting there, so the rest of the order fills at 20.01, 20.03 and 20.04. The average price paid is 20.02, and that two-cent gap is slippage.
Bid-ask spread in an order bookSell orders stacked above buy orders with a gap between the best of each.SELLERS (asks)50.0690050.051,40050.0460050.011,10050.002,30049.99800spread = 0.03BUYERS (bids)
The bid-ask spread. Buy orders sit below, sell orders above, and the gap between the best bid (50.01) and best ask (50.04) is the spread you pay to cross. Bar length shows the size resting at each price.

Educational only, not advice. Spotted an error? Post in Site Feedback.