The Ulcer Index was developed by Peter G. Martin and Byron B. McCann as a risk measure specifically designed to capture what investors actually fear: prolonged drawdowns that test patience and capital. Unlike standard deviation (which treats upside and downside volatility equally) or Maximum Drawdown (which captures only the single worst drawdown event), the Ulcer Index measures the average severity of all drawdown periods simultaneously — penalizing strategies that spend extended time underwater and rewarding strategies that recover quickly after losses. The name is intentional: the metric is designed to correlate with the "stomach-churning" stress that comes from watching a position remain in drawdown month after month. For crypto bot traders managing automated strategies through bull and bear cycles, the Ulcer Index is one of the most practically meaningful risk metrics available — it tells you not just how bad a single worst drawdown was, but how much of the entire trading period was spent in drawdown. DennTech reports the Ulcer Index in its strategy performance dashboard alongside Maximum Drawdown and Recovery Factor.
Related metrics: Maximum Drawdown, Recovery Factor, Sortino Ratio.
Ulcer Index Formula
Step 1: Calculate Drawdown at each point Drawdown(t) = (Price(t) - MaxPrice(t)) / MaxPrice(t) × 100 Where MaxPrice(t) = highest price or equity peak reached up to time t Step 2: Square each drawdown value Step 3: Calculate the mean of squared drawdowns over N periods Step 4: Take the square root (like standard deviation but applied to drawdowns only) UI = sqrt( sum(Drawdown(t)^2) / N ) Example: Week 1: -2%, Week 2: -5%, Week 3: -8% (continued drawdown), Week 4: -3%, Week 5: 0% Squared: 4, 25, 64, 9, 0 Mean: (4+25+64+9+0)/5 = 20.4 UI = sqrt(20.4) = 4.52 Interpretation: The strategy spent significant periods in moderate drawdown (4.52 = meaningful sustained stress) A strategy with UI of 1.0 barely leaves its equity peak — very low drawdown stress
Ulcer Performance Index (UPI)
UPI = (Annualized Return - Risk-Free Rate) / Ulcer Index This is the Ulcer equivalent of the Sharpe Ratio — return per unit of "drawdown stress." Example: Annualized Return: 45% | Risk-Free Rate: 0% | Ulcer Index: 8.5 UPI = 45 / 8.5 = 5.29 Compare two strategies: Strategy A: Return 50%, UI 12 → UPI = 4.17 Strategy B: Return 40%, UI 5 → UPI = 8.0 ← Preferred despite lower return Strategy B has lower absolute return but far lower sustained drawdown stress — it delivers better return per unit of "ulcer-inducing" drawdown severity
Ulcer Index vs Other Risk Metrics
| Metric | Measures | Limitation |
|---|---|---|
| Max Drawdown | Worst single drawdown event | Ignores duration and non-max drawdowns |
| Standard Deviation | Total return volatility | Penalizes upside volatility equally to downside |
| Sortino's Downside Dev. | Downside return volatility | Return-based, not drawdown-duration based |
| Ulcer Index | Depth AND duration of all drawdowns | Less widely known; requires equity curve data |
Ulcer Index Benchmarks
| Ulcer Index Level | Interpretation |
|---|---|
| Below 2 | Excellent — strategy stays near equity highs consistently |
| 2 – 5 | Good — moderate occasional drawdowns with reasonable recovery |
| 5 – 10 | Moderate — significant drawdown periods; test your patience |
| Above 10 | High stress — extended periods in significant drawdown |
Frequently Asked Questions
- How is the Ulcer Index more useful than Maximum Drawdown for evaluating crypto bot strategies?
- Maximum Drawdown captures only the single worst drawdown in the backtested period — it tells you the worst case but nothing about how typical drawdowns behave. A strategy can have a relatively modest Maximum Drawdown of 12% but an Ulcer Index of 9 if it spends most of its time in small-to-moderate drawdowns that never quite recover before beginning again. Conversely, a strategy might have a Maximum Drawdown of 20% but an Ulcer Index of 3 — the single large drawdown recovered quickly and the rest of the equity curve stayed near its peaks. The Ulcer Index captures this "time spent underwater" dimension that Maximum Drawdown misses. For the practical experience of running a live crypto bot, the Ulcer Index is more predictive of psychological comfort: a low Ulcer Index means your bot's equity curve is smooth and near its high-water mark most of the time, which is more sustainable for long-term operation. See our Maximum Drawdown guide. Compare editions at the pricing page.
- What Ulcer Index should I target for my DennTech strategy?
- Target Ulcer Index depends on your trading timeframe and risk tolerance. For conservative long-term automated strategies where capital preservation is primary: target UI below 5 — this means the strategy rarely spends extended periods in meaningful drawdown. For medium-risk trend-following strategies: UI 5–10 is acceptable if the Ulcer Performance Index (UPI) is above 3.0 — the drawdown stress is compensated by sufficient returns. For aggressive growth strategies on a small speculative allocation: UI above 10 may be acceptable if the absolute return is high, but this requires very strong psychological conviction and the capital to absorb extended drawdown periods without abandoning the strategy. Use the UPI (return divided by Ulcer Index) as the primary selection criterion between strategies — it ensures you're being compensated for whatever drawdown stress level you accept. See our Recovery Factor guide. Explore the live demo. Start at the pricing page.
- How does DennTech calculate and report the Ulcer Index?
- DennTech's performance dashboard calculates the Ulcer Index from the complete equity curve of your backtest (or live trading history), computing the running drawdown from the highest equity peak at each time step, squaring the drawdown percentages, averaging over the full period, and taking the square root. The result is displayed alongside Maximum Drawdown and Recovery Factor in the Risk Metrics section of the strategy performance panel. DennTech also reports the Ulcer Performance Index (UPI) automatically: strategy annualized return divided by Ulcer Index, enabling direct comparison of return-per-unit-drawdown-stress between different strategies. Both metrics are updated in real-time during live bot operation — your current UI reflects actual drawdown behavior since the strategy started running. Full metric documentation is at DennTech docs. Start at the pricing page.
Risk metrics: Ulcer Index (this guide), Max Drawdown, Recovery Factor. All at the strategies page.