Guide

Maximum adverse excursion and MFE explained

Harbor Capital's systematic desk backtested a 12-month momentum sleeve on liquid U.S. equities in early 2025. Net profit looked solid: 14.2% annualized with a Sharpe ratio of 1.1. Yet live paper trading underperformed by 6.8 percentage points in the first quarter. The culprit was not signal decay — it was stop placement. The rule set used a fixed 1.5% stop from entry. Post-trade forensics showed that 62% of eventual winners dipped more than 1.5% before closing profitable, while 78% of losers never recovered once they fell 2.5%. Portfolio-level maximum drawdown hid that microstructure. Maximum Adverse Excursion (MAE) and Maximum Favorable Excursion (MFE) — popularized by John Sweeney and expanded in systematic trading literature — measure, for each closed trade, how far price moved against and in favor of the position before exit. Plotting MAE vs MFE separates trades that needed breathing room from trades that were dead on arrival. This guide defines both metrics, shows how to compute them, uses scatter plots and edge ratios to tune stops and targets, walks through the Harbor Capital momentum refactor, contrasts excursion analysis with portfolio drawdown metrics, lists pitfalls, and ends with a practitioner checklist.

What MAE and MFE measure

For a single long trade opened at time t₀ and closed at t₁, scan every price observation between entry and exit:

  • MAE (Maximum Adverse Excursion): the largest unrealized loss from entry — how far price fell below the entry before the trade ended (for shorts, how far price rose above entry).
  • MFE (Maximum Favorable Excursion): the largest unrealized gain from entry — the best open profit the trade reached before exit.

Both are expressed in dollars, ticks, or percentage of entry. They describe path, not final P&L. A trade can close at a small loss while MFE was +4% — signaling a profit target left on the table. Another can close at a modest win while MAE was −6% — signaling a stop that is too wide for the intended risk budget.

MAE/MFE are trade-level diagnostics. They do not replace portfolio metrics like drawdown or value at risk, but they explain why a rule set behaves the way it does under specific stop and target rules.

Computing MAE and MFE in a backtest

In a bar-based backtest, the loop for each trade looks like this:

  1. Record entry price P₀ and direction (long or short).
  2. For each bar from entry until exit signal, update running min low (long MAE) and max high (long MFE). Use intrabar high/low if available; otherwise use close-only with documented bias.
  3. At exit, store final P&L alongside MAE and MFE for that trade ID.

For longs in percentage terms:

MAE% = min over bars ( (Low_t - P₀) / P₀ )
MFE% = max over bars ( (High_t - P₀) / P₀ )

Shorts flip the signs. Include commissions and slippage in exit P&L but typically measure excursions on mid or last price before costs, then stress-test with conservative fill assumptions.

Store excursions in the same trade log as signal metadata (sector, holding period, volatility regime). Aggregating by bucket later reveals whether stops should differ for small caps vs large caps, or for high-VIX weeks vs calm markets.

Scatter plots: winners, losers, and the edge ratio

The standard visualization plots each trade as a point: x-axis = |MAE|, y-axis = MFE, color = win (green) or loss (red). Three patterns jump out immediately:

  • Winners cluster with moderate MAE: profitable trades often dip before trending; a vertical band of green dots left of your stop line means stops are too tight.
  • Losers with low MFE: red dots hugging the x-axis never went green — the entry was wrong, not the stop. Tightening stops will not fix signal quality.
  • Winners with high MFE but small final P&L: dots far above the diagonal suggest profit targets or trailing exits are cutting winners short.

The edge ratio (sometimes called E-ratio) summarizes excursion edge: average MFE divided by average |MAE| across trades, or the same ratio computed on winners only. Ratios above 1.5 on out-of-sample data often indicate enough favorable movement to support wider stops or asymmetric targets. Ratios near 1.0 with positive expectancy usually mean exits, not entries, need work.

Overlay horizontal and vertical lines at candidate stop and target distances. Count how many winners would survive a wider stop and how many losers would be cut earlier. This is more informative than optimizing stop width on net P&L alone, which overfits a single equity curve.

Using excursions to tune stops and targets

Stop width from the MAE distribution of winners

Sort winning trades by MAE. The 75th or 90th percentile of winner MAE estimates how much heat profitable trades typically take. Setting a stop just beyond that percentile avoids stopping out most winners while still capping tail risk. Harbor Capital's desk found the 85th percentile of winner MAE was −2.8% on their momentum sleeve; moving from a 1.5% to a 3.0% stop (with halved position size to keep dollar risk constant) raised out-of-sample Sharpe from 0.9 to 1.2.

Profit targets from MFE of winners

If median winner MFE is +5% but median exit profit is +2%, the strategy captures less than half of available movement. Test fixed targets at the median MFE, or trailing stops that activate after price reaches the 50th percentile MFE of historical winners.

Losers that never show MFE

When more than 60% of losing trades have MFE under +0.5%, the entry filter is the problem — no stop width fixes bad timing. Add regime filters, spread caps, or confirmation bars before touching stop math.

R-multiples and position sizing

Express MAE in units of initial risk (1R). If your planned stop is 2% and MAE on a trade was −1.8%, that trade used 0.9R of heat. Pairing excursion stats with Kelly-style sizing keeps portfolios from oversizing strategies whose winner MAE distribution has fat left tails.

Harbor Capital momentum sleeve refactor (worked example)

The desk exported 412 historical trades from a 2018–2024 backtest of a 20-day breakout long-only rule on S&P 500 constituents. Initial rules: enter on close above 20-day high, exit on close below 10-day low or 1.5% stop, whichever comes first.

Step 1 — baseline scatter: 256 winners, 156 losers. Median winner MAE = −2.1%, median winner MFE = +4.6%. Median loser MAE = −1.5% (stop hit), median loser MFE = +0.3%. Edge ratio on winners: 2.2. Interpretation: winners need more than 1.5% room; losers rarely go green.

Step 2 — stop sweep: simulate hypothetical stops from 1.0% to 4.0% without re-running entries. At 3.0% stop, 89% of historical winners would have survived; 34% of losers would have lost more before exit, but net expectancy improved because fewer false stop-outs on signal.

Step 3 — target sweep: add optional +4% profit cap. MFE histogram showed 55% of winners exceeded +4% eventually, but median time to +4% was 8 days vs 14 days to 10-day low exit. The cap raised win rate and reduced variance with modest CAGR trade-off — acceptable for the fund's volatility mandate.

Step 4 — walk-forward validation: recompute MAE/MFE only on rolling 24-month train windows, apply chosen stop/target on the next 6-month test window. Three consecutive test windows had positive expectancy after refactor; live paper tracking matched backtest within 1.2% after costs in Q1 2025.

Method decision table

Question you need answered Tool Why
Are my stops stopping out winners? MAE distribution of winners + scatter plot Shows breathing room profitable trades require
Am I leaving profit on the table? MFE vs final P&L gap Quantifies target and trail inefficiency
Is my entry signal weak? MFE of losers near zero Separates signal failure from exit failure
How bad can the portfolio hole get? Maximum drawdown, Ulcer Index Portfolio-level path risk, not per-trade
How much to bet per trade? Kelly criterion, fixed fractional Uses expectancy and variance, not excursions alone
Did I overfit stops to noise? Walk-forward MAE/MFE on test folds Excursion stats must reproduce out of sample

Common pitfalls

  • Close-only bars: MAE computed on daily closes understates intraday heat; stops that would have triggered intraday disappear from the scatter plot.
  • Look-ahead in excursion scans: using future bars after actual exit time inflates MFE; stop the scan at the exit bar.
  • Mixing trade types: averaging MAE across scalps and swing trades blurs stop policy; segment by holding period and volatility.
  • Ignoring costs: a 0.5% round-trip cost turns a +0.4% MFE winner into a loser; apply realistic slippage in final P&L, not just in headlines.
  • Optimizing stops on full sample: the best stop on all 412 trades rarely survives walk-forward; always reserve holdout data.
  • Survivorship in universes: delisted names with violent MAE vanish from equity backtests unless you include dead symbols.
  • Confusing MAE with realized loss: MAE is path maximum; final loss can be smaller if the trade recovered before a later exit rule fired.

Practitioner checklist

  • Log MAE and MFE for every backtest trade alongside entry, exit, and signal tags.
  • Plot MAE vs MFE scatter with win/loss color and stop/target overlay lines.
  • Compute winner MAE percentiles (50th, 75th, 90th) before choosing stop width.
  • Compare median winner MFE to median realized profit to detect early exits.
  • Check loser MFE: if most never go green, fix entries before widening stops.
  • Calculate edge ratio on out-of-sample folds, not the full history.
  • Express excursions in R-multiples when pairing with position-sizing rules.
  • Use intrabar highs/lows when stops are intraday; document bar-resolution bias.
  • Re-run excursion analysis after adding transaction costs and slippage tiers.
  • Revisit MAE/MFE quarterly in live trading; regime shifts change winner heat profiles.

Key takeaways

  • MAE and MFE describe how far each trade moved against and in favor of you before exit.
  • Scatter plots separate tight-stop problems from weak-entry problems faster than net P&L alone.
  • Tune stop width from the MAE distribution of winners, not from losers alone.
  • Compare MFE to realized profit to find targets and trails that cut winners short.
  • Validate excursion-based rules walk-forward; intrabar data and costs matter.

Related reading