Ulcer Index (UI) is a downside volatility measure that quantifies the depth and duration of drawdowns from recent highs. Developed by Peter G. Martin in 1987, UI captures what most volatility measures miss: the pain of being underwater. Unlike standard deviation or ATR that treat upside and downside moves equally, UI measures only the decline from peaks—the psychological stress that keeps investors awake at night.
## Historical Context
Peter G. Martin introduced the Ulcer Index in 1987, with the full methodology published in his 1989 book "The Investor's Guide to Fidelity Funds" co-authored with Byron McCann. The name comes from the stress-induced ulcers that investors might develop watching their portfolios decline.
Martin developed UI as a risk metric specifically for evaluating mutual fund performance. He recognized that traditional volatility measures (like standard deviation) penalize upside volatility equally with downside—but investors don't mind upside "volatility." The problem is drawdowns: how far below the recent high, and for how long.
The Ulcer Index became the denominator for the Martin Ratio (also called the Ulcer Performance Index or UPI), a risk-adjusted return measure analogous to the Sharpe Ratio but using UI instead of standard deviation:
$$
\text{Martin Ratio} = \frac{R - R_f}{UI}
$$
This makes UI particularly valuable for comparing investments: lower UI means less "ulcer-inducing" drawdowns.
## Architecture & Physics
### 1. Rolling Maximum (Highest Close)
Track the highest closing price over the lookback period:
$$
H_t = \max(C_{t}, C_{t-1}, \ldots, C_{t-n+1})
$$
where:
- $C_t$ = Close price at time $t$
- $n$ = Period (default 14)
### 2. Percent Drawdown
Calculate how far price has fallen from the rolling high:
$$
D_t = \frac{C_t - H_t}{H_t} \times 100
$$
Note: $D_t \leq 0$ always (price cannot exceed its own maximum).
1.**Eliminates sign**: All drawdowns become positive contributions
2.**Penalizes large drawdowns**: A 20% drawdown contributes 400 to the sum; a 10% drawdown contributes only 100
This quadratic penalty means UI is highly sensitive to severe drawdowns—exactly what investors fear most.
### RMS Interpretation
The square root at the end returns UI to the same units as the input (percentage). UI can be interpreted as the "typical" percentage drawdown, weighted toward larger declines.
### Example Calculation
Consider a 5-period example:
| Day | Close | Rolling High | Drawdown (%) | Drawdown² |
| **Manual** | ✅ | Validated against Martin's formula |
## Common Pitfalls
1.**Warmup period**: UI requires a full period of data before producing valid results. During warmup, values represent partial-period calculations that may underestimate true UI.
2.**Zero interpretation**: UI=0 means price is at or above the period high—no drawdown. This doesn't mean low risk; the market might be at a blow-off top.
3.**Period selection**: Shorter periods (7-14) react quickly to recent drawdowns but may miss longer declines. Longer periods (21-50) capture extended bear markets but lag on recovery.
4.**Comparison across assets**: UI is percentage-based, so it's comparable across different-priced assets (unlike raw TR or ATR).
5.**Trend bias**: In strong uptrends, UI approaches zero (constantly at new highs). This might mask lurking risk when the trend eventually breaks.
6.**Not a timing indicator**: UI measures risk, not direction. High UI during a decline doesn't predict reversal—it just confirms you're underwater.