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.
Formula
Copy the exact expression or work through it step by step below.
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
Try These Tools
Run the numbers next
Risk-Adjusted Returns Calculator
Paste a returns CSV. Sharpe, Sortino, Calmar, Omega, alpha, beta, tracking error, information ratio, max drawdown, and tail moments — plus.
Returns Distribution Analyzer
Paste a returns CSV. Histogram, normal-overlay, QQ plot, skewness, excess kurtosis, Jarque-Bera test, tail-weight index. See why Sharpe alone misleads.
Sources & References
- 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)
Related Content
Keep the topic connected
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.
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.
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.
Drawdown
Drawdown explained: peak-to-trough decline, why max drawdown alone is misleading, and the recovery math that actually matters.