Stop-Loss Fills in Backtests: How Overnight Gaps and Daily Bars Make a Stop Look Safer Than It Is
November 13, 2026 · Guides · 8 min read
Published by Chris Leek, founder of Equity Rank
Many backtests include a stop-loss: exit the position if the price falls a set percentage below the entry. The usual way to code it on daily data is simple. If the day's low reaches the stop price, record the exit at the stop price.
That rule assumes the stock traded at the stop price. Often it did not. A stock can close above the stop one day and open well below it the next, after an earnings report or overnight news. A stop order at that point fills at the next available price, not at the stop. A backtest that fills it at the stop records a smaller loss than the trade would actually have taken.
This guide explains three ways daily-bar backtests misstate stop-loss results, how large each is, and how to correct them. All figures come from a seeded simulation described below.
Key Points
- Gaps make stops lose more than the stop. In the simulation, 26% of stopped trades opened below the stop, and their average loss was 9.9% against an 8% stop.
- Filling at the stop price creates a false edge. Trades with no edge averaged +0.02% each when filled realistically and +0.23% when every stop filled at the stop price, a figure sixteen standard errors above zero.
- Daily bars cannot say which level was hit first. When a day's range touches both the stop and the profit target, the backtest must guess. For a tight 2% bracket, the guess alone moved the average from +0.05% to −0.06% per trade.
- A stop order is not a limit order. Once triggered, a stop fills at the next trade, which can be below the stop even without a gap. That slippage needs intraday data or an explicit cost assumption.
- The stop also caps the reported worst case. The naive backtest's worst 1% of trades lost 8.0%; the realistic figure was 13.7%.
How the simulation works
Each simulated trade enters a stock at the open and holds for up to 20 trading days. The stock's price has no drift and no predictable pattern, so the true average result of every rule is about zero. Any reliably positive figure is a measurement error, not an edge.
- Daily volatility: 2% (3% for the bracket test), with 30% of the variance arriving overnight.
- Overnight jumps: on average about once a quarter, with a typical size of 8%, standing in for earnings reports and news.
- Intraday path: 78 five-minute steps per day, so the order of the day's high and low is known.
- Sample: 400,000 simulated trades per rule, seed 20261113.
The "realistic" result walks the five-minute path. A stop triggered at the open fills at the open; a stop triggered during the day fills at the next five-minute price, a rough stand-in for slippage. A profit target is a limit order and fills at its price, or at the open if the stock opens above it. The daily-bar versions see only each day's open, high, low and close.
Problem 1: the gap through the stop
The first test uses an 8% stop with no profit target, a common rule for limiting losses on a long position.
| Method | Average result per trade | Standard errors from zero | Average loss | Worst 1% of trades |
|---|---|---|---|---|
| Realistic (five-minute path) | +0.02% | 1.3 | −6.79% | −13.66% or worse |
| Daily bars, stop filled at stop price | +0.23% | 16.5 | −6.40% | −8.00% or worse |
| Daily bars, stop filled at the lower of open and stop | +0.05% | 3.3 | −6.74% | −13.66% or worse |
37.6% of trades hit the stop. Of those, about a quarter (9.6% of all trades) opened below it. Those gapped trades lost 9.9% on average, and the worst lost 30%, against an 8% stop. The naive backtest records each of them as an 8% loss.
The difference is 0.21 percentage points per trade, on trades with no edge at all. With 400,000 trades the naive figure is very far from zero by standard error, which shows that a large t-statistic measures precision, not correctness. A systematic fill error produces a precise wrong answer. (See Deflated Sharpe Ratio Explained for a different reason a large t-statistic can mislead.)
The fix on daily data is one line: when the day opens below the stop, record the exit at the open. That removes most of the error. The small remainder, +0.05% against +0.02%, is slippage after an intraday trigger, covered below.
Problem 2: which level was hit first?
A bracket adds a profit target. The second test uses a 2% stop and a 2% target on a stock with 3% daily volatility. These levels sit close to the day's normal range, so on some days the stock touches both.
On 2.8% of trades, the first day that reached either level reached both. Daily bars show only that the high was above the target and the low below the stop, not which came first. The backtest has to pick an order.
| Method | Average result per trade | Standard errors from zero | Win rate |
|---|---|---|---|
| Realistic (five-minute path) | −0.08% | −22.7 | 49.8% |
| Daily bars, target assumed first, stop at stop price | +0.05% | +16.1 | 51.3% |
| Daily bars, target assumed first, gap-aware stop | +0.05% | +15.8 | 51.3% |
| Daily bars, stop assumed first, gap-aware stop | −0.06% | −17.1 | 48.5% |
The ordering assumption alone moves the result by about 0.11 percentage points per trade, enough to produce a "significant" positive or negative result from the same trades. Assuming the target came first is the optimistic choice, and it is common because it is often the default in simple backtest code.
Daily data cannot settle this. The honest options are to report both orderings as a range, assume the stop came first (the conservative choice), or use intraday data for the days where both levels were touched. If a strategy's result changes sign between the two orderings, the daily-bar backtest has not measured it. (See Execution Lag and Bid-Ask Bounce in Backtests for related fill-timing problems.)
Problem 3: a triggered stop is not a filled stop
A standard stop order becomes a market order once the price reaches the stop. It then fills at the next available price, which in a falling market can be below the stop even when the stock did not gap.
In the bracket test, the realistic result (−0.08%) sits below even the pessimistic daily-bar result (−0.06%). The gap is this post-trigger slippage. It is larger for tight stops, because a tight stop is triggered more often and the slippage is a larger share of a small loss. The five-minute steps used here are coarse, so the exact size is an assumption; real slippage depends on the stock's liquidity, spread and how fast it is moving.
A stop-limit order avoids filling below a set price, but it may not fill at all, and a backtest that treats it as always filled has the opposite problem: it records exits that would not have happened while the price kept falling.
The same problem in options
Stop rules on short options are often set as a multiple of the premium collected, for example closing a short put when its price doubles. Option prices gap with the stock, and option spreads widen when the stock moves sharply, so the fill on a triggered stop can be far worse than the stop level. A backtest of a short-option strategy that exits at exactly the stop level understates the losses that matter most. (See Probability of Profit vs Expected Value.)
How to test a strategy with stops
- Fill gapped stops at the open. If the day opens beyond the stop, the exit price is the open, not the stop.
- Report both orderings when a bar touches both levels. Show the result with the target first and with the stop first. If they disagree in sign, the daily-bar result is not evidence.
- Add a cost for triggered stops. Assume a fill below the stop by an amount tied to the stock's volatility and spread, and show how sensitive the result is to it.
- Include the events that cause gaps. Earnings reports, guidance changes and overnight news cause most gaps. A sample that excludes earnings dates, or a period without large overnight moves, will understate the problem.
- Report the tail, not just the average. A stop rule's worst outcomes are the gapped ones. Compare the worst 1% of trades with and without the gap correction. (See Return Skewness, Hit Rate and Base Rates Explained.)
- Compare with no stop. Measure the same entries held without a stop. If the stop's apparent benefit disappears once fills are realistic, the stop was improving the backtest, not the strategy.
Limits of the simulation
The simulation uses a driftless random walk, a fixed share of overnight variance, normally distributed jumps of one typical size, five-minute price steps and no bid-ask spread. Real stocks have changing volatility, gaps that cluster around scheduled events, and trading that is continuous rather than in five-minute steps. The size of each effect here depends on those assumptions and will differ for real securities. The main point does not depend on them: a stop price is the level at which an exit begins, not a guaranteed exit price, and a backtest that treats it as one overstates the result.
This content is for educational and informational purposes only and does not constitute investment advice. Equity Rank is not a registered investment adviser. All figures in this article are hypothetical illustrations computed from stated assumptions; they do not represent any real fund, security, strategy or Equity Rank output, and they do not indicate future results.