Volatility Toolkit
// Always use British English
The Information Hidden in Range
Section titled “The Information Hidden in Range”Most volatility measures look only at closing prices and quietly discard the rest of what each bar already revealed — its high, its low, its open. The Volatility Toolkit is built around a better idea: range-based estimators that read the whole candle. By using all four OHLC prices, these methods extract several times more information from the same data than a close-to-close calculation, producing stable estimates from far fewer bars.
Why Range Beats the Close
Section titled “Why Range Beats the Close”A classical close-to-close estimate treats every bar as a single number and throws away the path the price actually travelled to get there. Academic research since 1980 has repeatedly shown that the intrabar range carries most of the information about the underlying diffusion — so estimators that read the high, low, and open are dramatically more efficient.
Statistical efficiency here has a precise meaning:
- Parkinson (1980) is roughly 5× as efficient as close-to-close — the same accuracy from about 80% less data.
- Garman-Klass (1980) reaches about 7.4× by adding the open and close.
- Yang-Zhang (2000) achieves up to 14× while also handling drift and overnight gaps.
Three Scales, One Rule
Section titled “Three Scales, One Rule”Volatility can be expressed in different units, and mixing them silently produces nonsense. The toolkit groups every estimator by its output scale and enforces the rule that only same-scale estimators may be compared or aggregated — warning you whenever a configuration would mix them.
| Scale group | Unit | Estimators | Comparable & aggregatable? |
|---|---|---|---|
| Log-return (σ) | Standard deviation of log returns | Close-to-Close, Parkinson, Garman-Klass, Rogers-Satchell, Yang-Zhang | Yes — and annualisable via the √time rule |
| Price ($) | Absolute price | ATR | Only with other price-unit measures |
| Percentage (%) | Rate of change of range | Chaikin Volatility | No — a different quantity entirely |
Because the log-return estimators share a scale, you can swap one for another, average two together, or annualise any of them with a single call. ATR stays in price units so it remains directly usable for stop distances; Chaikin measures whether the range is expanding or contracting, not its level.
The Estimators
Section titled “The Estimators”The indicator exposes eight estimator options. The four range-based methods are the reason the toolkit exists; the classical measures are provided as baselines and for stop-placement work.
| Estimator | Year | Reads | Scale | Character |
|---|---|---|---|---|
| Close-to-Close | — | Closing prices only | Log-return | Classical benchmark; least efficient. Also selectable as Standard Deviation (the same standard deviation of log returns). |
| Parkinson | 1980 | High–low range | Log-return | ~5× efficient. Assumes zero drift; biased in trends. |
| Garman-Klass | 1980 | Open, high, low, close | Log-return | ~7.4× efficient. Assumes zero drift and no gaps. |
| Rogers-Satchell | 1991 | OHLC with drift independence | Log-return | Unbiased under any drift; ideal for trending or 24/7 markets. |
| Yang-Zhang | 2000 | Overnight gap, open-close, and range | Log-return | Up to 14× efficient; handles drift and gaps. Uses internal rolling variance. |
| ATR | 1978 | True range, including gaps | Price ($) | Wilder’s familiar measure; directly usable for stops. |
| Chaikin | — | Rate of change of range | Percentage (%) | Expansion/contraction oscillator, not a level. |
Smoothing Without the Drop-Off
Section titled “Smoothing Without the Drop-Off”Every estimator (except Yang-Zhang, which carries its own rolling variance) can be smoothed through ten filter types drawn from the FiltersToolkit Library: Ultimate Smoother (2/3-pole), Super Smoother (2/3-pole), BiQuad, ADXvma, MAMA, A2RMA, SMA, and EMA.
The choice matters more than it first appears. A simple moving average produces a drop-off artefact: when a volatile bar finally exits the averaging window, the reading crashes downward for no reason in the current market. Infinite Impulse Response filters such as the Ultimate Smoother and Super Smoother let old shocks decay gracefully instead, giving a volatility line you can actually reason about.
Beyond a Single Line
Section titled “Beyond a Single Line”The indicator is a full analysis surface, not just one plotted estimator.
Run two estimators side by side, each with its own type, lookback, smoothing filter, and palette. Compare Yang-Zhang against Rogers-Satchell, or the same estimator under two different smoothers, directly on one chart.
Blend the two estimators into a single line with custom weights. The indicator normalises the weights automatically (so 2:1 becomes 67%:33%) and validates that both share a scale group, warning you if they do not.
Detect regime shifts with three threshold modes: static (fixed values you set), dynamic (a baseline ± a standard-deviation multiplier), or percentile (the Nth percentile of recent history). Breaches are drawn with intensity-scaled fills that deepen the further volatility travels past the threshold.
An optional background tint marks HIGH, NORMAL, or LOW volatility — driven by Estimator 1, Estimator 2, or the aggregation. A legend table reports each estimator’s current value with its percentile rank (P##) for quick regime assessment.
Alerts cover the full workflow: estimator direction changes, an Estimator-1/Estimator-2 cross, high/low threshold breaches, and regime transitions — each available for both estimators and the aggregated line.
An Annualise Volatility toggle (on by default) expresses the log-return estimators in the familiar yearly convention, using a configurable periods-per-year value (252 for daily equities, 365 for crypto, and so on).
The Library, for Builders
Section titled “The Library, for Builders”If you are writing your own Pine scripts, the VolatilityToolkit Library exposes the whole workflow as reusable functions with standardised, per-bar log-return output — so swapping one estimator for another is a one-line change.
| Function | Purpose |
|---|---|
parkinson(), garman_klass(), rogers_satchell(), yang_zhang() | Range-based estimators (log-return units) |
close_to_close() | Classical baseline (standard deviation of log returns) |
atr() | Average True Range in price units, for stops and sizing |
chaikin_volatility() | Range expansion/contraction oscillator |
annualize() | Per-bar → yearly volatility via the √time rule |
asymmetric_ewma() | Fast-up, slow-down smoothing — volatility spikes quickly, decays gently |
weighted_horizon_volatility() | HAR-inspired blend across short, medium, and long horizons |
volatility_mtf() | Multi-timeframe aggregation, scaling higher timeframes to the chart |
volatility_burst_ratio() | Short-vs-long ratio for regime-shift and breakout detection |
Where It Fits in the Suite
Section titled “Where It Fits in the Suite”The Volatility Toolkit is the shared measurement layer beneath our risk tooling. The Kinetic Trend Envelope draws five of these estimators — ATR, Parkinson, Garman-Klass, Rogers-Satchell, and Yang-Zhang — to size its asymmetric trailing-stop bands, calibrating them onto a comparable log-return basis so a single volatility factor behaves consistently whichever estimator you select. Reading this page explains where those five come from and how the remaining measures extend the same foundation.
Getting Started
Section titled “Getting Started”-
Add the indicator
Search for “GYTS Volatility Toolkit” in TradingView’s indicator library and add it to any chart.
-
Start with Yang-Zhang
Estimator 1 defaults to Yang-Zhang (lookback 14) — the most comprehensive estimator for gapped markets. Keep Annualise Volatility enabled to read values in the standard yearly form.
-
Read the legend table
Watch the current value and its percentile rank (P##). A reading such as “0.1523 (P75)” means 0.1523 annualised volatility, sitting at the 75th percentile of recent history.
-
Add a second view
Enable Estimator 2 with a contrasting method — Rogers-Satchell is a natural counterpart — to see how different assumptions read the same market.
-
Turn on regime detection
Enable thresholds (dynamic or percentile) and the regime background to let the toolkit flag elevated and suppressed states automatically.
Open Source Commitment
Section titled “Open Source Commitment”By publishing both the indicator and its library, we invite you to study the implementations, verify the mathematics against the original papers, and build derivative work of your own.
Source Code:
- Volatility Toolkit Indicator — the full interactive implementation
- VolatilityToolkit Library — reusable estimator, smoothing, and aggregation functions
- FiltersToolkit Library — the smoothing filters this toolkit builds upon
References
Section titled “References”| Source | Reference |
|---|---|
| Wilder | J. Welles Wilder Jr., New Concepts in Technical Trading Systems, 1978 |
| Parkinson | M. Parkinson, “The Extreme Value Method for Estimating the Variance of the Rate of Return”, 1980, Journal of Business — DOI |
| Garman-Klass | M. B. Garman and M. J. Klass, “On the Estimation of Security Price Volatilities from Historical Data”, 1980, Journal of Business — DOI |
| Rogers-Satchell | L. C. G. Rogers and S. E. Satchell, “Estimating Variance from High, Low and Closing Prices”, 1991, Annals of Applied Probability — DOI |
| Yang-Zhang | D. Yang and Q. Zhang, “Drift-Independent Volatility Estimation Based on High, Low, Open, and Close Prices”, 2000, Journal of Business — DOI |
| Corsi | F. Corsi, “A Simple Approximate Long-Memory Model of Realized Volatility”, 2009, Journal of Financial Econometrics |
Next Steps
Section titled “Next Steps”- Explore the Filters Toolkit that supplies the smoothing options
- See how the Kinetic Trend Envelope turns these estimators into a trailing stop
- Study the Ultimate Smoother behind the drop-off-free smoothing
- Join our Discord to compare estimator behaviour across markets