What is the Ulcer index? Formula, example and the Martin ratio
On this page
Key takeaways
- The Ulcer index is the root mean square of the drawdowns: square each period's percentage distance below the running peak, average those squares, and take the square root.
- Unlike maximum drawdown, it counts every period spent underwater, so a long slump scores far higher than a quick crash of the same depth.
- Unlike volatility, it ignores rises entirely: a portfolio that only climbs has an Ulcer index of zero, however much it swings upward.
- The Ulcer performance index, also called the Martin ratio, divides excess return by the Ulcer index, a return-per-unit-of-pain measure in the spirit of the Sharpe ratio.
- MarketHeist computes the Ulcer index on month-end values over the whole window, against the highest value since the window began, and reports the Martin ratio with a zero risk-free rate.
Definition
The Ulcer index is a measure of downside risk that takes the square root of the average squared percentage drawdown from the running peak, so it grows with both how deep and how long a portfolio stays below its previous high. Developed by Peter Martin in 1987, it rises little for a sharp fall that recovers quickly and a lot for a long, deep slump.
Also known as: UI, Martin's Ulcer index, Ulcer performance index, UPI, Martin ratio, drawdown volatility.
How it works
Peter Martin designed the index in 1987 to capture what makes holding an investment stressful: not the ups and downs, but the time spent below a previous high and how far below it was. He and Byron McCann used it to rank mutual funds in their 1989 book on Fidelity funds.
Each period, measure how far the value sits below the highest value so far, in percent; at a new high the figure is zero. Square every one of those figures, take the average over all periods, and take the square root. Squaring makes deep drawdowns count much more than shallow ones; averaging over every period makes long drawdowns count more than short ones.
That combination is what separates it from its neighbours. Maximum drawdown records only the single worst point. Volatility treats a sudden gain as risk as much as a sudden loss. The Ulcer index sees only the losses, and sees all of them, weighted by depth and by time.
Think of two storms that flood a street to the same height: one drains overnight, the other leaves water standing for a year. Maximum drawdown records the height of the flood; the Ulcer index records how much living with it there was.
Martin also proposed a reward measure built on it, the Ulcer performance index: annual return above the risk-free rate, divided by the Ulcer index. It plays the role the Sharpe ratio plays for volatility, with drawdown pain as the risk.
Formula
- Rₜ
- drawdown in percent at period t: zero at a new high, negative below it
- Vₜ
- value at the end of period t (month-end on MarketHeist)
- max Vₛ
- the highest value up to and including period t
- UI
- Ulcer index, in percentage points
- N
- number of periods in the window, including those at a new high (Rₜ = 0)
- Rₜ
- percentage drawdown at period t
It is the quadratic mean of the drawdown curve. A portfolio that never falls below a previous high has UI = 0.
- UPI
- Ulcer performance index
- Rₚ
- annualized return of the portfolio (MarketHeist uses CAGR)
- R_f
- risk-free rate (zero on MarketHeist)
- UI
- Ulcer index in percent, so UI / 100 is a fraction
Worked example
Gold (GLD) and the S&P 500 (SPY), month-end values from Dec 2004 to Sep 2026, about 22 years.
On maximum drawdown alone, gold looks like the milder holding: its deepest decline was -42.9%, against -50.8% for the S&P 500.
The two declines had very different shapes. The S&P 500 fell from Oct 2007 to Feb 2009, 16 months, and regained its old high 37 months after the bottom. Gold slid from Aug 2011 to Dec 2015, 52 months of decline, and needed another 55 months to recover.
Gold is in another decline as of Sep 2026: it stands 21.3% below its Feb 2026 high, and the lab's drawdown chart ends inside that slump. The Ulcer index counts every month of it, so a decline that is still running keeps adding to the figure.
The Ulcer index registers the difference. Gold's was 18.9 and the S&P 500's 11.7: a long, deep slump weighs more in the average than a sharp drop that recovers. Gold's longest stretch below a previous high lasted 106 months; the S&P 500's lasted 52.
Growth over the window was similar, 10.3% a year for gold and 10.9% for the S&P 500, so the Ulcer performance index separates them: 0.54 for gold against 0.94 for the S&P 500. Per unit of drawdown pain, the S&P 500 delivered more growth over these years.
Neither figure is a verdict on gold as a holding. Gold has at times risen when stocks fell, which is one reason portfolios hold it beside stocks; measured on its own, its path in this window included one long slump. Measured by depth alone it looks calmer than stocks, and measured by depth and time together it does not.
Data through Sep 2026. Reproduce id 98f6a1376dbf220c (this guide, its lab setup and the data month).
Interactive lab
The underwater curves of both picks over the same months. The Ulcer index is the root mean square of each curve: switch portfolios and watch how area, not just depth, moves it.
| Measure | GLD | SPY |
|---|---|---|
| Maximum drawdown | -42.9% | -50.8% |
| Peak to trough | Aug 2011 to Dec 2015 | Oct 2007 to Feb 2009 |
| Back at the high | Jul 2020 | Mar 2012 |
| Months down | 52 | 16 |
| Months to recover | 55 | 37 |
| Longest underwater (months) | 106 | 52 |
| Ulcer index | 18.9 | 11.7 |
| Drawdowns deeper than 10% | 4 | 4 |
| CAGR | 10.3% | 10.9% |
| Volatility (annualized) | 17.3% | 14.8% |
| Ulcer performance index | 0.54 | 0.94 |
| Calmar ratio | 0.24 | 0.22 |
Ulcer index: the root mean square of the monthly drawdowns, in percent. Ulcer performance index: CAGR divided by the Ulcer index as a fraction, at a zero risk-free rate. Calmar ratio: CAGR divided by the size of the maximum drawdown. Dec 2004 to Sep 2026.
| Deepest drawdowns: GLD | Trough | Depth | Back at the high | Months down | Months up |
|---|---|---|---|---|---|
| Aug 2011 | Dec 2015 | -42.9% | Jul 2020 | 52 | 55 |
| Feb 2008 | Oct 2008 | -25.8% | May 2009 | 8 | 7 |
| Feb 2026 | Jun 2026 | -23.8% | not yet | 4 | open |
| Jul 2020 | Oct 2022 | -18.1% | Nov 2023 | 27 | 13 |
| Apr 2006 | Sep 2006 | -8.6% | Feb 2007 | 5 | 5 |
The first column is the month of the high before the decline.
| Deepest drawdowns: SPY | Trough | Depth | Back at the high | Months down | Months up |
|---|---|---|---|---|---|
| Oct 2007 | Feb 2009 | -50.8% | Mar 2012 | 16 | 37 |
| Dec 2021 | Sep 2022 | -23.9% | Dec 2023 | 9 | 15 |
| Dec 2019 | Mar 2020 | -19.4% | Jul 2020 | 3 | 4 |
| Sep 2018 | Dec 2018 | -13.5% | Apr 2019 | 3 | 4 |
| Jul 2015 | Sep 2015 | -8.5% | May 2016 | 2 | 8 |
The first column is the month of the high before the decline.
How MarketHeist computes it
Every choice an implementation has to make, as the code makes it today. The page is checked against the code each time it is built.
| Choice | How it is computed | In the code |
|---|---|---|
| Data | Monthly total returns (dividends reinvested). Funds younger than the period shown are extended backward with older funds, spliced on returns, not prices. | |
| Window | The worked example and the lab use the common window of the two portfolios compared, Dec 2004 to Sep 2026 (262 months), ending at the data month of this page. Another pick in the lab is read over its own common window. | |
| Portfolio streams | A fund is its proxy-extended monthly return stream. A built-in portfolio is read as the MarketHeist MCP reads it: its composed stream with its own rebalancing rule and overlay. A custom mix is rebalanced yearly. | |
| Drawdown | The percentage below the highest month-end value so far, from a value rebased to 1 at the start of the window. An episode runs from the month of a high until the value regains that high; the Ulcer index is the root mean square of the monthly drawdowns in percent, and time underwater counts every month below a high. | |
| Drawdown curve | Month-end value from monthly total returns, divided by the running peak, minus one. The running peak starts at the end of the first month of the window and is never reset. | drawdownpackages/portfolio/engine/metrics.ts |
| Ulcer index | √(mean of (100 · drawdown)²) over every month of the window, months at a new high included as zeros. Reported in percent units. This is Martin's whole-period form; charting platforms often use a rolling version over the last 14 periods instead, with the peak also taken over those 14 periods, which gives a different and much more volatile number. | ulcerIndexpackages/portfolio/engine/metrics_extra.ts |
| Ulcer performance index | CAGR divided by the Ulcer index as a fraction (UI / 100), with a risk-free rate of 0. Martin subtracted the Treasury-bill return; at a zero rate the figure is a return-per-pain ratio rather than an excess-return one. | cagrpackages/portfolio/engine/metrics.ts |
| Longest time underwater | The longest run of consecutive months with a drawdown below −1e-12, including a stretch still open at the end of the window. | longestUnderwaterMonthspackages/portfolio/engine/metrics_extra.ts |
| Frequency | Monthly. The index is often computed on daily or weekly closes elsewhere; month-end data miss falls that reverse within a month, so a monthly Ulcer index is usually somewhat lower than a daily one for the same fund. | |
| In the app | The portfolio report, the compare page and the MCP tools report the same whole-window Ulcer index, and trailing values (1 to 30 years, where the history is long enough) computed the same way inside each trailing window. | trailingMetricspackages/portfolio/engine/windows.ts |
| Engine functions | The functions the portfolio app and the MarketHeist MCP tools run, called here on the same monthly returns. | drawdownpackages/portfolio/engine/metrics.tsdrawdownEpisodespackages/portfolio/engine/analytics.tsulcerIndexpackages/portfolio/engine/metrics_extra.tslongestUnderwaterMonthspackages/portfolio/engine/metrics_extra.tsmetricsFromReturnspackages/portfolio/engine/portfolio.ts |
Ulcer index compared with its neighbours
| Measure | Counts rises as risk | Depth | Duration | Return-per-risk ratio |
|---|---|---|---|---|
| Volatility | Yes | Indirectly | No | Sharpe ratio |
| Downside deviation | No | Monthly losses only | No | Sortino ratio |
| Maximum drawdown | No | The single worst point | No | Calmar ratio |
| Ulcer index | No | Every month below a high, squared | Yes | Ulcer performance index (Martin ratio) |
| Longest time underwater | No | No | The single longest stretch | None |
Limitations
- The value depends on where the window starts: the running peak begins at the first month, so a series that starts just after a crash looks calmer than one that starts just before it.
- Squaring makes the index sensitive to the deepest episode; one long, deep slump can dominate a long history.
- It is a backward-looking summary of one path and says nothing about how likely a future slump is.
- Month-end data understate falls that reverse within a month.
- There is no single convention. Whole-period and rolling 14-period versions, daily, weekly and monthly data, all give different numbers, so compare Ulcer indexes only when they were computed the same way.
Frequently asked questions
- What is the Ulcer index?
- A downside risk measure: the square root of the average squared percentage drawdown from the running peak. It is low for portfolios that rarely fall below a previous high, or recover quickly, and high for ones that spend long periods well below it.
- What is a good Ulcer index?
- There is no universal threshold, because the value depends on the window, the data frequency and the asset mix. It is most useful for comparing portfolios over the same months, computed the same way.
- How is the Ulcer index different from maximum drawdown?
- Maximum drawdown is the single deepest fall. The Ulcer index averages every period's drawdown, squared, so it also reflects how long the portfolio stayed down and how often it fell.
- What is the Martin ratio?
- Another name for the Ulcer performance index: annualized return minus the risk-free rate, divided by the Ulcer index. MarketHeist reports it with a zero risk-free rate.
- Why is it called the Ulcer index?
- Peter Martin named it for the stress of watching an investment sit below its previous high. The index is meant to measure that experience rather than price swings in general.
References
- Martin, P. G. and McCann, B. B. (1989) The Investor's Guide to Fidelity Funds. John Wiley and Sons. Introduces the Ulcer index (developed by Martin in 1987) and the Ulcer performance index.
- Young, T. W. (1991) Calmar Ratio: A Smoother Tool. Futures 20(1). The maximum-drawdown counterpart.
- Chekhlov, A., Uryasev, S. and Zabarankin, M. (2005) Drawdown Measure in Portfolio Optimization. International Journal of Theoretical and Applied Finance 8(1). Average and conditional drawdown measures.
Try it on your own holdings
Compare portfolios' Ulcer index and drawdowns side by side →
Or ask an assistant connected to the MarketHeist MCP server (https://marketheist.io/mcp), which computes the same figures:
Using MarketHeist.io, compare GLD and SPY over their common window: max drawdown, Ulcer index, longest time underwater and the drawdown episodes
Ask an AI assistant
The prompt opens in a new tab, already filled in. An assistant without the MarketHeist connector answers from its own knowledge, not from the figures on this page.
Historical simulation, not advice. Computed by the MarketHeist portfolio engine from monthly total returns, data through Sep 2026. Markdown version of this page: ulcer-index.md.