November 22, 2026 · risk

Why Your Backtest’s Stop-Loss Can’t Be a Risk Limit

Why Your Backtest’s Stop-Loss Can’t Be a Risk Limit

A stop-loss at 100 doesn’t mean a position can lose only the distance between 100 and your entry. It means an order may be triggered when a specified price condition is met. What happens next depends on the trigger source, the order type, and the market available to fill it.

That distinction matters in a backtest. If you treat the stop price as a guaranteed exit price, you can produce a precise-looking loss limit that the strategy could never enforce. Three mistakes cause most of the trouble.

Mistake 1: Filling the stop at its trigger price

Suppose you buy at 105 and place a sell stop-market at 100. The market is quiet, then bad news arrives between observations. The next trade is 94. The stop may trigger, but the order has to find a buyer in the market that exists now.

A backtest that books a fill at exactly 100 reports a loss of 5 per share. A fill near 94 means a loss of 11, before fees and any additional impact. The stop did its job as an instruction; it couldn’t guarantee a price through a gap.

Model assumptionReported exitWhat it implies
Fill at stop price100The market offered that price after the trigger
Fill at next observed price94The market moved through the stop between observations
Fill at next price plus costsBelow 94 for a sellSpread, fees and impact worsened the exit

For a stop-market order, a conservative bar-level approximation is to trigger when the bar reaches the stop, then fill using the next available price and modeled costs. If the bar opens beyond the stop, the open is often a more defensible starting point than the stop itself. Neither rule reconstructs the actual queue or available depth, but both avoid pretending a gap traded through your order at a price that never appeared.

Mistake 2: Letting the bar choose the order of events

With OHLC data, a bar can show a low of 98 and a close of 103. A stop at 100 was touched. But if the strategy also placed a profit-taking limit at 104 and the bar’s high was 105, OHLC alone cannot tell you which order filled first. It also cannot tell you whether the market reached either price before the order was active.

Some backtests choose whichever outcome helps the strategy. Others always award the stop or target based on a fixed rule and then present the result as known. The data doesn’t justify that certainty.

Choose an explicit convention, apply it consistently, and show how sensitive the result is to the unresolved path. For a long position with both stop and target inside one bar, a pessimistic stop-first assumption is a useful stress case. Finer data can narrow the ambiguity, though trade data still won’t show your order’s place in the queue.

Mistake 3: Triggering on a price the venue doesn’t use

A stop needs a trigger source. Depending on the instrument and venue, that might be the last traded price, a bid or ask, an index, or a mark price. These can diverge sharply during fast markets.

Imagine a crypto perpetual where the last trade briefly prints below your stop, while the mark price stays above it. A last-price-triggered order may fire; a mark-price-triggered order may not. If your backtest checks the candle’s low without recording which trigger source the order uses, it can model a stop that your account would never submit.

Record the trigger source alongside the stop rule and match it to the venue’s order semantics. Then consider what happens if the trigger feed is stale, the market is halted, or the instrument has no executable quote. A triggered order can wait, reject, or execute after trading resumes; the backtest shouldn’t silently erase those possibilities.

How should I model stop-loss risk?

Treat the stop as an instruction to begin an exit, then model the exit that follows. The minimum useful specification includes the trigger source, order type, observation timing, fill convention, and transaction costs. For bar data, state what happens on gaps and when a stop and target are both touched. For thin or jumpy markets, stress the fill with worse prices and delayed execution.

That still won’t turn a stop into a hard loss cap. A halt, a venue outage, or a gap can leave the position exposed. Position sizing and scenario analysis must account for losses beyond the stop distance, because the order’s trigger level is not a promise from the market.

stop-lossgap riskbacktestingmarket microstructure
← All posts