[GYTS] Volatility Toolkit Volatility Toolkit
🌸 Part of GoemonYae Trading System (GYTS) 🌸
🌸 --------- INTRODUCTION --------- 🌸
💮 What is Volatility Toolkit?
Volatility Toolkit is a comprehensive volatility analysis indicator featuring academically-grounded range-based estimators. Unlike simplistic measures like ATR, these estimators extract maximum information from OHLC data — resulting in estimates that are 5-14× more statistically efficient than traditional close-to-close methods.
The indicator provides two configurable estimator slots, weighted aggregation, adaptive threshold detection, and regime identification — all with flexible smoothing options via
GYTS FiltersToolkit integration.
💮 Why Use This Indicator?
Standard volatility measures (like simple standard deviation) are highly inefficient, requiring large amounts of data to produce stable estimates. Academic research has shown that range-based estimators extract far more information from the same price data:
• Statistical Efficiency — Yang-Zhang achieves up to 14× the efficiency of close-to-close variance, meaning you can achieve the same estimation accuracy with far fewer bars
• Drift Independence — Rogers-Satchell and Yang-Zhang correctly isolate variance even in strongly trending markets where simpler estimators become biased
• Gap Handling — Yang-Zhang properly accounts for overnight gaps, critical for equity markets
• Regime Detection — Built-in threshold modes identify when volatility enters elevated or suppressed states
↑ Overview showing Yang-Zhang volatility with dynamic threshold bands and regime background colouring
🌸 --------- HOW IT WORKS --------- 🌸
💮 Core Concept
The toolkit groups volatility estimators by their output scale to ensure valid comparisons and aggregations:
• Log-Return Scale (σ) — Close-to-Close, Parkinson, Garman-Klass, Rogers-Satchell, Yang-Zhang. These are comparable and can be aggregated. Annualisable via √(periods_per_year) scaling.
• Price Unit Scale ($) — ATR. Measures volatility in absolute price terms, directly usable for stop-loss placement.
• Percentage Scale (%) — Chaikin Volatility. Measures the rate of change of the trading range — whether volatility is expanding or contracting.
Only estimators with the same scale can be meaningfully compared or aggregated. The indicator enforces this and warns when mixing incompatible scales.
💮 Range-Based Estimator Overview
Range-based estimators utilise High, Low, Open, and Close prices to extract significantly more information about the underlying diffusion process than close-only methods:
• Parkinson (1980) — Uses High-Low range. ~5× more efficient than close-to-close. Assumes zero drift.
• Garman-Klass (1980) — Incorporates Open and Close. ~7.4× more efficient. Assumes zero drift, no gaps.
• Rogers-Satchell (1991) — Drift-independent. Superior in trending markets where Parkinson/GK become biased.
• Yang-Zhang (2000) — Composite estimator handling both drift and overnight gaps. Up to 14× more efficient.
💮 Theoretical Background
• Parkinson, M. (1980). The Extreme Value Method for Estimating the Variance of the Rate of Return. Journal of Business, 53 (1), 61–65. DOI
• Garman, M.B. & Klass, M.J. (1980). On the Estimation of Security Price Volatilities from Historical Data. Journal of Business, 53 (1), 67–78. DOI
• Rogers, L.C.G. & Satchell, S.E. (1991). Estimating Variance from High, Low and Closing Prices. Annals of Applied Probability, 1 (4), 504–512. DOI
• Yang, D. & Zhang, Q. (2000). Drift-Independent Volatility Estimation Based on High, Low, Open, and Close Prices. Journal of Business, 73 (3), 477–491. DOI
🌸 --------- KEY FEATURES --------- 🌸
💮 Feature Reference
Estimators (8 options across 3 scale groups):
• Close-to-Close — Classical benchmark using closing prices only. Least efficient but useful as baseline. Log-return scale.
• Parkinson — Range-based (High-Low), ~5× more efficient than close-to-close. Assumes zero drift. Log-return scale.
• Garman-Klass — OHLC-optimised, ~7.4× more efficient. Assumes zero drift, no gaps. Log-return scale.
• Rogers-Satchell — Drift-independent, handles trending markets where Parkinson/GK become biased. Log-return scale.
• Yang-Zhang — Gap-aware composite, most comprehensive (up to 14× efficient). Uses internal rolling variance (unsmoothed). Log-return scale.
• Std Dev — Standard deviation of log returns. Log-return scale.
• ATR — Average True Range in absolute price units. Useful for stop-loss placement. Price unit scale.
• Chaikin — Rate of change of range. Measures volatility expansion/contraction, not level. Percentage scale.
Smoothing Filters (10 options via FiltersToolkit):
• SMA / EMA — Classical moving averages
• Super Smoother (2-Pole / 3-Pole) — Ehlers IIR filter with excellent noise reduction
• Ultimate Smoother (2-Pole / 3-Pole) — Near-zero lag in passband
• BiQuad — Second-order IIR with configurable Q factor
• ADXvma — Adaptive smoothing, flat during ranging periods
• MAMA — MESA Adaptive Moving Average (cycle-adaptive)
• A2RMA — Adaptive Autonomous Recursive MA
Threshold Modes:
• Static — Fixed threshold values you define (e.g., 0.025 annualised)
• Dynamic — Adaptive bands: baseline ± (standard deviation × multiplier)
• Percentile — Threshold at Nth percentile of recent history (e.g., 80th percentile for high)
Visual Features:
• Level-based colour gradient — Line colour shifts with percentile rank (warm = high vol, cool = low vol)
• Fill to zero — Gradient fill intensity proportional to volatility level
• Threshold fills — Intensity-scaled fills when thresholds are breached
• Regime background — Chart background indicates HIGH/NORMAL/LOW volatility state
• Legend table — Displays estimator names, parameters, current values with percentile ranks (P##)
💮 Dual Estimator Slots
Compare two volatility estimators side-by-side. Each slot independently configures:
• Estimator type (8 options across three scale groups)
• Lookback period and smoothing filter
• Colour palette and visual style
This enables direct comparison between estimators (e.g., Yang-Zhang vs Rogers-Satchell) or between different parameterisations of the same estimator.
↑ Yang-Zhang (reddish) and Rogers-Satchell (greenish)
💮 Flexible Smoothing via FiltersToolkit
All estimators (except Yang-Zhang, which uses internal rolling variance) support configurable smoothing through 10 filter types. Using Infinite Impulse Response (IIR) filters instead of SMA avoids the "drop-off artefact" where volatility readings crash when old spikes exit the window.
Example: Same estimator (Parkinson) with different smoothing filters
Add two instances of Volatility Toolkit to your chart:
• Instance 1: Parkinson with SMA smoothing (lookback 14)
• Instance 2: Parkinson with Super Smoother 2-Pole (lookback 14)
Notice how SMA creates sharp drops when volatile bars exit the window, while Super Smoother maintains a gradual transition.
↑ Two Parkinson estimators — SMA (red mono-colour, showing drop-off artefacts) vs Super Smoother (turquoise mono colour, with smooth transitions)
↑ Garman-Klass with BiQuad (orangy) and 2-pole SuperSmoother filters (greenish)
💮 Weighted Aggregation
Combine multiple estimators into a single weighted average. The indicator automatically:
• Validates scale compatibility (only same-scale estimators can be aggregated)
• Normalises weights (so 2:1 means 67%:33%)
• Displays clear warnings when scales differ
Example: Robust volatility estimate
Combine Yang-Zhang (handles gaps) with Rogers-Satchell (handles drift) using equal weights:
• E1: Yang-Zhang (14)
• E2: Rogers-Satchell (14)
• Aggregation: Enabled, weights 1:1
The aggregated line (with "fill to zero" enabled) provides a more robust estimate by averaging two complementary methodologies.
↑ Yang-Zhang + Rogers-Satchell with aggregation line (thicker) showing combined estimate (notice how opening gaps are handled differently)
Example: Trend-weighted aggregation
In strongly trending markets, weight Rogers-Satchell more heavily since it's drift-independent:
• Estimator 1: Garman-Klass (faster, higher weight in ranging)
• Estimator 2: Rogers-Satchell (drift-independent, higher weight in trends)
• Aggregation: weights 1:2 (favours RS during trends)
💮 Adaptive Threshold Detection
Three threshold modes for identifying volatility regime shifts. Threshold breaches are visualised with intensity-scaled fills that grow stronger the further volatility exceeds the threshold.
Example: Dynamic thresholds for regime detection
Configure dynamic thresholds to automatically adapt to market conditions:
• High Threshold Mode: Dynamic (baseline + 2× std dev)
• Low Threshold Mode: Dynamic (baseline - 2× std dev)
• Show threshold fills: Enabled
This creates adaptive bands that widen during volatile periods and narrow during calm periods.
Example: Percentile-based thresholds
Use percentile mode for context-aware regime detection:
• High Threshold Mode: Percentile (96th)
• Low Threshold Mode: Percentile (4th)
• Percentile Lookback: 500
This identifies when volatility enters the top/bottom 4% of its recent distribution.
↑ Different threshold settings, where the dynamic and percentile methods show adaptive bands that widen during volatile periods, with fill intensity varying by breach magnitude. Regime detection (see next) is enabled too.
💮 Regime Background Colouring
Optional background colouring indicates the current volatility regime:
• High Volatility — Warm/alert background colour
• Normal — No background (neutral)
• Low Volatility — Cool/calm background colour
Select which source (Estimator 1, Estimator 2, or Aggregation) drives the regime display.
Example: Regime filtering for trade decisions
Use regime background to filter trading signals from other indicators:
• Regime Source: Aggregation
• Background Transparency: 90 (subtle)
When the background shows HIGH volatility (warm), consider tighter stops. When LOW (cool), watch for breakout setups.
↑ Regime background emphasis for breakout strategies. Note the interesting A2RMA smoothing for this case.
🌸 --------- USAGE GUIDE --------- 🌸
💮 Getting Started
1. Add the indicator to your chart
2. Estimator 1 defaults to Yang-Zhang (14) — the most comprehensive estimator for gapped markets
3. Keep "Annualise Volatility" enabled to express values in standard annualised form
4. Observe the legend table for current values and percentile ranks (P##). Hover over the table cells to see a little more info in the tooltip.
💮 Choosing an Estimator
• Trending equities with gaps — Yang-Zhang. Handles both drift and overnight gaps optimally.
• Crypto (24/7 trading) — Rogers-Satchell. Drift-independent without Yang-Zhang's multi-period lag.
• Ranging markets — Garman-Klass or Parkinson. Simpler, no drift adjustment needed.
• Price-based stops — ATR. Output in price units, directly usable for stop distances.
• Regime detection — Combine any estimator with threshold modes enabled.
💮 Interpreting Output
• Value (P##) — The volatility reading with percentile rank. "0.1523 (P75)" means 0.1523 annualised volatility at the 75th percentile of recent history.
• Colour gradient — Warmer colours = higher percentile (elevated volatility), cooler colours = lower percentile.
• Threshold fills — Intensity indicates how far beyond the threshold the current reading is.
• ⚠️ HIGH / 🔻 LOW — Table indicators when thresholds are breached.
🌸 --------- ALERTS --------- 🌸
💮 Direction Change Alerts
• Estimator 1/2 direction change — Triggers when volatility inflects (rising to falling or vice versa)
💮 Cross Alerts
• E1 crossed E2 — Triggers when the two estimator lines cross
💮 Threshold Alerts
• E1/E2/Aggr High Volatility — Triggers when volatility breaches the high threshold
• E1/E2/Aggr Low Volatility — Triggers when volatility falls below the low threshold
💮 Regime Change Alerts
• E1/E2/Aggr Regime Change — Triggers when the volatility regime transitions (High ↔ Normal ↔ Low)
🌸 --------- LIMITATIONS --------- 🌸
• Drift bias in Parkinson/GK — These estimators overestimate variance in trending conditions. Switch to Rogers-Satchell or Yang-Zhang for trending markets.
• Yang-Zhang minimum lookback — Requires at least 2 bars (enforced internally). Cannot produce instantaneous readings like other estimators.
• Flat candles — Single-tick bars produce near-zero variance readings. Use higher timeframes for illiquid assets.
• Discretisation bias — Estimates degrade when ticks-per-bar is very small. Consider higher timeframes for thinly traded instruments.
• Scale mixing — Different scale groups (log-return, price unit, percentage) cannot be meaningfully compared or aggregated. The indicator warns but does not prevent display.
🌸 --------- CREDITS --------- 🌸
💮 Academic Sources
• Parkinson, M. (1980). The Extreme Value Method for Estimating the Variance of the Rate of Return. Journal of Business, 53 (1), 61–65. DOI
• Garman, M.B. & Klass, M.J. (1980). On the Estimation of Security Price Volatilities from Historical Data. Journal of Business, 53 (1), 67–78. DOI
• Rogers, L.C.G. & Satchell, S.E. (1991). Estimating Variance from High, Low and Closing Prices. Annals of Applied Probability, 1 (4), 504–512. DOI
• Yang, D. & Zhang, Q. (2000). Drift-Independent Volatility Estimation Based on High, Low, Open, and Close Prices. Journal of Business, 73 (3), 477–491. DOI
• Wilder, J.W. (1978). New Concepts in Technical Trading Systems . Trend Research.
💮 Libraries Used
• VolatilityToolkit Library — Range-based estimators, smoothing, and aggregation functions
• FiltersToolkit Library — Advanced smoothing filters (Super Smoother, Ultimate Smoother, BiQuad, etc.)
• ColourUtilities Library — Colour palette management and gradient calculations
Zhang
[GYTS] VolatilityToolkit LibraryVolatilityToolkit Library
🌸 Part of GoemonYae Trading System (GYTS) 🌸
🌸 --------- INTRODUCTION --------- 🌸
💮 What Does This Library Contain?
VolatilityToolkit provides a comprehensive suite of volatility estimation functions derived from academic research in financial econometrics. Rather than relying on simplistic measures, this library implements range-based estimators that extract maximum information from OHLC data — delivering estimates that are 5–14× more efficient than traditional close-to-close methods.
The library spans the full volatility workflow: estimation, smoothing, and regime detection.
💮 Key Categories
• Range-Based Estimators — Parkinson, Garman-Klass, Rogers-Satchell, Yang-Zhang (academically-grounded variance estimators)
• Classical Measures — Close-to-Close, ATR, Chaikin Volatility (baseline and price-unit measures)
• Smoothing & Post-Processing — Asymmetric EWMA for differential decay rates
• Aggregation & Regime Detection — Multi-horizon blending, MTF aggregation, Volatility Burst Ratio
💮 Originality
To the best of our knowledge, no other TradingView script combines range-based estimators (Parkinson, Garman-Klass, Rogers-Satchell, Yang-Zhang), classical measures, and regime detection tools in a single package. Unlike typical volatility implementations that offer only a single method, this library:
• Implements four academically-grounded range-based estimators with proper mathematical foundations
• Handles drift bias and overnight gaps, issues that plague simpler estimators in trending markets
• Integrates with GYTS FiltersToolkit for advanced smoothing (10 filter types vs. typical SMA-only)
• Provides regime detection tools (Burst Ratio, MTF aggregation) for systematic strategy integration
• Standardises output units for seamless estimator comparison and swapping
🌸 --------- ADDED VALUE --------- 🌸
💮 Academic Rigour
Each estimator implements peer-reviewed methodologies with proper mathematical foundations. The library handles aspects that are easily missed, e.g. drift independence, overnight gap adjustment, and optimal weighting factors. All functions include guards against edge cases (division by zero, negative variance floors, warmup handling).
💮 Statistical Efficiency
Range-based estimators extract more information from the same data. Yang-Zhang achieves up to 14× the efficiency of close-to-close variance, meaning you can achieve the same estimation accuracy with far fewer bars — critical for adapting quickly to changing market conditions.
💮 Flexible Smoothing
All estimators support configurable smoothing via the GYTS FiltersToolkit integration. Choose from 10 filter types to balance responsiveness against noise reduction:
• Ultimate Smoother (2-Pole / 3-Pole) — Near-zero lag; the 3-pole variant is a GYTS design with tunable overshoot
• Super Smoother (2-Pole / 3-Pole) — Excellent noise reduction with minimal lag
• BiQuad — Second-order IIR filter with quality factor control
• ADXvma — Adaptive smoothing based on directional volatility
• MAMA — Cycle-adaptive moving average
• A2RMA — Adaptive autonomous recursive moving average
• SMA / EMA — Classical averages (SMA is default for most estimators)
Using Infinite Impulse Response (IIR) filters (e.g. Super Smoother, Ultimate Smoother) instead of SMA avoids the "drop-off artefact" where volatility readings crash when old spikes exit the window.
💮 Plug-and-Play Integration
Standardised output units (per-bar log-return volatility) make it trivial to swap estimators. The annualize() helper converts to yearly volatility with a single call. All functions work seamlessly with other GYTS components.
🌸 --------- RANGE-BASED ESTIMATORS --------- 🌸
These estimators utilise High, Low, Open, and Close prices to extract significantly more information about the underlying diffusion process than close-only methods.
💮 parkinson()
The Extreme Value Method -- approximately 5× more efficient than close-to-close, requiring about 80% less data for equivalent accuracy. Uses only the High-Low range, making it simple and robust.
• Assumption: Zero drift (random walk). May be biased in strongly trending markets.
• Best for: Quick volatility reads when drift is minimal.
• Parameters: smoothing_length (default 14), filter_type (default SMA), smoothing_factor (default 0.7)
Source: Parkinson, M. (1980). The Extreme Value Method for Estimating the Variance of the Rate of Return. Journal of Business, 53 (1), 61–65. DOI
💮 garman_klass()
Extends Parkinson by incorporating Open and Close prices, achieving approximately 7.4× efficiency over close-to-close. Implements the "practical" analytic estimator (σ̂²₅) which avoids cross-product terms whilst maintaining near-optimal efficiency.
• Assumption: Zero drift, continuous trading (no gaps).
• Best for: Markets with minimal overnight gaps and ranging conditions.
• Parameters: smoothing_length (default 14), filter_type (default SMA), smoothing_factor (default 0.7)
Source: Garman, M.B. & Klass, M.J. (1980). On the Estimation of Security Price Volatilities from Historical Data. Journal of Business, 53 (1), 67–78. DOI
💮 rogers_satchell()
The drift-independent estimator correctly isolates variance even in strongly trending markets where Parkinson and Garman-Klass become significantly biased. Uses the formula: ln(H/C)·ln(H/O) + ln(L/C)·ln(L/O).
• Key advantage: Unbiased regardless of trend direction or magnitude.
• Best for: Trending markets, crypto (24/7 trading with minimal gaps), general-purpose use.
• Parameters: smoothing_length (default 14), filter_type (default SMA), smoothing_factor (default 0.7)
Source: Rogers, L.C.G. & Satchell, S.E. (1991). Estimating Variance from High, Low and Closing Prices. Annals of Applied Probability, 1 (4), 504–512. DOI
💮 yang_zhang()
The minimum-variance composite estimator — both drift-independent AND gap-aware. Combines overnight returns, open-to-close returns, and the Rogers-Satchell component with optimal weighting to minimise estimator variance. Up to 14× more efficient than close-to-close.
• Parameters: lookback (default 14, minimum 2), alpha (default 1.34, optimised for equities).
• Best for: Equity markets with significant overnight gaps, highest-quality volatility estimation.
• Note: Unlike other estimators, Yang-Zhang does not support custom filter types — it uses rolling sample variance internally.
Source: Yang, D. & Zhang, Q. (2000). Drift-Independent Volatility Estimation Based on High, Low, Open, and Close Prices. Journal of Business, 73 (3), 477–491. DOI
🌸 --------- CLASSICAL MEASURES --------- 🌸
💮 close_to_close()
Classical sample variance of logarithmic returns. Provided primarily as a baseline benchmark — it is approximately 5–8× less efficient than range-based estimators, requiring proportionally more data for the same accuracy.
• Parameters: lookback (default 14), filter_type (default SMA), smoothing_factor (default 0.7)
• Use case: Comparison baseline, situations requiring strict methodological consistency with academic literature.
💮 atr()
Average True Range -- measures volatility in price units rather than log-returns. Directly interpretable for stop-loss placement (e.g., "2× ATR trailing stop") and handles gaps naturally via the True Range formula.
• Output: Price units (not comparable across different price levels).
• Parameters: smoothing_length (default 14), filter_type (default SMA), smoothing_factor (default 0.7)
• Best for: Position sizing, trailing stops, any application requiring volatility in currency terms.
Source: Wilder, J.W. (1978). New Concepts in Technical Trading Systems . Trend Research.
💮 chaikin_volatility()
Rate of Change of the smoothed trading range. Unlike level-based measures, Chaikin Volatility shows whether volatility is expanding or contracting relative to recent history.
• Output: Percentage change (oscillates around zero).
• Parameters: length (default 10), roc_length (default 10), filter_type (default EMA), smoothing_factor (default 0.7)
• Interpretation: High values suggest nervous, wide-ranging markets; low values indicate compression.
• Best for: Detecting volatility regime shifts, breakout anticipation.
🌸 --------- SMOOTHING & POST-PROCESSING --------- 🌸
💮 asymmetric_ewma()
Differential smoothing with separate alphas for rising versus falling volatility. Allows volatility to spike quickly (fast reaction to shocks) whilst decaying slowly (stability). Essential for trailing stops that should widen rapidly during turbulence but narrow gradually.
• Parameters: alpha_up (default 0.1), alpha_down (default 0.02).
• Note: Stateful function — call exactly once per bar.
💮 annualize()
Converts per-bar volatility to annualised volatility using the square-root-of-time rule: σ_annual = σ_bar × √(periods_per_year).
• Parameters: vol (series float), periods (default 252 for daily equity bars).
• Common values: 365 (crypto), 52 (weekly), 12 (monthly).
🌸 --------- AGGREGATION & REGIME DETECTION --------- 🌸
💮 weighted_horizon_volatility()
Blends volatility readings across short, medium, and long lookback horizons. Inspired by the Heterogeneous Autoregressive (HAR-RV) model's recognition that market participants operate on different time scales.
• Default horizons: 1-bar (short), 5-bar (medium), 22-bar (long).
• Default weights: 0.5, 0.3, 0.2.
• Note: This is a weighted trailing average, not a forecasting regression. For true HAR-RV forecasting, it would be required to fit regression coefficients.
Inspired by: Corsi, F. (2009). A Simple Approximate Long-Memory Model of Realized Volatility. Journal of Financial Econometrics .
💮 volatility_mtf()
Multi-timeframe aggregation for intraday charts. Combines base volatility with higher-timeframe (Daily, Weekly, Monthly) readings, automatically scaling HTF volatilities down to the current timeframe's magnitude using the square-root-of-time rule.
• Usage: Calculate HTF volatilities via request.security() externally, then pass to this function.
• Behaviour: Returns base volatility unchanged on Daily+ timeframes (MTF aggregation not applicable).
💮 volatility_burst_ratio()
Regime shift detector comparing short-term to long-term volatility.
• Parameters: short_period (default 8), long_period (default 50), filter_type (default Super Smoother 2-Pole), smoothing_factor (default 0.7)
• Interpretation: Ratio > 1.0 indicates expanding volatility; values > 1.5 often precede or accompany explosive breakouts.
• Best for: Filtering entries (e.g., "only enter if volatility is expanding"), dynamic risk adjustment, breakout confirmation.
🌸 --------- PRACTICAL USAGE NOTES --------- 🌸
💮 Choosing an Estimator
• Trending equities with gaps: yang_zhang() — handles both drift and overnight gaps optimally.
• Crypto (24/7 trading): rogers_satchell() — drift-independent without the lag of Yang-Zhang's multi-period window.
• Ranging markets: garman_klass() or parkinson() — simpler, no drift adjustment needed.
• Price-based stops: atr() — output in price units, directly usable for stop distances.
• Regime detection: Combine any estimator with volatility_burst_ratio().
💮 Output Units
All range-based estimators output per-bar volatility in log-return units (standard deviation). To convert to annualised percentage volatility (the convention in options and risk management), use:
vol_annual = annualize(yang_zhang(14), 252) // For daily bars
vol_percent = vol_annual * 100 // Express as percentage
💮 Smoothing Selection
The library integrates with FiltersToolkit for flexible smoothing. General guidance:
• SMA: Classical, statistically valid, but suffers from "drop-off" artefacts when spikes exit the window.
• Super Smoother / Ultimate Smoother / BiQuad: Natural decay, reduced lag — preferred for trading applications.
• MAMA / ADXvma / A2RMA: Adaptive smoothing, sometimes interesting for highly dynamic environments.
💮 Edge Cases and Limitations
• Flat candles: Guards prevent log(0) errors, but single-tick bars produce near-zero variance readings.
• Illiquid assets: Discretisation bias causes underestimation when ticks-per-bar is small. Use higher timeframes for more reliable estimates.
• Yang-Zhang minimum: Requires lookback ≥ 2 (enforced internally). Cannot produce instantaneous readings.
• Drift in Parkinson/GK: These estimators overestimate variance in trending conditions — switch to Rogers-Satchell or Yang-Zhang.
Note: This library is actively maintained. Suggestions for additional estimators or improvements are welcome.
Yang-Zhang Volatility Updated for SDthanks to mpatte15 for writing this originally
code was updated to utilize sqrt on Vyangzhang to plot standard deviation vs variance


