Stop-Loss Sizing: Position Sizing by Ulcer Index (UI) Drawdown Pain
Learn how to use the Ulcer Index to calculate drawdown depth and duration, optimizing portfolio risk allocations based on volatility.
🔧 Interactive Utility Tool
Try the free, 100% secure client-side tool associated with this guide. No registration required.
Position Sizing by Ulcer Index (UI) Drawdown Pain
When building a trading system, standard deviation is the most common metric used to calculate risk. However, standard deviation fails to distinguish between upward price spikes (positive volatility) and downward price drops (negative volatility). Furthermore, it ignores the duration of a drawdown. To resolve this, quantitative managers use the Ulcer Index (UI) to evaluate strategy risk and scale allocation sizes.
In this guide, we'll write out the Ulcer Index formula, explain drawdown duration penalties, and analyze position sizing.
📐 The Ulcer Index (UI) Formula
The Ulcer Index measures the depth and duration of drawdowns in an equity curve.
- Calculate Drawdown ($D_i$): For each day $i$, calculate the percentage drop from the highest peak reached up to that point ($P_{\text{max}}$): $$D_i = 100 \times \left( \frac{\text{Price}i - P{\text{max}}}{P_{\text{max}}} \right)$$
- Calculate the Quadratic Mean: Square the daily drawdowns, find their average over a lookback window $N$, and take the square root: $$\text{Ulcer Index} = \sqrt{\frac{1}{N} \sum_{i=1}^{N} D_i^2}$$
By squaring the drawdowns, the Ulcer Index penalizes deep retracements more heavily than shallow pullbacks. Because it evaluates every daily data point in a drawdown (not just the valley), it also penalizes strategies that remain stuck in drawdowns for months.
📊 Volatility Bands Reference
When planning entries, traders use ATR volatility bands to structure protection zones. The chart below illustrates how volatility bands establish risk parameters around asset price channels:

🔍 Sizing Positions with the Ulcer Index
To size positions based on drawdown stress: * Scale Inversely to UI: Allocate larger capital weights to trading systems displaying low Ulcer Index values, and scale down systems with high UI values. * Drawdown Management: Review the maximum historical drawdowns of your strategies. (See our Maximum Drawdown Sizing Guide to check account threshold boundaries). * Calculate Positions Instantly: Use our browser-based Position Size Calculator to quickly model share counts and risk targets.
Join the Urbandigistore Hub
Subscribe to receive premium developer cheat sheets, advanced conversion techniques, and campaign optimization checklists. Zero spam, unsubscribe anytime.
🚀 Launch Interactive Tool
Ready to test this directly? Open the secure web tool in a new sandbox tab.