Summary
– The Ulcer Index (UI) is a downside-risk volatility measure that captures both the depth and duration of drawdowns (percent declines from recent highs).
– Developed by Peter Martin and Byron McCann (published 1989), the UI focuses only on downside movement — the “ulcer‑forming” part of volatility — rather than treating up and down moves equally as standard deviation does.
– UI is typically reported as a percentage (e.g., 2.8) and is most commonly calculated over a 14‑day look‑back, though any look‑back can be used.
Why UI matters
– Investors are often more concerned about downside risk than upside volatility. UI quantifies how far and how long a price stays below its recent highs.
– Useful for comparing downside risk across securities or funds, for monitoring changing risk conditions (spikes), and as the denominator in risk‑adjusted return measures (e.g., the Martin Ratio: (return − risk‑free rate) / UI).
How the Ulcer Index is calculated (concept and formula)
1. Choose a look‑back period of n days (commonly n = 14).
2. For each day i in the period compute the rolling high up to that day: rolling_high_i = max(close_1 … close_i).
3. Compute the percent drawdown for each day:
drawdown_i = 100 × (close_i − rolling_high_i) / rolling_high_i
(this value is zero when the price is at a rolling high, negative when below).
4. Square each drawdown, average the squared drawdowns over n days, then take the square root:
UI = sqrt( (1/n) × Σ(drawdown_i^2) )
So UI is essentially the root mean square of the daily percent drawdowns over the look‑back window.
Worked example (5‑day sample)
Day closes: 100, 98, 95, 97, 102
– Rolling highs: 100, 100, 100, 100, 102
– Drawdowns (%): 0, −2, −5, −3, 0
– Squared drawdowns: 0, 4, 25, 9, 0 → average = 38/5 = 7.6 → UI = sqrt(7.6) ≈ 2.76
Interpretation: Over the sample window the typical downside deviation (root mean square drawdown) is about 2.8%.
Practical steps to compute UI
– In Excel:
1. Put closing prices in column A (A2:A15 for a 14‑day window).
2. In B2 compute rolling high: =MAX($A$2:A2) and copy down.
3. In C2 compute drawdown (%) : =100*(A2-B2)/B2 and copy down.
4. In D2 compute squared drawdown: =C2^2 and copy down.
5. For a rolling 14‑day UI at day t use: =SQRT(AVERAGE(D[t-13]:D[t])).
– In Python (pandas, rolling 14):
• Compute rolling cumulative max: rolling_high = prices.cummax() (or use group-by if using sliding windows).
• drawdown = 100 * (prices − rolling_high) / rolling_high
• ui = drawdown.pow(2).rolling(window=14).mean().pow(0.5)
– Note: For a sliding look‑back window where the “rolling high” should be the max within that window up to each day, you may need a custom rolling max over the window (pandas .rolling(window).max()) and handle the alignment carefully.
How to use the Ulcer Index in practice
– Comparing investments: Lower average UI over a period indicates lower historical downside stress. Use UI alongside return to judge risk‑adjusted performance.
– Risk‑adjusted return: Use the Martin Ratio (return − risk‑free rate) / UI as an alternative to Sharpe ratio when you want downside‑only risk in the denominator.
– Monitoring: Track UI over time (possibly with a moving average). Spikes beyond normal levels can signal elevated downside risk and prompt re‑assessment or hedging.
– Timeframes: Choose the look‑back to match your investment horizon — shorter for active trading, longer for fund/investment evaluation.
– Combining indicators: Use UI with drawdown duration metrics, maximum drawdown, volatility (standard deviation), and position sizing rules to form a fuller risk picture.
Limitations and cautions
– UI measures only downside volatility; it ignores upside variability that may be relevant for some strategies.
– No universal “good” or “bad” thresholds — interpretation is relative to an asset’s history, peers, and investor tolerance.
– Like any historical metric, UI is backward‑looking and does not guarantee future behavior.
– Choice of look‑back window materially affects results — short windows produce more reactive UI; long windows smooth out short bursts.
Simple decision steps (practical checklist)
1. Define your objective and horizon (trading vs. long‑term investing).
2. Choose the look‑back period (14 days is common; consider 50/200 days for longer horizons).
3. Compute UI (Excel, Python, or charting software).
4. Compare UI across assets or to the asset’s historical average.
5. If UI rises sharply above its average, examine causes (news, fundamentals, market shock) and consider portfolio actions (reduce exposure, hedge, rebalance).
6. Combine UI with return measures (e.g., Martin Ratio) and other risk metrics before making allocation decisions.
Further reading and sources
– Original concept and book: Peter Martin and Byron McCann, The Investor’s Guide to Fidelity Funds (1989).
– Practical definition and examples: Investopedia — Ulcer Index (source provided by user)
Editor’s note: The following topics are reserved for upcoming updates and will be expanded with detailed examples and datasets.