Ulcer Index calculator: drawdown depth and observation frequency

Calculate an observation-based Ulcer Index from trade-list equity. Check percentage units, uneven trade timing, missing intratrade losses, and UPI assumptions.

Calculate Ulcer Index From Your Trades

What Is Ulcer Index?

Ulcer Index is the root mean square of percentage drawdowns from earlier equity highs. Peter Martin’s explanation uses equally spaced observations to reflect both drawdown depth and persistence. Squaring gives larger drawdowns more weight than smaller ones.

Pineify applies this calculation to reconstructed trade observations plus the initial-capital point. These observations are not evenly spaced in calendar time. Its result describes drawdown across that trade sequence; it does not measure exactly how many days or months the account was underwater.

Formula

For each observed equity value E_i: Peak_i = highest observed equity up to i DD_i = 100 × (Peak_i − E_i) / Peak_i UI = sqrt(sum(DD_i²) / number of observations) Pineify includes the initial-capital observation with DD = 0. A 10% drawdown enters the formula as 10, not 0.10. Illustrative equity: 100 → 90 → 100 Drawdowns: 0%, 10%, 0% UI = sqrt(100 / 3) ≈ 5.7735 percentage points Current Pineify UPI = (CAGR percentage − configured risk-free percentage) / UI For example, CAGR 12%, risk-free rate 2%, and UI 5 give UPI 2. When UI is zero, the app returns UPI 0 as a fallback; the ratio is mathematically undefined.

How to Read This Number

Use matching units, capital assumptions, dates, and sampling before comparing values. A UI of 5 in percentage-point units is equivalent to 0.05 in decimal-return units. Mixing those conventions changes an apparent threshold by a factor of 100. There is no universal 0.10 or 0.25 cutoff that establishes strategy quality.

Lower UI means lower root-mean-square observed drawdown, not necessarily higher return or lower future loss. Cash held at an unchanged value can have UI zero. A trade-only curve can also omit adverse movement between its observations.

Repeated underwater observations increase their representation in the average, but elapsed time is not used as a weight in Pineify. Two identical trade-PnL sequences have the same UI even if one lasts days and the other months. UPI can differ because CAGR uses elapsed time. Negative UPI with positive UI means CAGR is below the configured risk-free rate; CAGR itself need not be negative.

What Counts as Good?

RangeValueWhat It Means
No observed drawdownUI = 0All sampled equity values are at their running peak. This does not prove there were no losses between observations or that future risk is zero.
Observed drawdownUI > 0The root-mean-square drawdown in percentage points. Evaluate the complete path and observation schedule instead of applying a universal grade.
Return below referenceUPI < 0, UI > 0CAGR is below the configured risk-free rate. This is a comparison with a reference, not a prescribed optimization action.

How Pineify Calculates Ulcer Index

Pineify adds imported net trade PnL to the configured initial capital, tracks running peaks, and averages squared percentage drawdowns across the initial point and each trade point. It does not reconstruct daily equity, intratrade mark-to-market losses, or deposits and withdrawals from that trade list. The current importer sorts trades by entry time, so overlapping trades that close in a different order need independent reconciliation. The UPI numerator uses CAGR, not total period return. CAGR uses the first entry through the latest exit and a 365.25-day year. Ensure the configured risk-free percentage uses a compatible annual basis. The app’s invalid-CAGR and zero-UI fallbacks require inspection rather than being interpreted as measured performance. Import a compatible trade-list CSV and verify the selected trades and initial capital. Local parsing and calculations are separate from optional AI analysis, which sends a derived report summary to the analysis API. No personal strategy result or universal sample-size guarantee is asserted here.

Review Your Ulcer Index

Upload your TradingView backtest CSV and get Ulcer Index (UI) alongside other return and risk metrics. Check the input assumptions before comparing results.

Analyze Your Backtest Now

Frequently Asked Questions

Everything you need to know about this metric