Jurik Volatility (JVOLTY) is the adaptive volatility component extracted from Mark Jurik's JMA algorithm. Unlike traditional volatility measures that treat all price movements equally, JVOLTY uses a 128-bar trimmed mean distribution to compute a robust volatility reference that rejects outliers by design. The result: a volatility measure that remains stable during flash crashes, earnings surprises, and 5-sigma events while still tracking genuine regime changes.
## Historical Context
When Mark Jurik developed JMA in the 1990s, he embedded a sophisticated volatility measurement system within it. This wasn't documented. It wasn't marketed separately. It was just part of the compiled DLL that powered the adaptive smoothing.
The reverse-engineering efforts that revealed JMA's true algorithm also exposed this volatility component. While the forum approximations used simple exponential smoothing for volatility (easy to implement, reasonable results), Jurik's actual approach was radically different: maintain a 128-sample distribution of recent volatility readings and compute a trimmed mean that discards the tails.
JVOLTY extracts this volatility measurement system as a standalone indicator. The same percentile trimming that makes JMA stable during market dislocations now provides a standalone volatility metric. For traders who need JMA's volatility reference without the smoothed price output, JVOLTY delivers exactly that.
The implementation matches the decompiled reference within floating-point tolerance.
## Architecture & Physics
JVOLTY computes volatility through a four-stage pipeline: adaptive band tracking, local deviation measurement, short-term smoothing, and distribution-based trimmed mean calculation.
where $\beta_t$ is the adaptive decay rate derived from the volatility-adjusted exponent.
When price breaks a band, it snaps immediately. Otherwise, the band decays toward price at rate $\beta$. This creates an envelope that expands quickly during breakouts and contracts slowly during consolidation.
### 2. Local Deviation
The instantaneous deviation measures distance from the adaptive bands:
The epsilon prevents division by zero in downstream calculations. This deviation captures how far price has moved relative to the recent range established by the bands.
### 3. Short Volatility (10-bar SMA)
The local deviation is smoothed with a 10-bar simple moving average:
$$
V_t = \frac{1}{10} \sum_{i=0}^{9} \Delta_{t-i}
$$
This smoothed deviation represents the "raw" volatility reading that feeds into the distribution buffer. The 10-bar window provides enough smoothing to avoid tick-level noise while remaining responsive to genuine volatility changes.
### 4. Volatility Distribution (128-sample trimmed mean)
The core innovation: instead of exponential smoothing, JVOLTY maintains a 128-sample circular buffer of raw volatility readings. On each bar, the buffer is sorted and a trimmed mean is computed:
During warmup, the trim ratio adapts dynamically based on available samples.
**Why trimmed mean?** A 5% gap-up creates a massive spike in traditional volatility measures. With exponential smoothing, this spike persists—half its effect remains after the EMA period, a quarter after two periods. With trimmed mean, a single spike falls outside the 25th-75th percentile and gets discarded entirely. JVOLTY asks: "Is this volatility reading unusual relative to recent history?" If yes, ignore it.
### 5. Dynamic Exponent (Output)
JVOLTY outputs the ratio of current volatility to reference volatility, raised to an adaptive power and clamped:
Additionally, the 128-bar distribution buffer needs to fill before trimmed mean calculations are fully robust. Allow 220 + 128 = 348 bars for maximum accuracy.
### Trimmed Mean Statistics
The trimmed mean (Winsorized estimator) has well-known statistical properties:
- **Breakdown point**: 25% (robust to contamination up to 25% of samples)
- **Efficiency**: ~90% of sample mean under normality
- **Bias**: Negligible for symmetric distributions
For fat-tailed financial returns, trimmed mean significantly outperforms sample mean in terms of mean squared error.
## Performance Profile
### Operation Count (Streaming Mode, Scalar)
Per-bar operations:
| Operation | Count | Cost (cycles) | Subtotal |
| :--- | :---: | :---: | :---: |
| ADD/SUB | 45 | 1 | 45 |
| MUL | 5 | 3 | 15 |
| DIV | 2 | 15 | 30 |
| CMP/ABS | 7 | 1 | 7 |
| SQRT | 2 | 15 | 30 |
| EXP | 2 | 50 | 100 |
| POW | 1 | 80 | 80 |
| SORT (128 elem) | 1 | ~900 | 900 |
| **Total** | **65** | — | **~1,207 cycles** |
The 128-element sort dominates (~75% of total cycles).
### Batch Mode (512 values, SIMD/FMA)
JVOLTY is inherently recursive—each bar depends on previous state. Within-bar vectorization is limited:
1.**Warmup Period Is Long**: JVOLTY requires ~220 bars (for period=14) plus 128 bars to fill the distribution buffer. The `IsHot` property indicates when the indicator has sufficient data, but full distribution stability requires 348+ bars.
2.**Output Range**: JVOLTY returns values ≥1.0. A value of 1.0 means "normal volatility" (current matches historical reference). Values above 1.0 indicate elevated volatility relative to the trimmed mean reference. The maximum is bounded by `logParam` (period-dependent).
3.**Not Traditional Volatility**: JVOLTY is not standard deviation, ATR, or any conventional volatility measure. It's a relative measure: "How does current volatility compare to the robust historical reference?" Direct comparison to other volatility indicators requires normalization.
4.**Computational Cost**: ~1,200 cycles per bar, dominated by the 128-element sort. For high-frequency applications scanning thousands of symbols, consider caching or reduced update frequency.
5.**Memory Footprint**: ~1.5 KB per instance (two ring buffers + state). For 5,000 concurrent instances, budget ~7.5 MB.
6.**Using isNew Incorrectly**: When processing live ticks within the same bar, use `Update(value, isNew: false)`. When a new bar opens, use `isNew: true` (default). Incorrect usage corrupts buffer snapshots and state.
7.**Comparison with JMA**: JVOLTY is a component of JMA, not a replacement. JMA outputs smoothed price; JVOLTY outputs the volatility regime measure that JMA uses internally for adaptation. Use JVOLTY when you need the volatility signal without the price smoothing.
## Use Cases
1.**Volatility Regime Detection**: JVOLTY > 2.0 often indicates a volatility regime shift. Use for strategy switching (trend-following in low volatility, mean-reversion in high volatility).
3.**Stop Loss Adjustment**: ATR-based stops can be scaled by JVOLTY. During elevated volatility (JVOLTY > 1.5), widen stops proportionally.
4.**Filter Adaptation**: Use JVOLTY to adjust other indicator parameters dynamically. Shorter periods during high JVOLTY, longer periods during low JVOLTY.
5.**Regime Change Alerts**: Track JVOLTY crossovers (e.g., crossing above 1.5 or below 1.2) to signal potential market condition changes.
## References
- Jurik Research. (1998-2005). "JMA White Papers." *jurikres.com* (archived).
- Kositsin, Nikolay. (2007). "Digital Indicators for MetaTrader 4." *Alpari Forum Archives*.