An exit rule specifies the conditions and actions for reducing or closing an existing trading position. It turns “when should this trade end?” into part of a testable trading strategy. A profitable entry signal can still produce a poor strategy if the exit delays realisation, repeatedly cuts off recoveries or assumes execution that cannot occur.
An exit can respond to a price level, elapsed time, a changed trading signal or a risk limit. It need not be a stop-loss order, and it need not close the whole position at once.
A rule needs more than a threshold
| Exit condition | What the specification must settle |
|---|---|
| Price reaches a stop or profit target | Which observable price counts, when it is checked and which order follows |
| Maximum holding period expires | When the clock starts, which sessions or bars count and when an order can be sent |
| Signal reverses or the original hypothesis fails | Which information was available at the decision time and whether reduction or full closure follows |
| Position or portfolio risk limit is breached | Which risk measure triggers action, which holdings are reduced and how this takes precedence over other exits |
The rule also needs a quantity and an order-state policy. If an exit order fills only partly, the remaining position is still exposed. If several conditions occur together, specify their precedence and how pending orders are cancelled, replaced or retained. A cancellation request is not confirmation that an order can no longer fill; reconcile late fills before issuing a replacement. Otherwise, repeated exit instructions can oversell the position and create an unintended short.
The condition is not the fill
Consider a fictional long position of 10 shares, fully bought at USD 100 per share. An exit condition later occurs, a sell instruction follows, and all shares actually fill at USD 98 per share. Assume no distributions, fees or carrying costs. The realised gross profit and loss is
The cash ledger independently gives the same result: a USD 1,000 purchase outflow and USD 980 sale proceeds leave a USD 20 loss. The position is flat only after the full quantity has filled. Costs would reduce the result further.
Original schematic and fictional USD ledger. Full execution at the stated prices is stipulated; neither the condition nor the sell instruction establishes the fill price or a maximum loss.
The example stipulates 98 as the actual fill, not the trigger. In its guidance on U.S. stock orders, the SEC explains that a stop order becomes a market order when triggered; its execution price can differ substantially from the stop price. A stop-limit order constrains the acceptable execution price but may remain unfilled. Trigger conventions also vary by firm. Thus “exit if the stop is reached” does not establish a maximum loss.
The full membership lesson Positions, Trades, Fills and P&L, available through a public preview, develops the holdings-and-cash ledger behind this distinction.
Test the exit with the rest of the strategy
A backtest must respect when the condition becomes observable and when execution could follow. A signal calculated using a completed bar cannot silently trade earlier within that bar. If both a profit target and a stop fall inside the same bar's high–low range, those observations alone do not reveal which was reached first. Use finer data or declare how ambiguous cases are treated.
Exit timing also changes the outcome being predicted. A fixed-horizon return and a return stopped at the first barrier describe different targets; Labels and Overlapping Outcomes explains that connection in a membership lesson with a public preview.
Choose and test exit parameters alongside the entry, position sizing, execution assumptions and transaction costs. Searching many thresholds or holding periods creates opportunities for overfitting. An exit rule is one strategy component: it can define disciplined behaviour without guaranteeing profitability.
Sources
- SEC Investor.gov, Stop, Stop-Limit, and Trailing Stop Orders — Investor Bulletin, updated 18 August 2026. U.S. stock-order mechanics, execution-price uncertainty and trigger conventions.
- Ernest P. Chan, Quantitative Trading: How to Build Your Own Algorithmic Trading Business, Wiley, 2009, Chapter 6, pp. 106–107. Stop-loss limitations and strategy-dependent exit decisions. The illustration and ledger here are original.