Skip to content

Volatility Toolkit

// Always use British English

🧪 Open Source Tool

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.

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.

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 groupUnitEstimatorsComparable & aggregatable?
Log-return (σ)Standard deviation of log returnsClose-to-Close, Parkinson, Garman-Klass, Rogers-Satchell, Yang-ZhangYes — and annualisable via the √time rule
Price ($)Absolute priceATROnly with other price-unit measures
Percentage (%)Rate of change of rangeChaikin VolatilityNo — 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 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.

EstimatorYearReadsScaleCharacter
Close-to-Close—Closing prices onlyLog-returnClassical benchmark; least efficient. Also selectable as Standard Deviation (the same standard deviation of log returns).
Parkinson1980High–low rangeLog-return~5× efficient. Assumes zero drift; biased in trends.
Garman-Klass1980Open, high, low, closeLog-return~7.4× efficient. Assumes zero drift and no gaps.
Rogers-Satchell1991OHLC with drift independenceLog-returnUnbiased under any drift; ideal for trending or 24/7 markets.
Yang-Zhang2000Overnight gap, open-close, and rangeLog-returnUp to 14× efficient; handles drift and gaps. Uses internal rolling variance.
ATR1978True range, including gapsPrice ($)Wilder’s familiar measure; directly usable for stops.
Chaikin—Rate of change of rangePercentage (%)Expansion/contraction oscillator, not a level.

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.

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.

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).

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.

FunctionPurpose
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

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.

  1. Add the indicator

    Search for “GYTS Volatility Toolkit” in TradingView’s indicator library and add it to any chart.

  2. 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.

  3. 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.

  4. 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.

  5. Turn on regime detection

    Enable thresholds (dynamic or percentile) and the regime background to let the toolkit flag elevated and suppressed states automatically.

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:

SourceReference
WilderJ. Welles Wilder Jr., New Concepts in Technical Trading Systems, 1978
ParkinsonM. Parkinson, “The Extreme Value Method for Estimating the Variance of the Rate of Return”, 1980, Journal of Business — DOI
Garman-KlassM. B. Garman and M. J. Klass, “On the Estimation of Security Price Volatilities from Historical Data”, 1980, Journal of Business — DOI
Rogers-SatchellL. C. G. Rogers and S. E. Satchell, “Estimating Variance from High, Low and Closing Prices”, 1991, Annals of Applied Probability — DOI
Yang-ZhangD. Yang and Q. Zhang, “Drift-Independent Volatility Estimation Based on High, Low, Open, and Close Prices”, 2000, Journal of Business — DOI
CorsiF. Corsi, “A Simple Approximate Long-Memory Model of Realized Volatility”, 2009, Journal of Financial Econometrics

Join Our Trading Community

Connect with fellow traders, share insights, and learn together.

Join Discord