A closing price compresses an entire trading session into one observation. That is convenient for return accounting, but it can hide substantial intraday movement. A volatility process built only on closing returns may consequently answer a different question from the one an options trader, intraday risk manager or overnight position holder needs answered.

Supporting datasets

  • synthetic-ohlc-series.json

This reference report joins the volatility-toolkit readings and exercise material into one measurement framework. It explains when to use closing returns, ranges, overnight gaps and intraday observations; how to compare the resulting estimates; and why a visually sophisticated estimator is not automatically a better forecast. The examples preserve the source’s teaching inputs and distinguish synthetic datasets from reported historical comparisons.

Define the quantity before selecting the estimator

Historical volatility is not a unique fact waiting to be downloaded. It is an estimate constructed from an observation frequency, return definition, lookback window and annualisation convention. Two valid implementations can disagree because they measure different horizons or different parts of the day.

Let CtC_t denote a close and rt=ln⁡(Ct/Ct−1)r_t=\ln(C_t/C_{t-1}) its log return. A rolling sample standard deviation of the last nn returns, multiplied by 252\sqrt{252}, produces a commonly used annualised close-to-close estimate. The 252 factor is a convention for a series of trading-day returns; it does not assert that every future calendar year contains exactly 252 observations.

A 20-day window responds quickly but contains relatively little information. A 60-day window is smoother but can remain influenced by an old shock after the market changes. Comparing them is informative, provided the comparison does not become a claim that one must always be right. The choice depends on whether the goal is measurement of the recent interval, a next-day forecast, a trading filter or a stress parameter.

Identical closes can hide very different sessions

The retained teaching example starts both sessions at 24,000 and ends both at 24,000:

Two sessions with the same open and close can have different ranges — Session: A

Measure Value
Open 24,000
High 24,050
Low 23,950
Close 24,000
High-low range 100

Two sessions with the same open and close can have different ranges — Session: B

Measure Value
Open 24,000
High 24,400
Low 23,600
Close 24,000
High-low range 800

Both have a zero close-to-close return if the preceding close is also 24,000. Session B nevertheless contains an eight-times-larger point range. Under a range-squared variance estimator, its estimated daily variance is about 64 times the first session’s; the corresponding volatility is about eight times as large. Neither calculation turns one session into a reliable forecast, but it demonstrates information lost by looking only at the endpoints.

The Parkinson daily variance contribution is:

vP,t=ln⁡2(Ht/Lt)4ln⁡2,v_{P,t}=\frac{\ln^2(H_t/L_t)}{4\ln2},

where HtH_t and LtL_t are the high and low. Average these contributions over the chosen window before taking the square root and annualising. Averaging daily volatilities instead of daily variance contributions produces a different statistic.

The efficiency advantage often quoted for range estimators arises under particular continuous-path and observation assumptions. It is not a guarantee that the range estimate will be closer to future realised risk in every dataset. Jumps, bad prints, market microstructure and incomplete sessions can overturn that advantage.

Figure 01 · Conceptual framework

From OHLC prices to a volatility estimate

From OHLC prices to a volatility estimateFrom OHLC prices to a volatility estimate. Validate session data: Check open, high, low, close and calendar conventions. Separate trading components: Distinguish intraday movement from overnight gaps. Choose an estimator: Match assumptions to the quantity being measured. Compare on one sample: Use identical observations and explicit annualisation.Validate session dataCheck open, high, low, close andcalendar conventionsSeparate tradingcomponentsDistinguish intraday movementfrom overnight gapsChoose an estimatorMatch assumptions to thequantity being measuredCompare on one sampleUse identical observations andexplicit annualisation
Reading the figureConceptual sequence drawn from the report; the steps describe responsibilities and analytical dependencies, not measured market outcomes.

Four estimators, four sets of assumptions

Estimator inputs and their limitations — Estimator: Close-to-close

Measure Value
Information used Successive closes
Main attraction Simple, auditable return-based baseline
Important limitation Misses offsetting intraday movements

Estimator inputs and their limitations — Estimator: Parkinson

Measure Value
Information used High and low
Main attraction Extracts intraday range information
Important limitation Sensitive to gaps and high-low data quality

Estimator inputs and their limitations — Estimator: Garman–Klass

Measure Value
Information used Open, high, low, close
Main attraction Uses more within-session information
Important limitation Its clean efficiency result relies on restrictive dynamics

Estimator inputs and their limitations — Estimator: Rogers–Satchell

Measure Value
Information used Open, high, low, close
Main attraction Handles drift in the intraday process
Important limitation Does not by itself reconstruct overnight variance

Estimator inputs and their limitations — Estimator: Yang–Zhang

Measure Value
Information used Previous close plus OHLC
Main attraction Separates overnight and daytime components
Important limitation Needs consistent opens, closes and window conventions

For example, the Garman–Klass daily contribution is:

vGK,t=12ln⁡2(Ht/Lt)−(2ln⁡2−1)ln⁡2(Ct/Ot),v_{GK,t}=\tfrac12\ln^2(H_t/L_t) -(2\ln2-1)\ln^2(C_t/O_t),

where OtO_t is the open. The Rogers–Satchell contribution is:

vRS,t=ln⁡(Ht/Ot)ln⁡(Ht/Ct)+ln⁡(Lt/Ot)ln⁡(Lt/Ct).v_{RS,t}=\ln(H_t/O_t)\ln(H_t/C_t) +\ln(L_t/O_t)\ln(L_t/C_t).

These formulas should be applied to validated bars. A high below the close, a low above the open or a stale opening print can create misleading values. A negative contribution in a formula that should behave sensibly under valid inputs is a reason to inspect the data and assumptions, not an invitation to silently replace every unusual value with zero.

Overnight gaps require their own accounting

The Yang–Zhang construction combines the variance of overnight returns, the variance of open-to-close returns and an average Rogers–Satchell component:

vYZ=so2+ksc2+(1−k)vˉRS,k=0.341.34+(n+1)/(n−1).v_{YZ}=s_o^2+k s_c^2+(1-k)\bar v_{RS}, \qquad k=\frac{0.34}{1.34+(n+1)/(n-1)}.

In words: Combine overnight variation, weighted open-to-close variation and the remaining weighted within-session range measure.

Here so2s_o^2 is the sample variance of ln⁡(Ot/Ct−1)\ln(O_t/C_{t-1}), sc2s_c^2 is the sample variance of ln⁡(Ct/Ot)\ln(C_t/O_t), and nn is the common window length. The exact seeding, window alignment and variance degrees of freedom should be documented.

This decomposition is useful when news arrives while the exchange is closed. A session can have a modest intraday range after opening sharply away from the previous close. An intraday-only estimator then misses the part of risk experienced by someone who held the position overnight.

The source material reports a historical-style comparison of 19.2% close-to-close volatility against 26.4% gap-aware volatility, with 62% of total variance attributed to overnight movement. Those are source-reported figures whose underlying calculation has not been independently reproduced here. Their useful implication is the measurement question: how much of the estimated variance comes from the period when a position cannot be actively hedged?

Figure 02 · Qualitative comparison

Different estimators see different movement

Different estimators see different movement
Approach or conceptWhat it contributesWhat still matters
Close-to-closeMeasures variation in successive closing returnsCan miss substantial movement inside a session
Range-basedUses intraday high and low informationAssumptions differ across range estimators
Gap-awareCombines overnight and session behaviourRequires consistent opens and session definitions
Reading the figureQualitative comparison of the alternatives and limits discussed in the report; no empirical ranking or performance estimate is implied.

A small synthetic dataset is a demonstration, not evidence of alpha

The exercise collection includes 65 synthetic daily OHLC rows, dated 6 January to 4 April 2025. The associated explanation explicitly describes a designed shock, followed by elevated movement and recovery. This makes it useful for checking whether a range-and-gap calculation reacts as expected.

It cannot establish that one model would have outperformed in the real market during those dates. A shock deliberately built into the sample is part of the teaching design. If a model benefits from recognising it, that validates the demonstration’s mechanics rather than a commercial trading claim.

The same distinction applies to a longer comparison reported in the reading:

Unverified historical strategy comparison retained from the source

Reported 2019–2025 comparison Close-to-close approach Asymmetric model plus gap-aware estimate
Peak drawdown −31.4% −18.7%
Sharpe ratio 0.62 0.94
Calmar ratio 0.38 0.77

These are retained source-reported backtest claims, not independently verified strategy performance. Reproducing them would require the exact data, timing, weighting rule, transaction costs and model-refit policy. “Same-day resize” in particular must specify whether the shock was already observable before the trade; otherwise the improvement may contain look-ahead bias.

Average true range is a useful cross-check, not a substitute model

True range is the maximum of Ht−LtH_t-L_t, ∣Ht−Ct−1∣|H_t-C_{t-1}| and ∣Lt−Ct−1∣|L_t-C_{t-1}|. A smoothed average of these ranges provides an intuitive measure in price points. It is widely useful for translating recent movement into a stop distance or a rough position-size cross-check.

The teaching notes use the approximation:

σ^annual≈0.627ATRC252.\hat\sigma_{\mathrm{annual}}\approx0.627\frac{ATR}{C}\sqrt{252}.

With ATR 218 and close 24,180, the result is approximately 8.97% annually. The number 0.627 is a range-to-diffusion scale approximation under simplified assumptions; it is not a universal conversion factor for gap-contaminated, smoothed true range.

The accompanying suggestion that ATR is “the same as” a conditional-volatility model is too strong. ATR summarises recent ranges using a chosen smoother. A fitted conditional-variance model produces forecasts using an explicit stochastic specification. They can agree numerically on one day and diverge legitimately on another. Comparing them is a diagnostic, not an identity.

Figure 03 · Conceptual framework

Are overnight gaps material to this question?

Are overnight gaps material to this question?Are overnight gaps material to this question?. Trading risk question: Specify the exposure period and the relevant price moves. Overnight exposure matters: Use a method that accounts for open-to-close separation. Intraday-only exposure: Focus on the relevant session information. Comparable measurement: Retain units, data checks and estimator assumptions. Lettered arrows correspond to the connection key below.Trading risk questionSpecify the exposure period andthe relevant price movesOvernight exposure mattersUse a method that accounts foropen-to-close separationIntraday-only exposureFocus on the relevant sessioninformationComparable measurementRetain units, data checks andestimator assumptionsABCD

How the parts connect

  1. Trading risk questionPath AOvernight exposure matters
  2. Trading risk questionPath BIntraday-only exposure
  3. Overnight exposure mattersReviewComparable measurement
  4. Intraday-only exposureReviewComparable measurement
Reading the figureDecision framework derived from the report. The two paths identify different evidence or control conditions; they do not predict an investment or operational outcome.

Price bands and return volatility are not interchangeable

A price band built as a moving average plus or minus a multiple of the standard deviation of price levels measures dispersion around that moving average. A return-volatility estimate measures dispersion of returns. Even after normalising a price-band width by price, the two are not literally the same statistic.

A trending series can have wide price-level bands despite relatively stable daily return volatility. A sequence of reversals can produce another relationship. Range channels and standard-deviation bands can therefore supply useful complementary descriptions, but a “squeeze” should be treated as a candidate state requiring validation, not proof that an imminent profitable breakout must occur.

The source proposes short/long volatility-ratio thresholds of 1.2 and 0.9 to distinguish expansion and compression. These are retained research settings. Before using them as trading gates, test nearby thresholds, evaluate different regimes and include the cost of switching exposure. A chosen threshold is a model parameter, not a natural boundary in markets.

Intraday realised variance adds another timescale

With intraday data, realised variance can be constructed by summing squared within-day log returns. A heterogeneous autoregressive model then uses daily, weekly and monthly averages of this realised measure to forecast the next period.

The source uses

Daily, weekly and monthly forecast components

Timescale Retained setting
daily one-day,
weekly five-day
monthly and 22-day

components.

This can capture persistence across different horizons without requiring a large number of separate daily lags. However, more frequent observations introduce microstructure noise, asynchronous timestamps and incomplete-bar problems. Overnight returns still need treatment if the intended horizon is a full holding day rather than the exchange session alone.

The reading reports out-of-sample explanatory-power ranges of 0.55–0.65 for an intraday-based approach against 0.35–0.45 for a daily model. Those figures remain unverified historical claims, not a promised improvement. The relevant test is a fair forecast comparison on the same target, dates and information set.

A reproducible comparison on the retained sample

Using the final 20 daily observations of the 65-row synthetic OHLC series gives a concrete implementation check. Sample variances use the usual one-degree-of-freedom adjustment, the range terms are averaged over the same 20 observations, and every measure is annualised using 252. At the final sample date, 4 April 2025, the results are:

Recomputed annualised estimates on the retained synthetic sample

Recomputed estimate Annualised volatility
Close-to-close 17.8798%
Parkinson 18.1238%
Yang–Zhang 18.3588%

The 20-observation Yang–Zhang weight is approximately 0.139044. Its overnight-variance component accounts for approximately 4.9875% of the resulting variance. These are independently recomputed outputs from the supplied synthetic rows, not historical market estimates.

The small differences in this final window are informative. A gap-aware estimator does not have to print a dramatically higher volatility on every date to be implemented correctly. Its purpose is to allocate observed information consistently. If the last window contains modest overnight movement, a modest gap contribution is the appropriate result. Choosing only a designed shock date would exaggerate the impression of a permanent estimator advantage.

This exhibit also creates an auditable bridge between a written formula and a working calculation. Another implementation should first reproduce the same date, observation count, sample-variance convention and annualisation. If it disagrees, inspect the component returns and window boundaries before changing the formula. Once the two systems agree on the retained sample, run additional cases with no overnight gap, a single large gap and a strong intraday trend to understand the estimator’s behaviour.

A useful daily dashboard presents the close-to-close estimate, the range-and-gap estimate, a conditional forecast and the share of recent variance attributed to overnight movement. It records the data timestamp and the number of usable observations. It also flags large discrepancies rather than averaging them away automatically.

Reconcile date alignment first, then inspect the shock and gap components, then ask whether the measures simply refer to different horizons. Missing exchange holidays should not be replaced by artificial zero-return trading days. Genuine missing observations during an open session require an explicit data-quality decision. These cases are not interchangeable.

The purpose of several estimators is not to manufacture certainty. It is to understand which movements each one sees, where the observations are weak and which quantity the subsequent decision actually needs. A transparent baseline plus a carefully justified improvement is more valuable than a complicated dashboard whose numbers cannot be reconciled.

Built from public documents and the author's own experience. No consultation informed it.