What the Ulcer Index is
The Ulcer Index is a risk measure that quantifies how deep an investment's drawdowns are and how long they last. It was developed by Peter Martin in 1987 and formally published in 1989. The name is deliberate: Martin wanted a metric that reflected the actual stomach pain of holding a position, not just the abstract bouncing of a price chart.
Most risk metrics — standard deviation, beta, even variance — treat upside and downside moves as equally "risky." A stock that suddenly jumps 15% gets the same volatility credit as one that drops 15%. But nobody calls their broker about a 15% jump. The Ulcer Index ignores upside entirely and focuses on the only thing that actually causes investors to panic-sell, abandon a strategy, or stop sleeping: prolonged drawdowns from recent peaks.
Two portfolios can have identical standard deviations and wildly different Ulcer Indices. The one that drifts up steadily and occasionally dips will have a low Ulcer score. The one that spikes erratically and grinds through long valleys will have a high one. For long-only investors who actually have to live with their positions, the second number is usually the one that matters.
The formula
The Ulcer Index is calculated in two steps over a chosen window of length N.
Step 1 — Compute the drawdown at each point. For each period i in the window, find the running maximum price from the start of the window through period i, then express the current price as a percentage drawdown from that peak:
code-highlightR_i = ((Price_i − Max(Prices from start to i)) / Max(Prices from start to i)) × 100
R_i is always less than or equal to zero. When the price is at a new high, R_i = 0. When it's 8% below the running peak, R_i = −8.
Step 2 — Take the root-mean-square of those drawdowns.
code-highlightUlcer Index = sqrt( sum(R_i^2) / N )
That's it. Square every drawdown reading, average the squares, take the square root. The squaring is what penalizes deep drawdowns disproportionately — a 10% drawdown contributes four times as much as a 5% drawdown, not twice. The averaging across N periods is what penalizes long drawdowns — the longer you sit underwater, the more terms you add to the sum.
A higher Ulcer Index means the asset spent more time deeper underwater. A lower Ulcer Index means recoveries were quick and shallow.
A worked example
Suppose you have a hypothetical 7-day price series starting at $100. Walking through it manually clarifies how depth and duration combine.
| Day | Price | Running Max | R_i (% drawdown) | R_i² |
|---|---|---|---|---|
| 1 | $100 | $100 | 0 | 0 |
| 2 | $98 | $100 | −2 | 4 |
| 3 | $95 | $100 | −5 | 25 |
| 4 | $97 | $100 | −3 | 9 |
| 5 | $99 | $100 | −1 | 1 |
| 6 | $96 | $100 | −4 | 16 |
| 7 | $100 | $100 | 0 | 0 |
Sum of squared drawdowns: 0 + 4 + 25 + 9 + 1 + 16 + 0 = 55
code-highlightUlcer Index = sqrt(55 / 7) = sqrt(7.857) ≈ 2.80
Now consider the contrast that makes this metric useful. If a 5% drawdown lasted only one day out of seven, it would contribute (5²)/7 = 25/7 ≈ 3.57 to the inside of the square root. If that same 5% drawdown persisted for five of the seven days, it would contribute 5 × (25/7) ≈ 17.86 — five times the pain, just from sitting underwater longer. The duration component is baked directly into the formula, which is exactly what distinguishes the Ulcer Index from a one-shot maximum-drawdown reading.
Why drawdown depth and duration matter more than volatility
Behavioral finance has spent decades establishing that investors don't experience gains and losses symmetrically. Loss aversion — the well-documented tendency for losses to feel roughly twice as painful as equivalent gains — means that any risk metric treating upside and downside identically is, in a behavioral sense, mis-specified.
There are three practical reasons drawdown stress matters more than raw volatility:
Forced selling tends to happen during drawdowns, not during volatility spikes. Margin calls, redemptions, panic exits — they fire when prices are below recent peaks, not when prices are above them. A strategy can survive being volatile-but-trending-up indefinitely. It can't survive a long enough valley.
Strategy abandonment is a duration problem. Most investors will hold through a sharp 20% drawdown that recovers in two months. Far fewer hold through a 20% drawdown that grinds sideways for two years. The Ulcer Index's averaging across the window captures this duration sensitivity directly. Standard deviation does not.
The math of recovery is asymmetric. A 50% drawdown requires a 100% gain to break even. A 20% drawdown requires a 25% gain. Risk metrics that don't privilege the downside understate this asymmetry.
The Ulcer Performance Index (UPI)
Martin also defined a return-to-risk ratio analogous to the Sharpe or Sortino ratio, where "risk" is replaced by the Ulcer Index:
code-highlightUPI = (Annualized Return − Risk-Free Rate) / Ulcer Index
A higher UPI means more excess return per unit of drawdown stress. Two strategies with the same Sharpe ratio can have very different UPIs if one delivers its returns smoothly and the other through a series of deep, slow recoveries. For investors who actually have to hold the position, the higher-UPI strategy is usually preferable even when the Sharpe ratio is identical.
When to use it
The Ulcer Index is most useful in three situations:
- Comparing strategies with similar returns. When two funds, systems, or model portfolios produce comparable annualized returns, the Ulcer Index tells you which one delivered them with less time spent underwater. This is often the deciding factor for sustainability.
- Personal portfolio review. Run it on your own holdings to ask honestly: am I being asked to hold through drawdowns that I'll actually abandon? If history shows you've bailed at 15% drawdowns and your strategy regularly produces 25% drawdowns, your behavioral capacity and your strategy's design are mismatched.
- Position sizing. A strategy with a high Sharpe ratio but also a high Ulcer Index probably deserves a smaller allocation than its Sharpe alone would justify. Sizing on UPI rather than Sharpe pushes capital toward smoother return streams.
Limitations
The Ulcer Index isn't a magic ruler. A few real constraints:
- Window-length sensitivity. The metric depends heavily on N. A 14-day window captures different stress than a 14-month window. Choose N to match your actual holding horizon — short for active traders, long for buy-and-hold investors.
- Backward-looking. Like all historical risk measures, it tells you what already happened, not what's coming. A low Ulcer Index doesn't mean a deep drawdown isn't about to start.
- Window-shopping risk. Cherry-picking favorable historical windows can make any strategy look good. Always compute it over multiple regimes — bull, bear, sideways.
- Less standardized than Sharpe/Sortino. Fewer published comparisons exist, so apples-to-apples benchmarking takes more legwork.
- Lags when a drawdown is just starting. If the asset just hit a new high and is now 3% off, the Ulcer Index hasn't had time to register meaningful pain yet. It's a slow-moving metric by design.
How to use the Ulcer Index with Stock Alarm Pro
The cleanest way to use Ulcer thinking inside Stock Alarm Pro is to combine relative strength with trend posture, then visually validate the drawdown profile.
Start with Power Rankings to surface stocks ranked by 26-week relative strength. Names sitting at the top of those rankings are, by construction, ones that haven't spent the recent window underwater — they're at or near their highs against the broader market. Filter further by trend status: stocks flagged as uptrend (price above both the 50-day and 200-day moving averages) tend to have lower realized Ulcer scores than downtrend or pullback names over the same window.
For tighter screening, use the Screener and combine YTD return, 26-week ELO percentile, and trend state. Stocks that score high on relative strength and remain in a clean uptrend are the ones whose realized Ulcer Index over recent quarters is almost certainly lower than the broader universe — they simply haven't been allowed to sit in deep valleys long enough.
The Ulcer Index won't predict the next drawdown. But used as a lens for screening and sizing, it pushes you toward holdings you're more likely to actually stick with — which, more than any other factor, is what determines whether a long-term strategy ever delivers its long-term returns.


