Maximum adverse excursion: how to read a stop from MAE and test it
Maximum adverse excursion is the deepest open loss a trade reaches before it closes. Plot each trade's MAE against its closed result, read the level that losers pass and winners rarely reach, and treat it as a stop hypothesis to test on trades that did not choose it.
By Soren Huang · Published · updated · Editorial policy
Contents
- What is maximum adverse excursion?
- What is the difference between MAE and MFE?
- Should MAE be measured in points or percent?
- How do you plot winners against losers by MAE?
- How do you pick a candidate stop from the MAE plot?
- Why can an MAE stop look better than it is?
- How does MAE connect to position size and leverage?
- Frequently asked questions
- References
What is maximum adverse excursion?
Maximum adverse excursion (MAE) is the largest open loss a trade reaches before it closes, measured from the entry price. Plot each trade's MAE against its closed result: a level that most winners never reach but most losers pass through is a stop candidate, and it must then be tested on trades that did not choose it.
Think of a hike that ends higher than it started. The route still passed through a valley on the way. MAE is the floor of that valley, not the height where the hike ended. A winning trade has an MAE as long as price moved against it at any point after entry, and a losing trade's MAE is at least as large as its closed loss, often larger.
Hypothetical example
A long ES trade enters at 5,000. The lowest price between entry and exit is 4,980, so the MAE is 20 points. The trade exits at 5,030, a closed result of +30 points. At $50 per ES point the trade was $1,000 under water at its worst and closed at +$1,500. The closed result alone would never tell you that this winner needed 20 points of room.
A stop loss is a rule that closes a trade once its open loss reaches a set distance. If that distance sits beyond the MAE of most winners and inside the MAE of most losers, the stop removes losers while leaving winners mostly untouched. Kaminski and Lo (2014) show that whether a stop rule adds or subtracts value depends on how prices tend to move after a loss, which is why the level must be tested rather than assumed. The stop types you can test, fixed ticks, ATR-based, time-based or trailing, are compared in stop loss choices for a systematic futures strategy.
What is the difference between MAE and MFE?
MAE records the worst point of a trade and MFE records the best point, so MAE informs where a stop goes while MFE informs where a profit target or trailing exit goes. Maximum favorable excursion (MFE) is the largest open profit a trade reaches before it closes, measured from the entry price. Every trade has both numbers, and reading them together for the same trade shows how much of each move the exit rule actually kept.
| Question | MAE (maximum adverse excursion) | MFE (maximum favorable excursion) |
|---|---|---|
| What it records | Deepest open loss from entry | Highest open profit from entry |
| For a long trade | Entry price minus the lowest low before exit | Highest high before exit minus entry price |
| Exit rule it informs | Stop loss distance | Profit target or trailing exit distance |
| What a large value means | The trade needed a lot of room | The trade had more profit available than it kept |
| Typical read | Where do losers go that winners do not? | How much of the best point did the exit keep? |
A practical read of MFE is to compare the closed result with the best open profit. A trade with an MFE of 40 points that closed at +10 kept a quarter of its best point. If most winners keep a small share of their MFE, a trailing exit or a target is worth a test. If most losers reached a meaningful MFE before turning into losses, the loss came from giving back profit, not from entering badly. Both are separate tests from the stop. This article stays with MAE and the stop; the same plotting method applies to MFE and the target.
Should MAE be measured in points or percent?
For a single futures contract over a few years, measure MAE in points or ticks, because the dollar value of a point is fixed by the contract specification. The point value is the dollar amount one full index point is worth per contract; for ES it is $50, and the exchange's contract page is the place to confirm it, since exchanges can change these values. The free futures contract calculator shows tick size, tick value and point value for the contract you test.
Points stop working well in two cases. When the price level changed a lot across the history, a 20-point move at the start of the data is a much larger share of price than a 20-point move at the end, so a fixed-point stop is tight early and loose late. When you compare several markets, points mean different things in each. Then measure MAE as a percent of the entry price or in ATR multiples. Average true range (ATR) is the average size of a bar's range over a set number of bars, gaps included, so one ATR is roughly one normal bar of movement in that market at that time. How ATR-based stops and sizes are set up is covered in ATR trailing stop rules and parameters.
| Situation | Points or ticks | Percent of price | ATR multiples |
|---|---|---|---|
| One market, short history, stable price level | Fits: fixed dollar meaning, easy to read | Works, but adds a conversion | Works, but adds a parameter (ATR length) |
| One market whose price doubled across the history | Misleading: early stops too tight, late stops too loose | Fits: same share of price throughout | Fits: follows the market's own range |
| Several markets compared | Not comparable across contracts | Comparable, but ignores each market's volatility | Fits: normalises by each market's movement |
One data check comes before any unit choice. On a continuous futures series that is not back-adjusted, the price jump on a roll day shows up as a false MAE spike for any trade open across the roll. The contract specs and rollover settings for futures backtests explain how to build the series so that MAE measures price movement and not the gap between two contract months.
How do you plot winners against losers by MAE?
Run the strategy with no stop first, so every trade shows its full MAE, then plot each trade's MAE against its closed result. A stop in the run would cut off exactly the information you want: every stopped trade would show an MAE equal to the stop distance, and you could not see where losers would have gone. The steps:
- Run the entry and exit rules with no stop. Keep commission and slippage in the run so the closed results are net.
- Record MAE per trade. For a long trade, entry price minus the lowest low between entry and exit. For a short trade, the highest high between entry and exit minus the entry price.
- Plot MAE on the horizontal axis and the closed result on the vertical axis. Mark winners and losers differently.
- Look for the level where winners stop appearing and losers continue. That gap, if there is one, is the candidate stop.
A good plot shows a clear gap: winners bunched at small MAE, losers continuing far to the right. A bad plot shows winners and losers mixed along the whole axis, which means a stop at any distance removes about as many winners as losers and the exit should be improved some other way. The trade list in the performance report of AlphaPrime (Valynox) gives each closed trade's entry, exit and net result from such a stop-free run, which is the list an MAE study starts from.
The run below is the stop-free trade list behind this article. It tested an ADX rule, a trend-strength indicator used as the only entry and exit, with no stop, no target and no filters, on ES daily bars from 2019-01-02 to 2025-06-30, long and short, one contract, with $20 commission and $25 slippage per trade. The ADX rule is a stand-in for any stop-free strategy; it is not MAE itself. It is the one candidate the search kept out of the 1,024 it tried, chosen for its return against its drawdown, and picking the kept one after the fact flatters it. The numbers are not something the rule earned or that a reader can expect.
Source: AlphaPrime product engine (CPU), run 2026-10-31. ES daily bars, 2019-01-02 to 2025-06-30, long and short, 1 contract, $20 commission and $25 slippage per trade.
| Number | Result |
|---|---|
| Net profit (closed trades) | $99,702.5 |
| Max drawdown | $60,102.5 |
| Trades | 43 |
| Win rate | 53.49% |
| Profit factor | 1.643 |
| Average trade | $2,318.66 |
| Time in market | 88.68% |

With 43 trades, a plot from this list is a hint, not a result. A gap between winners and losers can appear by chance in a sample this small. An MAE study that you intend to act on needs hundreds of trades, which on a daily-bar strategy means a longer history or more markets, and on an intraday strategy a few years is usually enough.
How do you pick a candidate stop from the MAE plot?
Read the candidate stop from the gap in the plot, count the winners and losers that sit beyond it, and work out the net effect with costs before deciding whether the level is worth testing. The gap gives the distance; the counts tell you what the stop would have removed in the sample it was read from.
Three costs change the arithmetic. A stop order usually fills worse than its trigger price, so add stop slippage to every stopped trade. A stopped trade that the rules re-enter on the next bar adds a round trip of commission and slippage that the stop-free run did not pay. And a winner that the stop cuts does not just lose its profit; it becomes a loser of the stop distance plus slippage.
Hypothetical example
A stop-free intraday ES run shows 200 trades: 110 winners and 90 losers. The plot shows a gap near 30 points of MAE. Beyond 30 points sit 50 losers and 6 winners. The 50 losers lost 55 points on average; a stop at 30 points with 1 point of stop slippage would have closed each at a 31-point loss, saving 24 points, or $1,200 per trade at $50 per point, which is $60,000 across the 50 trades. The 6 winners beyond the line averaged +$1,800; each becomes a loss of $1,550, a swing of $3,350 per trade, or $20,100 in total. The in-sample net effect is about $40,000 better, before any re-entry costs. That number describes the sample the level was read from. It is the hypothesis for the next section, not a setting to keep.
Two readings of the counts help. If more than a handful of winners sit beyond the line, the gap is not clean and the stop will cost real profit. If the losers beyond the line are few, the stop changes little and a tighter exit rule, not a stop, is the thing to test.
Why can an MAE stop look better than it is?
The stop level was read from the same trades it is now applied to, so part of the improvement is selection, not edge. You looked at every trade's MAE, found the one distance that separated winners from losers in that sample, and then measured how well that distance separates them. Of course it separates them; it was chosen to. On new trades, some winners will dip past the line and some losers will stay inside it, and the gain shrinks.
Bailey, Borwein, López de Prado and Zhu (2014) show that the best of many variants tried on one data set is almost always inflated, and reading a stop from a plot is a search through every possible distance at once. The remedy is the same as for any tuned setting:
- Read the level only from the in-sample part of the history. How to split the data, and how many out-of-sample trades count as enough, is covered in in-sample versus out-of-sample splits.
- Apply the stop unchanged to the out-of-sample block, or roll it through walk-forward windows. Pardo (2008) describes walk-forward analysis as the way to judge a setting on data that came after the data that chose it.
- Check the neighbours. Stops at 25, 30 and 35 points should give similar results. If only 30 works, the gap was a feature of those particular trades.
- Write down in advance how much of the in-sample gain may disappear before you reject the stop. Half surviving is a common working threshold; a sign change is a failure.
How does MAE connect to position size and leverage?
The stop distance that MAE suggests fixes the dollar risk per contract, and together with the risk you accept per trade it fixes the contract count, so the stop and the size should be decided together. The free position size calculator does this arithmetic for a given account risk and stop distance. There is one formula to know here:
contracts = risk per trade ÷ (stop distance × point value)
Here risk per trade is the dollar amount you accept losing when the stop is hit, stop distance is the MAE-based level in points, and point value is the dollar value of one point per contract. A wider stop means fewer contracts for the same dollar risk.
Hypothetical example
Risk per trade $2,000, ES point value $50. A 20-point stop risks $1,000 per contract, so the count is 2 contracts. A 40-point stop risks $2,000 per contract, so the count is 1 contract. The wider stop halves the size, and the dollar loss when the stop is hit stays the same.
Size changes the drawdown even when nothing else changes. The second run below takes the same 43 ES trades from the box above, the same entries and exits, and applies nine money-management methods with capital of 100,000 and at most 10 contracts, each with its report default settings. Only the size changes, so every difference between the rows comes from sizing. Max drawdown runs from $69,313 under the Kelly method, which held 1.09 contracts on average, to $437,965 under percent of equity, more than four times the starting capital, with 3.86 contracts on average. Fixed dollar risk and volatility target produced the same $110,325 drawdown on this list. The methods that grow size after wins carry the widest drawdowns, because the larger positions arrive just before the losing stretch.
Source: AlphaPrime product engine (CPU), run 2026-10-31. Same trades as the box above, capital $100,000, at most 10 contracts.
| Method | Net profit | Max drawdown | Average contracts |
|---|---|---|---|
| Fixed contracts | $300,828 | $180,228 | 3 |
| Fixed notional | $251,928 | $120,165 | 2.51 |
| Percent of equity | $74,628 | $437,965 | 3.86 |
| Fixed dollar risk | $218,340 | $110,325 | 2.67 |
| Fixed fractional risk | $81,390 | $376,828 | 4.44 |
| Volatility target | $218,340 | $110,325 | 2.67 |
| Fixed ratio | $183,928 | $339,128 | 3.14 |
| Equity curve trading | $154,703 | $112,353 | 2.21 |
| Kelly | $93,840 | $69,313 | 1.09 |
Several of those drawdowns are larger than the 100,000 of starting capital, which in a real account means a margin call long before the end of the test. How margin requirements turn a backtest drawdown into a forced exit is worked through in futures leverage and backtest drawdown. The next thing to do with your own strategy: run it with no stop on the in-sample part of your history, record each trade's MAE, and count how many winners sit beyond the level you would have guessed. If that count is more than a handful, the guess was costing you winners, and the plot has already paid for itself.
Frequently asked questions
How do you use MAE to set a stop loss?
Run the strategy without a stop on the in-sample part of your history and record the deepest open loss of every trade. Plot that MAE against each trade's closed result and look for the distance beyond which winners stop appearing while losers continue. Treat that distance as a candidate, apply it unchanged to out-of-sample trades, and keep it only if the gain holds and nearby distances behave alike.
What is MAE MFE analysis?
MAE MFE analysis records two numbers for every trade: the worst open loss (maximum adverse excursion) and the best open profit (maximum favorable excursion). The MAE side tells you how much room winners needed and where losers went, which guides the stop. The MFE side tells you how much of the best point each trade kept, which guides profit targets and trailing exits.
How many trades do you need for an MAE plot?
Enough that a gap between winners and losers is unlikely to be chance, which in practice means a few hundred trades. A plot from a few dozen trades, like the 43-trade ES run in this article, is a hint only. If your strategy trades rarely, add history or markets before reading a stop from the plot, and measure MAE in percent or ATR multiples when you combine markets.
Should the backtest be run without a stop to measure MAE?
Yes. A stop in the run cuts every stopped trade at the stop distance, so you cannot see how far losers would have gone or whether winners would have recovered. Run the entries and exits alone first, with costs included, read the MAE plot from that run, and only then add the stop as a separate test on trades that did not choose it.
References
- Kaminski, K. M., & Lo, A. W. (2014). When Do Stop-Loss Rules Stop Losses? Journal of Financial Markets, 18, 234–254.
- Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.
- Pardo, R. (2008). The Evaluation and Optimization of Trading Strategies (2nd ed.). John Wiley & Sons.

