Ulcer Index Pass Node
Ulcer Index — Series Input
Overview
The Ulcer Index Pass Node applies the Ulcer Index algorithm to any upstream numeric series. The Ulcer Index measures downside volatility — specifically, the depth and duration of drawdowns from recent highs. Unlike standard deviation (which treats up and down moves equally), the Ulcer Index only penalises declines, making it a one-sided risk measure beloved by long-only traders.
The pass variant accepts a { values, timestamps } input, enabling Ulcer Index on indicator outputs, portfolio equity curves, or any custom data stream, not just closing prices.
Formula
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| period | number | 14 | Lookback window for both the rolling high and the RMS drawdown calculation. |
Inputs & Outputs
| Slot | Direction | Type | Description |
|---|---|---|---|
| input | Input | { values, timestamps } | Any upstream numeric series (must be positive for meaningful drawdown calculation) |
| values | Output | (number | null)[] | Ulcer Index values (≥ 0); nulls during warm-up |
| timestamps | Output | number[] | Unix timestamps aligned to the input series |
Use Cases
Equity Curve Risk
Apply to a portfolio NAV or equity curve to measure drawdown risk in a single indicator.
Downside-Only Volatility Filter
Use Ulcer Index instead of ATR when you only care about adverse price moves and want to ignore upside volatility.
Martin Ratio
Divide annualised return by Ulcer Index to compute the Martin Ratio — a risk-adjusted return metric superior to Sharpe for long-only strategies.
Tips & Best Practices
📉 Positive Series Only
Ulcer Index is defined for positive series (prices, NAV). Applying it to zero-crossing oscillators may give unintuitive results.
⚡ vs ATR
ATR treats upside and downside equally; Ulcer Index only measures drawdown severity. Use Ulcer Index when upside volatility is not a risk.
🔗 vs Standard Node
If the data comes directly from a stock source, use the standard Ulcer Index node. Use this Pass node for any other numeric series.