For the complete documentation index, see llms.txt. This page is also available as Markdown.

Ulcer Index

What Is the Ulcer Index?

Developed by Peter Martin and Byron McCann in 1987, the Ulcer Index is a volatility indicator that measures downside risk. It was first introduced in their 1989 book, The Investor's Guide to Fidelity Funds. Originally, the index was designed with mutual funds in mind, which is why it is only focused on downside risk. Mutual funds are designed to make money by increasing in value; the only risk, therefore, is the drawdown or downside.

As its name implies, the Ulcer Index measures the drawdown investors can expect to stomach on any given security. Many consider the Ulcer Index superior to the standard deviation and other measures of risk.

Calculating the Ulcer Index

Based on closing prices, the Ulcer Index measures volatility based on price depreciation from its high over a specific look-back period.

The table shows a sample calculation for 14 periods.

Ulcer Index calculation example

The index is zero if prices close higher each period. This means there is no downside risk because prices are steadily rising. Prices, of course, do not steadily rise, so there will be declines along the way. Using a default setting of 14 periods, the Ulcer Index reflects the expected percentage drawdown over this period.

The calculation example above uses the data on the latest 14 bars of this chart

Interpreting the Ulcer Index

Peter Martin, co-developer of the Ulcer Index, describes the indicator's interpretation as follows:

Ulcer Index measures the depth and duration of percentage drawdowns in price from earlier highs. The greater a drawdown in value, and the longer it takes to recover to earlier highs, the higher the UI. Technically, it is the square root of the mean of the squared percentage drawdowns in value. The squaring effect penalizes large drawdowns proportionately more than small drawdowns.

Since it puts a numeric value to the downside risk, it is often used to compare funds relative to each other or to their prior performance, in order to choose investments with lower risk of a price decline.

Comparing Funds

As a statistical measure, investors can compare Ulcer Index values across funds to determine relative risk. Martin notes that the Ulcer Index works well with weekly data.

The first chart below shows weekly closes for the Fidelity Select Consumer Discretionary Fund (FSCPX) with the 9-period Ulcer Index in the indicator window. A 52-period moving average was added to smooth the index and show a long-term average.

There were three spikes above 10 in 2022 and another in 2025 (yellow highlights); perhaps 2022 was an anomaly because of post-pandemic inflation's effect on the economy. With only one spike above 10 since 2022, investors can conclude that a spike above 10 is relatively rare. The 52-period moving average was at 3.26, and this value could be used to measure adjusted return.

The Ulcer Index rarely goes above 10.0 for FSCPX

The second chart shows the Fidelity Select Energy Fund (FSENX) with the same chart features. The Ulcer Index breached 10 twice, once in 2022 and once in 2025. The 52-week moving average of the Ulcer Index is at 2.60, which is much lower than the moving average for the consumer discretionary fund. This means the energy fund has less risk or drawdown potential than the consumer discretionary fund.

FSENX has a lower average Ulcer Index value, making it lower risk

Measuring Risk-Adjusted Return

A commonly-used measure of risk-adjusted return is the Sharpe Ratio. It is simply total return less the risk-free return divided by the standard deviation. However, as noted above, the standard deviation is considered inferior to the Ulcer Index because it accounts for both upside and downside volatility. Long-only investors are not concerned with upside volatility; it is downside volatility that produces drawdowns and stomach ulcers.

To correct for this shortcoming of the Sharpe Ratio, Martin introduced the Ulcer Performance Index (UPI), or Martin Ratio. This is simply total return less the risk-free return divided by the Ulcer Index. The goal is to find securities (funds) with the highest UPI, which means the highest risk-adjusted return.

The table below compares the Fidelity Select Consumer Discretionary Fund (FSCPX) with the Fidelity Select Energy Fund (FSENX) - the same symbols used in the chart examples above.

Using the Ulcer Index to risk-adjust the expected total returns for funds

The Total Return values in the table are based on the 10-year total return data from Morningstar. The 10-year Treasury Yield ($TNX) is used to represent the Risk-Free Rate. The Ulcer Index values are a 52-week average of the 9-week Ulcer Index, just like in the chart examples. Using this data, we can calculate the Ulcer Performance Index (UPI) for each fund.

The expected total return is higher for the consumer discretionary fund (FSCPX), but its higher Ulcer Index value shows that it carries greater risk as well. The UPI calculation adjusts for that risk, and shows that the energy fund (FSENX), with a slightly higher UPI, appears to provide a better risk-adjusted return than the consumer discretionary fund, despite its lower expected total return.

The Bottom Line

The Ulcer Index measures risk by focusing on drawdowns represented by price declines. This means it is best suited for long-only investors or traders. The index hovers near zero when prices regularly record higher highs and advance. The index rises when prices move lower and extend from their recent high. Keep in mind that the Ulcer Index is not an indicator per se. It is just a measure of downside risk that can be used to compute risk-adjusted returns.


Charting with the Ulcer Index

Using with SharpCharts

The Ulcer Index is available as an indicator for SharpCharts. Once selected, users can place the indicator above, below or behind the underlying price plot. Placing the Ulcer Index directly behind the price plot accentuates the movements relative to the price action of the underlying security. Users can add horizontal lines to the Ulcer Index panel to set a risk threshold, or add a moving average to smooth the Ulcer Index values.

Click here for a live version of this chart.

Ulcer Index settings in SharpCharts

Learn More: For more details on the parameters used to configure Ulcer Index indicators, please see our SharpCharts Parameter Reference in the Support Center.

Using with StockChartsACP

This indicator can be added from the Chart Settings panel for your StockChartsACP chart. The indicator can be positioned above, below, or behind the security's price plot.

Click here for a live version of this chart.

By default, the indicator uses 14 periods as the lookback period for calculating the downside risk. This parameter can be adjusted to meet your technical analysis needs.

Scanning for the Ulcer Index

StockCharts members can search for stocks based on Ulcer Index values. Below is an example scan that can be used for Ulcer Index-based signals. Simply copy the scan text and paste it into the Scan Criteria box in the Advanced Scan Workbench.

Members can also set up alerts to notify them when a Ulcer Index-based signal is triggered for a stock. Alerts use the same syntax as scans, so the sample scans below can be used as a starting point for setting up alerts as well. Simply copy the scan text and paste it into the Alert Criteria box in the Technical Alert Workbench.

Weeding Out High Volatility

The Ulcer Index can be used in scans to weed out securities with extremely high volatility. This simple scan searches for S&P 600 stocks that are in an uptrend. The final scan clause excludes high-volatility stocks from the results.

Learn More. For more details on the syntax for Ulcer Index scans, please see our Scanning Indicator Reference in the Support Center.

Additional Resources

Technical Analysis of the Financial Markets John J. Murphy

Technical Analysis Explained Martin Pring

Last updated

Was this helpful?