Files
QuanTAlib/lib/channels/jbands/jbands.md
T
Miha Kralj d493bfd42f Refactor documentation for various filters and indicators to enhance clarity and consistency
- Updated Bessel, Bilateral, Blma, Butter, Conv, Ema, Kama, LSMA, MAMA, MGDI, SSF, USF, ATR, ADL, and ADOSC documentation to use bullet points for key concepts and features.
- Added a new Qodana configuration file for code analysis.
- Removed coverage configuration from Quantower.Tests.csproj to streamline testing setup.
2025-12-31 23:39:47 -08:00

6.8 KiB

JBANDS: Jurik Volatility Bands

Overview and Purpose

Jurik Volatility Bands (JBANDS) are adaptive price channels that apply Mark Jurik's proprietary smoothing techniques to create volatility-responsive price envelopes. Unlike traditional price channels with fixed or simple volatility-based widths, JBANDS utilize specialized adaptive filters that dynamically respond to changing market conditions. These bands automatically expand during volatile periods and contract during calm markets, creating a self-adjusting framework that adapts to each security's specific volatility characteristics without requiring parameter adjustments.

The implementation provided uses sophisticated calculation methods that avoid excessive lag while filtering market noise effectively. By employing non-linear volatility normalization and dynamic smoothing coefficients, JBANDS create a responsive but stable channel that can identify potential support and resistance levels, overbought/oversold conditions, and trend strength across various market environments and timeframes.

Core Concepts

  • Adaptive envelope technology: Bands automatically adjust their width based on dynamic volatility measurements specific to each security
  • Non-linear volatility normalization: Applies advanced scaling to volatility measurements to prevent overreaction to extreme price movements
  • Noise-filtering methodology: Proprietary smoothing techniques reduce market noise while maintaining responsiveness to genuine price movements
  • Zero-lag band adjustment: Unique mathematical approach that minimizes the lag typically associated with adaptive bands

JBANDS stand apart from other channel indicators by their implementation of Jurik's specialized smoothing techniques. Instead of using fixed multipliers or linear scaling, they employ sophisticated mathematical transformations that create bands with exceptional noise rejection properties while maintaining responsiveness to significant market moves. This approach results in channels that are less prone to whipsaws during consolidation yet quickly adapt to changing market conditions.

Common Settings and Parameters

Parameter Default Function When to Adjust
Period 10 Controls the lookback and smoothing intensity Lower (5-8) for more responsiveness; higher (15-30) for more stability
Source Close Price data used as a reference for calculations Rarely needs adjustment for most applications

Pro Tip: JBANDS work exceptionally well as a trailing stop mechanism. During uptrends, use the lower band as a dynamic stop level that adapts to market volatility; during downtrends, use the upper band. This approach helps avoid premature exits due to normal price fluctuations while protecting profits when genuine reversals occur.

Calculation and Mathematical Foundation

Simplified explanation: JBANDS generate upper and lower bands by tracking the midpoint of the high-low range and creating adaptive envelope boundaries. The band width is dynamically adjusted based on relative volatility measurements that are normalized against recent average volatility, creating channels that are proportional to each security's specific trading characteristics.

Technical formula:

  1. Calculate volatility parameters from the period:

    • LEN₁ = max(log₂(√(0.5*(period-1))) + 2.0, 0)
    • POW₁ = max(LEN₁ - 2.0, 0.5)
    • LEN₂ = √(0.5*(period-1)) * LEN₁
  2. For each bar, calculate adaptive adjustment coefficient:

    • Measure deviations (del₁, del₂) between price midpoint and current bands
    • Calculate instantaneous volatility: volty = max(|del₁|, |del₂|)
    • Normalize against average volatility: rvolty = volty / avgVolty
    • Apply adaptive coefficient: Kv = (LEN₂/(LEN₂+1))^(√(rvolty^POW₁))
  3. Adjust bands:

    • upperBand = del₁ > 0 ? high : high - Kv * del₁
    • lowerBand = del₂ < 0 ? low : low - Kv * del₂

🔍 Technical Note: The implementation uses a specialized volatility averaging mechanism that applies non-linear transformations to price deviations. This approach prevents the excessive lag found in traditional moving averages while filtering out market noise effectively. The band adjustment coefficient (Kv) dynamically varies between near-zero (maximum adjustment) and one (minimum adjustment) based on the relative volatility, creating bands that are both stable and responsive.

Interpretation Details

JBANDS provide several analytical perspectives:

  • Price containment: In normal market conditions, price tends to oscillate between the bands, with breakouts indicating unusual strength or weakness
  • Band width assessment: Widening bands indicate increasing volatility, while narrowing bands suggest decreasing volatility and potential energy build-up
  • Support and resistance levels: The bands often function as dynamic support (lower band) and resistance (upper band) levels
  • Trend strength analysis: In strong trends, price will consistently touch or slightly penetrate the band in the direction of the trend
  • Overbought/oversold identification: Price reaching or exceeding the bands may indicate overbought or oversold conditions, especially when accompanied by momentum divergences
  • Volatility squeeze detection: When bands contract significantly, it often precedes a substantial price move (though not necessarily indicating the direction)
  • Range-bound confirmations: Price oscillating between bands without breaking out suggests a trading range environment

Limitations and Considerations

  • Proprietary algorithm opacity: Like most Jurik indicators, the exact mathematical foundations are not fully disclosed
  • Parameter sensitivity: Performance can vary based on period settings, though less dramatically than with many other indicators
  • Complementary tool status: Works best when combined with trend identification indicators rather than used in isolation
  • Extreme volatility handling: May lag in adjusting to sudden, extreme volatility events
  • Data quality dependency: Performs best with reliable price data; illiquid securities with wide spreads may create distorted signals
  • Timeframe considerations: While effective across timeframes, interpretation of signals may vary; what constitutes a significant band penetration differs between short and long timeframes
  • Warm-up period: Requires sufficient price history to establish reliable bands; early calculations may be less accurate

References

  • Jurik, M. "JMA and JMA-Based Indicators." Jurik Research, 1998.
  • Harris, L. Trading and Exchanges. Oxford University Press, 2003.
  • Ehlers, J. F. "Jurik Filters." In Cybernetic Analysis for Stocks and Futures. Wiley, 2004.
  • Kaufman, P. J. "Adaptive Moving Averages and Channels." In Trading Systems and Methods. Wiley, 2013.