Formula, in Risk & Portfolio Construction
Ulcer Index Formula
The Ulcer Index is the root mean square of the percentage drawdowns from each point's prior high-water mark. By squaring drawdowns it weights deep, prolonged declines far more heavily than shallow ones, and because it only ever sees values at or below zero it ignores upside volatility entirely, capturing the discomfort an investor actually feels.
4 variables. Published May 26, 2026. By AI Fin Hub Research.
UI = sqrt( (1/n) x sum_t ( D_t )^2 )
D_t = 100 x (Equity_t / Peak_t - 1) (percentage drawdown, <= 0) Variables
D_t
Percentage drawdown
The decline from the running peak at time t, expressed in percent and always less than or equal to zero. At a new high it is zero, so peaks contribute nothing to the index.
Equity_t / Peak_t
Equity relative to peak
Current value over the highest value seen so far. Subtracting one and scaling by 100 converts it to a percentage drawdown.
n
Number of periods
Total count of observations in the series. The squared drawdowns are averaged over all periods, so longer time spent underwater raises the index.
UI
Ulcer Index
The square root of the mean squared drawdown. A larger value means deeper or longer-lasting losses. It serves as the risk denominator in the Martin (Ulcer Performance) ratio.
Step by step
- 1
Track the running peak of the price or equity series.
Prices 100, 105, 98, 96, 102 have running peaks 100, 105, 105, 105, 105.
- 2
At each point compute the percentage drawdown from the running peak.
Drawdowns: 0%, 0%, 98/105-1 = -6.667%, 96/105-1 = -8.571%, 102/105-1 = -2.857%.
- 3
Square each percentage drawdown and sum them.
Squares: 0 + 0 + 44.44 + 73.47 + 8.16 = 126.07.
- 4
Divide by the number of periods and take the square root.
126.07 / 5 = 25.21; sqrt(25.21) = 5.02.
Worked example
Five-point price series, percentage drawdowns
Price path
100, 105, 98, 96, 102
Periods n
5
Running peaks: 100, 105, 105, 105, 105. Drawdowns in percent: 0, 0, -6.667, -8.571, -2.857. Squares: 0, 0, 44.44, 73.47, 8.16, summing to 126.07. Mean = 126.07 / 5 = 25.21. Ulcer Index = sqrt(25.21) = 5.02.
Ulcer Index of about 5.0. The two consecutive declines to 98 and 96 dominate the figure because squaring amplifies the deeper -8.57% drawdown; the brief recovery to 102 still sits below the 105 peak and so contributes a small positive term rather than offsetting the losses.
Common variations
Run the numbers next
- Calculators Risk-Adjusted Returns Calculator
Paste a returns CSV. Sharpe, Sortino, Calmar, Omega, alpha, beta, tracking error, information ratio, max drawdown, and tail moments — plus.
- Calculators Returns Distribution Analyzer
Paste a returns CSV. Histogram, normal QQ plot, skewness, excess kurtosis, Jarque-Bera test, tail-weight index. See why Sharpe alone misleads.
Questions people ask next
What does the Ulcer Index measure and how is it different from maximum drawdown?
The Ulcer Index is the root mean square of all percentage drawdowns from running highs, capturing both the depth and duration of losses. Maximum drawdown reports only the single worst trough. A prolonged moderate decline raises the Ulcer Index just as much as a brief severe one, which maximum drawdown misses entirely.
Why does the Ulcer Index square the drawdowns?
Squaring weights deep or prolonged declines far more heavily than shallow ones. In the worked example, a -8.57% drawdown contributes 73.47 to the sum while a -2.86% drawdown contributes only 8.16 — a ninefold difference for a threefold size difference. This makes the index sensitive to the sustained underwater periods that cause the most investor discomfort.
What is the Martin ratio and how does it use the Ulcer Index?
The Martin ratio, also called the Ulcer Performance Index, is the excess return over the risk-free rate divided by the Ulcer Index. It is the direct Sharpe analog using drawdown-based risk instead of total volatility. A higher value means the portfolio generates excess return with limited deep or prolonged declines.
How do I compute the Ulcer Index step by step?
Track the running peak of the price or equity series. At each point compute the percentage drawdown from that peak (100 times current divided by peak, minus 1, always at or below zero). Square each drawdown and sum them. Divide by the number of periods and take the square root. For prices 100, 105, 98, 96, 102 this gives an Ulcer Index of about 5.0.
Sources
- The Investor's Guide to Fidelity Funds , Peter G. Martin and Byron B. McCann (1989), method summarized at TangoTools
- Practical Portfolio Performance Measurement and Attribution , Carl R. Bacon, Wiley (2008)
Keep the topic connected
- Formula Maximum Drawdown Formula
The maximum drawdown formula: the largest peak-to-trough decline in an equity curve. The worst loss from a prior high, with a worked example.
- Formula Calmar Ratio Formula
The Calmar ratio formula: annualized return divided by maximum drawdown over the period. A drawdown-based risk-adjusted return with a worked example.
- Formula Downside Deviation Formula
The downside deviation formula: root mean square of returns below a target, over total observations. The risk term inside the Sortino ratio.
- Learn Drawdown
Drawdown explained: peak-to-trough decline, why max drawdown alone is misleading, and the recovery math that actually matters.