Drawdown
Quick Reference
| Property | Value |
|---|---|
| Dimension | regime |
| Category | market_regime |
| Version | v0.9.0 (Beta) |
| Output Column | drawdown |
Drawdown from peak: price / rolling_max(price) - 1 - measures current decline from the highest observed price
Formula
(price / rolling_max(price, window)) - 1.0
CDM Inputs
| Column | CDM Table | Description |
|---|---|---|
price | cdm_* | CDM source table |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
window | integer [0, 100000] | 0 | Window for rolling peak calculation (0 = expanding/unbounded) |
Output
Column: drawdown
Drawdown from peak (negative values, 0=at peak, -1=-100%)
Market Intuition & Trading Rationale
Drawdown measures the decline from the recent peak: price / rolling_max(price) - 1. A value of 0 means price is at the peak. A value of -0.1 means price is 10% below the peak. A value of -0.5 means a 50% drawdown. This is the most intuitive risk measure — "how much have I lost from the best point?"
The window parameter determines whether the peak reference is expanding (all-time high, window=0) or rolling (N-period high). All-time drawdowns capture the full magnitude of bear markets and crashes. Rolling drawdowns capture recent corrections and are more responsive to the current regime. A rolling 50-bar drawdown of -5% during a bull market may be significant; the same drawdown from an all-time high after a 200% rally is noise.
Drawdown is path-dependent — it only knows where price is relative to where it has been. A stock that went 100 → 50 → 60 has a drawdown of -40% (from 100 to 60), not -50% (the trough). This captures the lived experience of an investor who bought at the peak.
Usage Cases
- Risk management: Set maximum drawdown limits per position or portfolio. When drawdown exceeds the limit, reduce exposure or stop trading. This is the industry standard for risk control in managed accounts.
- Mean reversion timing: Extreme drawdowns (e.g., drawdown < -20% for a normally stable instrument) tend to mean-revert. Enter long when drawdown is historically extreme and showing signs of stabilization.
- Regime classification: drawdown < -20% from all-time high → bear market regime. drawdown > -5% → bull market regime. Between -5% and -20% → correction regime. Each regime warrants different strategy allocations.
YAML Definition
name: drawdown
description: 'Drawdown from peak: price / rolling_max(price) - 1 - measures current
decline from the highest observed price'
category: market_regime
version: v0.9.0 (Beta)
dimension: regime
status: Pre-release
required_inputs:
- price
output_column: drawdown
output_description: Drawdown from peak (negative values, 0=at peak, -1=-100%)
parameters:
window:
type: integer
description: Window for rolling peak calculation (0 = expanding/unbounded)
required: false
default: 0
constraints:
min: 0
max: 100000
formula: (price / rolling_max(price, window)) - 1.0