Reader question: If daily close-to-close returns use only one price from each day, can an algorithm estimate realised volatility more efficiently by using the open, high, low and close while still handling overnight gaps and non-zero drift?
The Yang–Zhang estimator was designed for that problem. It combines overnight return variance, open-to-close variance and a Rogers–Satchell range component into one estimator intended to be drift-independent and consistent with opening jumps under its model assumptions.
This article owns the daily-OHLC realised-variance estimation problem: adjusted open/high/low/close prices across multiple sessions → overnight variance + intraday variance + range information → Yang–Zhang variance, rolling volatility estimates, benchmark comparisons and data-quality diagnostics.
It does not own stochastic-volatility forecasting, option valuation or a recommendation about whether volatility will rise or fall. It estimates historical variation from a defined price window.
This is public mathematical and computational education, not investment advice.
1. Close-to-close volatility throws information away
The familiar sample variance of daily close-to-close log returns uses one net price movement per session.
That means a day that opens at 100, rises to 110, falls to 94 and closes back at 100 can contribute almost nothing to the close-to-close return even though the price moved substantially during the session.
High and low prices contain path information. The opening price also carries information about what happened between the previous close and the new session.
2. Define the OHLC inputs
For trading session t, let:
- Ot = opening price;
- Ht = session high;
- Lt = session low;
- Ct = closing price;
- Ct−1 = previous close.
Prices must be positive for the log-return formulas below.
3. Separate overnight and intraday movement
Define the overnight log return:
ot = ln(Ot/Ct−1).
Define the open-to-close log return:
ct = ln(Ct/Ot).
This decomposition matters because information can arrive while the market is closed. A close-to-open gap is economically different from a continuous intraday path.
4. The Rogers–Satchell range component
Define:
ut = ln(Ht/Ot)
and:
dt = ln(Lt/Ot).
The Rogers–Satchell daily variance contribution can be written as:
RSt = ut(ut − ct) + dt(dt − ct).
Equivalently, it uses high-to-close and low-to-close log terms multiplied by high-to-open and low-to-open terms.
The attraction of the Rogers–Satchell construction is that it is designed to remain valid under non-zero drift in the continuous diffusion setting.
5. Sample overnight and open-to-close variances
Across a window of n sessions, calculate the sample variance of overnight returns:
σ²o = (1/(n−1)) Σ(ot − ō)².
Likewise for open-to-close returns:
σ²c = (1/(n−1)) Σ(ct − c̄)².
Then average the Rogers–Satchell contributions:
σ²RS = (1/n) Σ RSt.
6. The Yang–Zhang combination
A common finite-sample form is:
σ²YZ = σ²o + kσ²c + (1−k)σ²RS,
with:
k = 0.34 / [1.34 + (n+1)/(n−1)].
The final volatility estimate is:
σYZ = √σ²YZ.
If an annualised figure is required, the annualisation convention must be stated explicitly rather than assumed.
7. Why the three components are there
- σ²o captures close-to-open gaps.
- σ²c captures variation in open-to-close returns.
- σ²RS extracts intraday range information while allowing for drift.
The weighting constant balances estimation variance across the components.
8. Drift independence is not trend prediction
“Drift-independent” does not mean the estimator predicts trends or ignores all market structure.
It means that, under the continuous-time model used in the derivation, the estimator is designed so that a non-zero expected return does not create the same bias problem that affects some simpler range estimators.
This is a statistical property under assumptions, not a claim that real prices perfectly follow geometric Brownian motion.
9. Opening jumps are treated explicitly
Parkinson-style high-low estimators use the intraday range and therefore omit close-to-open jumps.
The Yang–Zhang estimator adds a separate overnight term, making a clean distinction between:
- closed-market jump risk;
- open-market intraday variation.
This is especially useful when overnight information arrival is material.
10. A conceptual example
Imagine two weeks with the same close-to-close returns.
Week A: prices move smoothly, with small intraday ranges and small opening gaps.
Week B: prices gap sharply at the open and reverse during the session, often finishing near the prior close.
A close-to-close estimator can make the two weeks look similar. Yang–Zhang should generally distinguish them because Week B contributes more through the overnight and range terms.
11. Inputs and outputs
Inputs can include:
- clean daily OHLC prices;
- previous close;
- rolling-window length;
- corporate-action adjustment method;
- session calendar;
- annualisation convention if used;
- missing-session rule.
Outputs can include:
- overnight variance;
- open-to-close variance;
- Rogers–Satchell variance;
- Yang–Zhang variance;
- Yang–Zhang volatility;
- rolling time series;
- benchmark differences versus other estimators.
12. Corporate actions can destroy the estimate
A stock split can create an apparent overnight collapse or surge if the previous close and new open are not on the same adjusted basis.
Dividends and other corporate actions can also create discontinuities depending on the dataset.
Hard diagnostic: before computing any log ratio, verify that adjacent prices use a consistent adjustment convention.
13. Bad highs and lows are unusually damaging
A single erroneous high or low enters the range term logarithmically and can dominate a short rolling window.
Useful checks include:
- H ≥ max(O,C);
- L ≤ min(O,C);
- H ≥ L;
- all prices > 0;
- range not implausibly large relative to nearby sessions;
- duplicate bars removed;
- known bad ticks quarantined.
When a range-based estimator spikes, first ask whether the market moved or the data broke.
14. Opening-price quality matters too
The official opening print may be produced by an auction, a first eligible trade or a vendor convention. Different markets can define “open” differently.
If an opening price is stale or unrepresentative, both the overnight and intraday components are affected.
Weak link: an estimator built to use more information also has more fields that can be wrong.
15. Illiquid assets create zero-range and stale-price problems
For a thinly traded instrument, O = H = L = C can mean genuinely no movement or simply no informative trading.
A sequence of zero ranges can therefore understate latent volatility.
Falsifier: compare with quote-based or longer-horizon measures. If quoted uncertainty and event risk are high while OHLC bars are repeatedly stale, do not interpret low Yang–Zhang volatility as low economic risk.
16. Twenty-four-hour markets change the meaning of “overnight”
In FX or continuously traded digital markets, a vendor may still create daily OHLC bars using an arbitrary cutoff.
The “overnight” return then represents movement across a reporting boundary rather than a genuine market closure.
The formula can still be computed, but the economic interpretation changes.
Boundary: session definitions belong in the model contract.
17. Window length controls the bias–variance trade-off
A short window responds quickly but is noisy. A long window is stable but can average together different volatility regimes.
Useful practice is to compare several windows and ask whether the qualitative story is stable.
Do not choose the window retrospectively just because it produces the most dramatic chart.
18. Range estimators are historical estimators, not full volatility models
Yang–Zhang estimates variance from observed price bars. It does not directly specify a conditional volatility recursion such as GARCH, a stochastic-volatility state equation, or an option-implied volatility surface.
This distinguishes estimation from forecasting and derivative pricing.
For example, the DCC-GARCH article models evolving conditional variances and correlations, a different job.
19. Compare against simpler estimators
A robust implementation should calculate several estimates from the same cleaned data:
- close-to-close;
- Parkinson high-low;
- Garman–Klass OHLC;
- Rogers–Satchell;
- Yang–Zhang.
Disagreement is diagnostic information.
If Yang–Zhang is much higher than intraday-only estimators, overnight gaps may be driving the result. If all range estimators spike together, inspect the session ranges and data quality.
20. Evidence polarity
Evidence for confidence includes clean adjusted OHLC data, stable session definitions, agreement with independent realised-volatility measures over longer windows, plausible decomposition between overnight and intraday components, and robustness to nearby window lengths.
Evidence against confidence includes unexplained bad ticks, inconsistent corporate-action adjustments, vendor-dependent opening definitions, stale zero-range bars, extreme sensitivity to one day, unexplained divergence from higher-frequency realised variance, or arbitrary annualisation.
21. Counterexample: one split creates a fake volatility explosion
Yesterday’s close is 100. A 2-for-1 split occurs. Today’s unadjusted open is 50.
The overnight log return appears to be ln(0.5), a huge negative move, even though shareholder economic value did not collapse by 50%.
Falsifier: recompute on consistently adjusted data. If the spike disappears, the original estimate measured a data convention rather than market volatility.
22. Counterexample: close-to-close looks calm while the range is violent
An asset closes at 100 every day but repeatedly trades between 90 and 110 intraday.
Close-to-close variance approaches zero while range-based estimators remain large.
This is not a contradiction. The estimators use different information sets.
23. Counterexample: the range is large because of one erroneous high
Suppose H is accidentally recorded as 1,000 instead of 100.
A range estimator can surge dramatically while close-to-close remains normal.
Falsifier: cross-check the high against transaction or quote records and neighbouring vendors.
24. Diagnostics checklist
- Verify positive prices.
- Check H/L/O/C ordering constraints.
- Reconcile corporate-action adjustments.
- Verify previous-close continuity.
- Confirm session calendar and opening convention.
- Compute overnight returns separately.
- Compute Rogers–Satchell terms separately.
- Inspect component contribution by day.
- Compare several window lengths.
- Compare with close-to-close.
- Compare with Parkinson and Garman–Klass.
- Where available, compare with high-frequency realised variance.
- Investigate every extreme range before trusting it.
25. Alternatives and complements
Close-to-close variance is simple and robust to high/low data errors but uses less intraday information.
Parkinson uses high-low ranges efficiently under restrictive assumptions but omits opening jumps and is sensitive to drift assumptions.
Garman–Klass uses OHLC information but relies on assumptions about drift and opening behaviour.
Rogers–Satchell handles non-zero drift intraday but does not by itself add overnight jump variance.
High-frequency realised variance can use much richer intraday data but introduces microstructure-noise and sampling problems.
GARCH-family models estimate conditional variance dynamics for forecasting rather than only historical realised variance.
26. What would falsify confidence?
Confidence should be withdrawn if OHLC data cannot be validated; if adjusted and unadjusted prices are mixed; if opening times are inconsistent; if a few bad range observations dominate the window; if the instrument is too stale for daily ranges to be informative; or if an independent realised-volatility benchmark persistently contradicts the estimator for explainable data reasons.
27. Verification and update triggers
Preserve raw OHLC bars, adjustment factors, session calendar, vendor definitions, cleaning rules, rolling-window length, k formula, component variances and annualisation convention.
Revisit the implementation after exchange-hours changes, auction redesign, vendor feed changes, corporate-action methodology changes, instrument migration to near-continuous trading, or persistent divergence from trusted higher-frequency benchmarks.
28. Connections to the surrounding knowledge estate
The filtered historical simulation article shows how historical returns can be volatility-filtered before tail-risk simulation.
The DCC-GARCH article moves from historical variation into conditional variance and correlation dynamics.
The lane is indexed at Finance & Banking Algorithms | Applied Mathematics in Real Financial Systems.
29. Primary and high-quality references
- Dennis Yang and Qiang Zhang, Drift-Independent Volatility Estimation Based on High, Low, Open, and Close Prices, Journal of Business, 2000.
- Michael Parkinson, The Extreme Value Method for Estimating the Variance of the Rate of Return, Journal of Business, 1980.
- Mark B. Garman and Michael J. Klass, On the Estimation of Security Price Volatilities from Historical Data, Journal of Business, 1980.
- Rogers, Satchell and Yoon, Estimating the volatility of stock prices: a comparison of methods that use high and low prices, Applied Financial Economics.
Educational boundary: Historical volatility is a measurement of past price variation under a chosen estimator. It is not a forecast, a valuation, or a recommendation to buy, sell or hedge an asset.
