On this page
Yang-Zhang Volatility: Drift and Gap Aware Variance
The Yang-Zhang volatility estimator combines overnight return variance, opening drift, and the intraday Rogers-Satchell range into a single number. Published by Dennis Yang and Qiang Zhang in 2000, it is the most efficient OHLC volatility estimator that remains unbiased under non-zero drift and overnight price jumps.
Key Takeaways
- Yang-Zhang volatility is the weighted sum of overnight variance, open-to-close variance, and Rogers-Satchell intraday variance.
- It is roughly eight times more efficient than close-to-close vol while still handling drift and overnight gaps.
- A tunable weight k controls how much overnight variance contributes; the original paper minimises total variance to set k.
- Use it on gappy equities, futures rolls, and crypto sessions where simpler range estimators miss the overnight piece.
Key Takeaways
- Yang-Zhang volatility is the weighted sum of overnight variance, open-to-close variance, and Rogers-Satchell intraday variance.
- It is roughly eight times more efficient than close-to-close vol while still handling drift and overnight gaps.
- A tunable weight k controls how much overnight variance contributes; the original paper minimises total variance to set k.
- Use it on gappy equities, futures rolls, and crypto sessions where simpler range estimators miss the overnight piece.
What It Is
Yang-Zhang volatility is a multi-period OHLC variance estimator. It does not look at a single bar in isolation. It looks at how each bar opens relative to the previous close, how it travels from open to close, and how wide its intraday range is, then combines all three pieces.
The output is a daily variance number that you average over a window of N bars and annualise. It is intended to be the default when you care about accuracy under realistic market conditions rather than under the textbook diffusion model.
The Intuition
Three earlier estimators each fix one flaw and create another. Close-to-close is robust but uses very little information per bar. Parkinson and Garman-Klass are efficient but assume zero drift and no gaps. Rogers-Satchell handles drift but throws away the overnight return.
Yang and Zhang proved that no single-bar estimator can be unbiased under both drift and gaps at the same time. Their fix is to split a day into three pieces, estimate variance for each, and then mix them with a weight chosen to minimise the variance of the final estimate.
How It Works
The Yang-Zhang estimator over a window of N days is:
sigma^2_YZ = sigma^2_overnight + k * sigma^2_open_to_close + (1 - k) * sigma^2_RS
Where:
- sigma^2_overnight is the sample variance of the overnight log returns, ln(O_t / C_t-1).
- sigma^2_open_to_close is the sample variance of the intraday log returns, ln(C_t / O_t).
- sigma^2_RS is the average Rogers-Satchell daily variance over the window.
The weight k from the original paper is:
k = 0.34 / (1.34 + (N + 1) / (N - 1))
This particular k minimises the total variance of the estimator. For a 20-day window, k is roughly 0.16, so most of the weight goes to the Rogers-Satchell intraday piece, but the overnight and open-to-close pieces are not zero.
Annualise by multiplying the square-root output by sqrt(252) for daily US equity bars.
Worked Example
Take a five-bar window with the following log returns and daily Rogers-Satchell variances:
Day C_prev O H L C
1 100 101 103 100 102
2 102 101 104 101 103
3 103 104 106 103 105
4 105 106 107 104 104
5 104 103 105 102 103
Overnight returns ln(O/C_prev): +0.0100, -0.0098, +0.0096, +0.0095, -0.0096. Open-close returns ln(C/O): +0.0099, +0.0197, +0.0096, -0.0188, +0.0000.
Sample variances of those two series (using N-1 = 4 in the denominator) come out near 0.000093 and 0.000241. Suppose the average Rogers-Satchell daily variance over the same five bars is 0.000220.
With N = 5, k = 0.34 / (1.34 + 6/4) = 0.34 / 2.84 = 0.120.
sigma^2_YZ = 0.000093 + 0.120 * 0.000241 + 0.880 * 0.000220
= 0.000093 + 0.0000289 + 0.000194
= 0.000316
Daily standard deviation is sqrt(0.000316) = 1.78%. Annualised, 1.78 * sqrt(252) = 28.2%.
Common Mistakes
-
Choosing k by feel. The closed-form k minimises the variance of the estimator under the original assumptions. Hand-picked weights usually make the result worse, not better.
-
Mixing in stale or holiday bars. A holiday inserts a long calendar gap into the overnight series and breaks the variance estimate. Skip or pre-filter non-trading bars.
-
Using it on already-aggregated data. Yang-Zhang needs the actual OHLC sequence with proper opens and closes. Resampled or synthetic bars often carry the wrong open and produce nonsense overnight returns.
-
Forgetting unit consistency. All three components must be daily variances before you combine them. Mixing daily and intraday windows is a common silent bug.
-
Treating it as a regime indicator without smoothing. A single Yang-Zhang reading still moves around with sampling noise. Use a rolling window of at least 20 bars and treat the line as a slow estimate, not a tick-by-tick signal.
Frequently Asked Questions
What is Yang-Zhang volatility in simple terms? Yang-Zhang volatility adds up overnight variance, open-to-close variance, and intraday range variance to estimate how much an asset moved. It is built to work even when prices trend and gap.
How does Yang-Zhang volatility affect investment decisions? A tighter volatility estimate lets you size positions, set stops, and price options more accurately. Yang-Zhang is the default choice in many risk systems precisely because it is robust to trend and gap.
What is a real-world example of Yang-Zhang volatility? Crypto markets trade 24/7, but exchange "sessions" still have gaps and trends. Yang-Zhang is widely used to measure daily Bitcoin vol because Parkinson and Garman-Klass would understate it.
How can investors use Yang-Zhang effectively? Compute it on a rolling 20 to 60 bar window, annualise, and overlay on price as a regime line. Combine it with realised vs implied volatility comparisons for option strategy decisions.
How is Yang-Zhang different from Rogers-Satchell? Rogers-Satchell measures only intraday variance and ignores overnight moves. Yang-Zhang wraps Rogers-Satchell inside a larger formula that also captures gap risk and is therefore preferred on gappy assets.
Sources
- Yang, D. and Zhang, Q. (2000). "Drift-Independent Volatility Estimation Based on High, Low, Open, and Close Prices." Journal of Business, 73(3), 477-491. https://www.jstor.org/stable/10.1086/209650
- Portfolio Optimizer. "Range-Based Volatility Estimators: Overview and Examples of Usage." https://portfoliooptimizer.io/blog/range-based-volatility-estimators-overview-and-examples-of-usage/
- ScienceDirect. "Yang & Zhang's realized volatility: Automated estimation in Python." https://www.sciencedirect.com/science/article/pii/S2665963824000010
- Quantreo. "Volatility Estimators." https://docs.quantreo.com/features-engineering/volatility/
Disclaimer
This article is educational content only and is not financial advice. Nothing here is a recommendation to buy, sell, or hold any security. Consult a licensed advisor before making investment decisions.