Crypto realized volatility measures past return variation over a declared window. For intraday data, sum squared non-overlapping log returns and take the square root for that window's volatility. Choose a sampling interval by checking data quality and sensitivity across intervals; the shortest available interval can amplify market microstructure noise. State the price source, estimator and annualization separately so the result can be reproduced.
A label such as “30-day volatility” identifies the lookback but leaves the sampling interval unknown. Thirty daily returns, 720 hourly returns and 8,640 five-minute returns can describe the same thirty days while producing different estimates. More observations help only when their information and measurement errors are understood.
Separate the sampling interval from the measurement window
The sampling interval is the time between adjacent prices used to form each return. The measurement window is the span over which those returns are collected. A full 24-hour UTC window sampled every five minutes has 288 consecutive returns and requires 289 boundary prices, including the starting price.
For positive prices, use r_i = ln(P_i / P_(i−1)), storing log returns as decimals. The log versus simple return guide explains the conversion and time-addition rule. A log return of 0.01 is not exactly a 1% simple gain.
Declare what each price represents: last transaction, bid-ask midpoint, index or another defined series. Preserve one venue, instrument, quote currency and market type throughout. A spot last-trade history and a perpetual mark-price history measure different objects, even when their ticker labels resemble each other.
Keep the boundary clock fixed too. Changing a daily window's timezone changes which moves fall into it. A late or missing price cannot silently become a timely observation simply because it was assigned a regular timestamp. Report a missing boundary rather than treating the return to the next available price as an ordinary five-minute return.
Sum of squares and sample variance answer different questions
For n non-overlapping log returns spanning window W, define:
- Realized variance over the window:
RV_W = sum(r_i²). - Realized volatility over the window:
vol_W = sqrt(RV_W). - Demeaned sample variance per sampling interval:
s² = sum((r_i − mean(r))²) / (n − 1).
The first formula does not divide by n. Dividing by n instead gives a mean squared return per interval; its square root is a root mean square, not the whole window's volatility. Sample variance requires at least two returns; a single endpoint return supplies one squared increment but no defined sample standard deviation.
The theoretical reason for accumulating squared high-frequency log returns is their connection to quadratic variation. In the continuous-price setting this connects to integrated variance; with jumps, squared jumps also contribute. Andersen, Bollerslev, Diebold and Labys develop that connection. The limit result requires assumptions and does not certify any finite, noisy crypto dataset.
The two estimators have an exact finite-sample relationship:
sum(r_i²) = (n − 1) × s² + n × mean(r)².
Demeaning removes the squared sample-mean component, and the sample estimator applies a different divisor. Their difference may be small with many short-interval observations, but it must not be assumed away in a short or strongly trending sample. A standard-deviation function is therefore not an interchangeable implementation of realized variance. The Sharpe and Sortino calculation guide covers a separate use of periodic return deviation in performance ratios.
Recalculate one hour at three sampling intervals
The following is an original hypothetical one-hour path, expressed as six consecutive ten-minute log returns. It contains no historical market observations, costs or claimed trading results. All calculations use the unrounded decimal values shown.
| Return ending, UTC | Ten-minute log return | Decimal return | Squared return |
|---|---|---|---|
| 12:10 | +1.0% | 0.010 | 0.000100 |
| 12:20 | −0.8% | −0.008 | 0.000064 |
| 12:30 | +0.6% | 0.006 | 0.000036 |
| 12:40 | +0.4% | 0.004 | 0.000016 |
| 12:50 | −0.7% | −0.007 | 0.000049 |
| 13:00 | +0.5% | 0.005 | 0.000025 |
The squared returns sum to 0.000290. The hour's realized volatility at this interval is sqrt(0.000290) = 0.0170294, or 1.7029%. Its total log return is 0.010, a different statistic describing the endpoint change.
The sample mean is 0.00166667. The sum of squared deviations from that mean is approximately 0.000273333. Dividing by five and taking the square root gives a sample standard deviation of 0.7394% per ten-minute interval. That number and the hour's 1.7029% have different horizons as well as different formulas.
Now sample only at 12:00, 12:20, 12:40 and 13:00. Consecutive log returns add, so the three twenty-minute returns are 0.002, 0.010 and −0.002. Their squared sum is 0.000108, giving 1.0392% realized volatility for the same hour. Using only the two hourly endpoints gives sqrt(0.010²) = 1.0000%.
Coarser sampling hid some reversals. This follows from (a + b)² = a² + b² + 2ab: the cross-product can be negative or positive. Coarsening does not always lower the finite-sample result. Nor does this invented path identify an optimal market-data interval. It shows why a sampling change must be disclosed rather than explained as a change in the market.
Annualize the covered time only once
Annualization rescales a variance rate. For a declared 365-calendar-day convention and D complete days, use:
annualized vol = sqrt((365 / D) × sum(daily realized variances)).
Suppose seven hypothetical daily realized variances are 0.000400, 0.000900, 0.000625, 0.000225, 0.000400, 0.001600 and 0.000900. Each was already built by summing squared intraday returns within its day. Their sum is 0.005050, so the annualized result is sqrt(365 × 0.005050 / 7) = 0.5131485, or 51.3149%.
Do not multiply again by the number of intraday bars: those bars already contributed to each daily total. Omitting the division by seven would produce 135.7663%, overstating this declared variance rate by a factor of seven and its volatility by sqrt(7). Average daily variances before taking the square root; averaging daily volatility levels gives a different statistic.
If instead annualizing a per-interval sample standard deviation, the familiar multiplier is the square root of the declared intervals per year. This time scaling assumes a stable variance rate and zero return autocovariances over the aggregation horizon. With serial dependence, aggregated return variance also contains covariance terms. A historical annualized number supplies neither a forecast of next year's volatility nor a probable loss boundary.
Why the shortest interval can be misleading
Transaction prices can alternate between the bid and ask while the underlying midpoint barely changes. Repeatedly squaring those alternating returns can make a very fine sample look highly volatile. Discrete price ticks, irregular trading and stale observations also interfere with the ideal continuous-price picture.
Aït-Sahalia, Mykland and Zhang's sampling study shows that ignoring microstructure noise can make a finite sampling frequency optimal within their model. It also explains why estimators that explicitly model noise can use more data effectively. “Use fewer observations” is therefore not a general rule; the estimator and noise treatment matter together.
Averaging prices or switching to midpoints changes the input definition and requires its own validation. A midpoint can be stale or drawn from a thin book. Neither it nor a five-minute interval automatically represents an error-free efficient price. The cited studies establish the measurement problem using their models and traditional-market data; they do not prescribe a universal crypto interval.
ATR answers another question. It smooths true ranges built from bar highs, lows and the previous close, usually in price units. Realized volatility here uses squared dimensionless log returns. Even normalizing ATR by price does not make its values or thresholds interchangeable with realized volatility. Preserve that distinction when designing a volatility regime filter.
Choose an interval with a reproducible sensitivity check
- Freeze the data contract. Record instrument, price field, UTC boundaries, timestamp precision and the missing-data policy. Audit duplicates and gaps using the backtest data-quality worksheet. Forward-filled prices can create zeros followed by a delayed jump; preserve their flags.
- Hold the horizon constant. For example, compare one-, five-, ten- and thirty-minute sampling over identical complete days. These are candidate checks, not recommended intervals. Keep every grid aligned and disclose any excluded days. Do not compare one interval's calm week with another's turbulent month.
- Inspect the frequency relationship. Calculate the same unannualized daily variance at every interval, then examine their averages over several declared days. A volatility signature plot displays estimates against sampling frequency. The Federal Reserve's observation-frequency study uses this diagnostic to examine where microstructure effects appear. Its currency and Treasury results depend on those markets and samples.
- Test alignment and input sensitivity. Shift the sampling grid while retaining a common supported horizon, and compare a justified alternative price field if available. Strong sensitivity calls for investigation. A stable region is useful diagnostic evidence, not proof that noise has disappeared.
- Declare the chosen rule before evaluating a strategy. Preserve the interval, estimator, lookback, annualization and alternative readings. If intervals were searched to maximize a Sharpe ratio, record those trials; the deflated Sharpe ratio discussion explains why selection requires separate scrutiny.
For portfolio analysis, first build the appropriate aggregate return series rather than adding individual assets' volatilities. Use portfolio return contributions to reconcile holdings, weights and cash with that account return. Asset-price volatility alone omits the portfolio's exposure and cash-flow treatment.
Save one reproducible report row containing the covered dates, expected and accepted observations, sampling interval, price definition, squared-return total and annualization factor. Recompute the unannualized total first. Only convert it to an annual label after the inputs and measurement horizon agree.
