> For the complete documentation index, see [llms.txt](https://chartschool.stockcharts.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chartschool.stockcharts.com/table-of-contents/technical-indicators-and-overlays/technical-indicators/ulcer-index.md).

# 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.&#x20;

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2Fs1IyMHzYT1fZiqUsgFf1%2Fulcerindexexample.png?alt=media&amp;token=5debfa91-7872-405f-bde8-9544e05517fb" alt=""><figcaption></figcaption></figure>

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 <a href="#calculation" id="calculation"></a>

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

```
Percent-Drawdown = ((Close - 14-period Max Close)/14-period Max Close) x 100

Squared Average = (14-period Sum of Percent-Drawdown Squared)/14

Ulcer Index = Square Root of Squared Average
```

The table shows a sample calculation for 14 periods.

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FCJFkmof4T37pdOupcEVz%2Fui-00-xsheet.png?alt=media&amp;token=349f9f40-6087-4925-aa00-dc9728b613f0" alt=""><figcaption><p>Ulcer Index calculation example</p></figcaption></figure>

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.&#x20;

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2F07K1nEx6LirajZK4P2vl%2Fui-01-ibm-examp.png?alt=media&amp;token=3edf92b7-f8e6-4e39-a0bc-b2686c387e9e" alt=""><figcaption><p>The calculation example above uses the data on the latest 14 bars of this chart</p></figcaption></figure>

## Interpreting the Ulcer Index <a href="#interpretation" id="interpretation"></a>

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 <a href="#comparing_funds" id="comparing_funds"></a>

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.&#x20;

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.&#x20;

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.

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FPojx78DPLjyqdpSmbG4z%2Fui-02-highui.png?alt=media&amp;token=ffc419af-48ac-4628-bcd4-f190d9d5fe16" alt=""><figcaption><p>The Ulcer Index rarely goes above 10.0 for FSCPX</p></figcaption></figure>

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.

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FApcfthXwJ7Le1fIwjTcn%2Fui-03-lowui.png?alt=media&amp;token=b0145b02-fca1-446a-bf0b-da681c4119c1" alt=""><figcaption><p>FSENX has a lower average Ulcer Index value, making it lower risk</p></figcaption></figure>

### Measuring Risk-Adjusted Return <a href="#risk-adjusted_return" id="risk-adjusted_return"></a>

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.&#x20;

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.&#x20;

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FGEcCLQqTPlaTYUivI6hu%2Fui-04-upi.png?alt=media&amp;token=b307020b-77d5-4758-a49b-ea4bf4f5329e" alt=""><figcaption><p>Using the Ulcer Index to risk-adjust the expected total returns for funds</p></figcaption></figure>

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 <a href="#conclusion" id="conclusion"></a>

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 <a href="#using_with_sharpcharts" id="using_with_sharpcharts"></a>

### Using with SharpCharts <a href="#using_with_sharpcharts" id="using_with_sharpcharts"></a>

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.&#x20;

[Click here for a live version of this chart.](https://stockcharts.com/sc3/ui/?s=SPY\&a=2382437900\&p=W\&b=5\&g=0\&id=p99079103666)

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FxEyNQgcYQ4LS7SyxbbwH%2Fui-05-spy-live.png?alt=media&amp;token=740755f7-054a-49fd-94f0-7d79df028b0f" alt=""><figcaption></figcaption></figure>

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FIsFjy2PXpG4dUkDjHLTT%2Fui-06-shch.png?alt=media&amp;token=49e4e233-9061-4939-bb52-a941679ffdab" alt=""><figcaption><p>Ulcer Index settings in SharpCharts</p></figcaption></figure>

{% hint style="info" %}
**Learn More:** For more details on the parameters used to configure Ulcer Index indicators, please see our [SharpCharts Parameter Reference](https://help.stockcharts.com/charts-and-tools/sharpcharts/sharpcharts-workbench/editing-sharpcharts/sharpcharts-parameter-reference#ulcer_index_ui) in the Support Center.
{% endhint %}

### 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.

<figure><img src="https://436553459-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FERtrZrZOhufFzk6ZQO4B%2Fuploads%2FcDluVIbJX04HxNyXO531%2Fulcerindexinacp.png?alt=media&amp;token=44254e3f-3137-4c90-818b-48cf611b98af" alt=""><figcaption></figcaption></figure>

[Click here for a live version of this chart.](https://schrts.co/CjykFKiZ)

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 <a href="#suggested_scans" id="suggested_scans"></a>

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](https://stockcharts.com/def/servlet/ScanUI).

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](https://stockcharts.com/h-al/al).

### Weeding Out High Volatility <a href="#weeding_out_high_volatility" id="weeding_out_high_volatility"></a>

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.

```
[group is SP600]
AND [Daily EMA(50,close) > Daily EMA(200,close)]

AND [ULCER(14) < 10]
```

{% hint style="info" %}
**Learn More.** For more details on the syntax for Ulcer Index scans, please see our [Scanning Indicator Reference](https://help.stockcharts.com/scanning-and-alerts/scan-writing-resource-center/scan-syntax-reference/scan-syntax-technical-indicators#ulcer_index_ulcer) in the Support Center.
{% endhint %}

## Additional Resources <a href="#further_study" id="further_study"></a>

### Recommended Books

[**Technical Analysis of the Financial Markets**](https://a.co/d/6g6wOW9)\
John J. Murphy

[**Technical Analysis Explained**](https://a.co/d/gebcznJ)\
Martin Pring


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://chartschool.stockcharts.com/table-of-contents/technical-indicators-and-overlays/technical-indicators/ulcer-index.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
