How to calculate realized volatility across trading sessions

Realized volatility measures how much an asset actually moved during a chosen period. Unlike implied volatility, which reflects market expectations, realized volatility is calculated from observed prices. It can help traders evaluate market conditions, compare sessions, size positions, and set risk controls based on evidence rather than intuition.

When analysis covers several trading sessions, the calculation requires more care than simply averaging daily percentage changes. Session boundaries, overnight gaps, sampling intervals, time zones, and annualization choices can materially affect the result. A consistent process makes the estimate easier to interpret and reproduce.

For education-focused traders, the objective is not to produce a single impressive number. It is to understand what the number represents, which observations created it, and whether it applies to a particular strategy, market, or holding period.

Define the measurement period

Start by deciding what counts as a trading session. For a stock, this may be the regular exchange hours. For forex, it could mean the Asian, European, or North American session. Cryptocurrency trades continuously, so you may define sessions by fixed UTC windows, calendar days, or periods aligned with your strategy.

Use a consistent clock and document the opening and closing timestamps. A session that includes an overnight price gap will behave differently from one measured only during continuous market hours. If the gap is relevant to the strategy, include it as a return observation rather than silently excluding it.

The sampling interval also matters. Five-minute prices can reveal intraday fluctuations that hourly or closing prices miss. Very short intervals may contain bid-ask bounce, stale quotes, and microstructure noise. Choose an interval that reflects the liquidity and trading horizon of the asset.

Convert prices into returns

For each consecutive price observation, calculate a logarithmic return:

[ r_t=\ln\left(\frac{P_t}{P_{t-1}}\right) ]

Here, (P_t) is the current price and (P_{t-1}) is the previous price. Log returns are useful because they can be added across intervals and sessions. Simple returns, calculated as (P_t/P_{t-1}-1), are also workable, but consistency is essential.

Before calculating, sort prices chronologically and remove duplicate timestamps. Check for missing bars, abnormal price spikes, exchange outages, and differences between bid, ask, and midpoint prices. A bad observation can contribute disproportionately to realized variance because returns are squared.

For separate sessions, decide how to handle the first observation. If the first price of a session is compared with the final price from the previous session, the resulting return includes the gap. If it is compared only with the first available price inside the session, the overnight move is omitted. Neither choice is universally correct; the important point is to state the choice clearly.

Calculate realized variance and volatility

For session (s), realized variance is the sum of squared intraday returns:

[ RV_s=\sum_{t=1}^{n_s}r_{s,t}^{2} ]

The session’s realized volatility is the square root of that value:

[ \sigma_s=\sqrt{RV_s} ]

The result is expressed in return units. For example, (RV_s=0.0004) produces a session volatility of (0.02), or 2%.

To combine multiple sessions, add their realized variances rather than averaging their volatility percentages:

[ RV_{\text{combined}}=\sum_{s=1}^{S}RV_s ]

This produces the cumulative variation across the entire set of sessions. If the goal is to estimate a typical session, calculate the mean session variance:

[ \overline{RV}=\frac{1}{S}\sum_{s=1}^{S}RV_s ]

Then take its square root. Averaging volatility figures directly can distort the result because volatility is nonlinear.

Session Realized variance Session volatility
European 0.000400 2.00%
North American 0.000300 1.73%
Asian 0.000900 3.00%
Combined 0.001600 4.00% cumulative
Average session 0.000533 2.31% typical session

In this example, the combined 4% figure describes cumulative variation over three sessions. It does not mean that a single session normally moves 4%. The square root of the average variance, approximately 2.31%, is more appropriate for describing a typical session.

Annualize the estimate carefully

Annualization allows comparisons between measurements based on different horizons. If there are (K) comparable sessions in a year, annualized volatility based on average session variance is:

[ \sigma_{\text{annual}}=\sqrt{\overline{RV}\times K} ]

Using the example above and 252 sessions:

[ \sqrt{0.000533\times252}\approx0.3666 ]

The annualized estimate is therefore approximately 36.7%.

Annualization assumes that the measured variance is representative and that session returns are sufficiently comparable. A crypto trader using 365 daily periods, a forex trader using 260 weekdays, and an equity trader using 252 exchange sessions may use different scaling factors. For hourly data, scale by the expected number of trading hours per year instead.

Do not annualize a cumulative multi-session volatility by multiplying it blindly. First establish whether the number represents one session, an average session, a week, or the entire observation window. Annualization should match the unit of analysis.

Account for gaps and changing liquidity

Market activity often varies substantially between sessions. A volatile opening, a quiet midday period, and a fast-moving news release can all appear within the same day. Comparing session-specific realized volatility helps identify when risk is concentrated.

For a market that trades continuously, define whether the calculation includes all 24 hours or only selected windows. For a market with closures, the return from one close to the next open may contain information that intraday bars do not capture. Including or excluding that gap can change the estimate materially.

Liquidity conditions also influence observed volatility. Wider spreads may increase the apparent movement in transaction prices, especially at short sampling intervals. Midpoint data can reduce some bid-ask effects, while longer intervals can reduce noise. When comparing assets or brokers, use similar price sources and sampling conventions.

Volatility is also regime-dependent. A result calculated during a major economic announcement may not describe ordinary conditions. Reviewing rolling estimates, session distributions, and high-volatility outliers provides more context than relying on one full-period average. Traders exploring decentralized markets should also understand how settlement logic and automated transactions can affect the environment; this smart contract guide offers relevant background for everyday investors.

Use the result in risk management

Realized volatility becomes useful when it informs a defined decision. A trader might compare current session volatility with its rolling median, reduce exposure when conditions expand, or adjust expected holding periods. The estimate should support a risk framework rather than serve as a directional prediction.

Position sizing can be linked to a target dollar risk. If a strategy expects a price move based on recent realized volatility, the position can be reduced when the expected move grows. Stop placement should also account for the instrument’s normal fluctuations and market structure. This volatility-based stop guide explains why fixed percentage stops may be poorly matched to changing conditions.

A volatility estimate is historical, so it can become outdated quickly. Combine it with liquidity, scheduled events, correlation, leverage, and the strategy’s actual holding period. A calculated number cannot eliminate risk, but it can make assumptions visible and easier to test.

Practical habits for reliable calculations

Use these habits when building a spreadsheet, script, or trading dashboard:

Keep the raw observations and intermediate calculations. Reproducibility makes it easier to investigate a sudden change, compare data vendors, or test whether a strategy performs differently during high- and low-volatility regimes.

Put the estimate to work

A disciplined realized volatility workflow turns scattered price movements into a measurable description of market behavior. By separating session variance from cumulative variation, handling gaps explicitly, and annualizing only after defining the measurement unit, traders can avoid several common interpretation errors.

Build the calculation into a spreadsheet or research script, compare it with your strategy’s actual holding period, and review the estimate regularly before using it to guide position size or protective orders.