TradingView indicator research

Volatility cone: windows and percentiles

A volatility cone compares the historical distribution of realized volatility across several holding periods. Enter one stock or ETF to compare its latest estimates with percentile bands from the same set of rolling end dates. Options IV, when available, appears separately below.

Up to 8 windows, from 10 to 252 trading observations. Two calendar years of requested price history. Annualization assumes 252 trading days.

Popular:

Enter a ticker and click "Analyze"

The volatility cone chart will appear here

Read across horizons, then inspect the sample

A historical-volatility line follows one lookback through calendar time. This cone puts lookback length on the horizontal axis and annualized volatility on the vertical axis. Each vertical slice summarizes a distribution of rolling estimates. Its bands describe the selected history; they are not confidence intervals for future prices.

Compare the same symbol at 20, 60 and 252 observations before comparing different assets. A short-window reading above its 90th percentile while the long window remains near its median can reflect a recent volatility change. Check earnings, gaps and corporate actions before assigning a cause.

How the tool aligns windows

The tool requests daily prices from FMP for the past two calendar years. A window of n returns needs n + 1 closes. It keeps windows with at least five rolling estimates, then uses the longest eligible window to select a common set of end dates for every displayed horizon. Each horizon's current estimate includes the latest returned close. Zero-volatility observations remain in the distribution. Invalid dates, conflicting values for one date or nonpositive prices stop calculation; exact date/price duplicates are collapsed. Missing market sessions and corporate-action adjustment conventions still require checking.

Hypothetical single symbol with 505 daily closes (504 returns)
WindowAll possible estimatesAligned estimates used
20 observations485253
60 observations445253
252 observations253253

With N closes, an n-return window has N - n possible estimates. In the example, every displayed horizon ends on closes 253 through 505. Alignment reduces the short-window sample but removes differing end-date coverage. Overlapping windows share returns, so 253 estimates are not 253 independent observations. Five estimates are only a display minimum, not evidence of statistical reliability. Missing sessions can still distort observation-based windows.

Reproduce the volatility and percentile calculations

r[t] = ln(close[t] / close[t-1])
HV = sqrt(252 × sum((r - mean(r))²) / (n - 1))

For a hypothetical series alternating +0.01 and -0.01 daily log returns, the mean return is zero. A 20-return window gives sqrt(252 × 20 × 0.0001 / 19) = 16.29% annualized HV. The same series gives 16.01% over 60 returns and 15.91% over 252 returns. These differences come from the sample-variance denominator, even though the daily return magnitudes are identical.

Band percentiles use linear interpolation at index p × (m - 1), where p is between 0 and 1 and m is the sample size. For sorted hypothetical HV values of 10%, 12%, 16%, 20% and 30%, the median is 16% and the 75th percentile is 20%. A comparison value of 18% exceeds three of five observations, giving a 60% empirical percentile. A min/max range score would be 40%; it answers a different question. The table counts values strictly below the current estimate, so tied observations do not count as lower. The latest estimate is included in its benchmark sample.

What the IV comparison actually measures

IV comes from Massive's option-chain snapshot, not from OHLC prices. This page uses the New York calendar date to request expiries 20 to 60 calendar days away and reads the first response page, up to 250 contracts. It chooses the earliest returned eligible expiry and averages its finite IV values greater than zero and below 500%. This is an unweighted sample across returned strikes and option types after excluding duplicate contracts, not an at-the-money quote or a complete option chain.

The comparison card ranks this snapshot mean against all available 30-observation historical-volatility estimates. It does not retrieve a historical IV series and cannot report historical IV percentile. The chart itself overlays current realized volatility only. A maturity-matched IV curve would require consistent strikes, expiries, quote times and a calendar-to-trading-day convention. Data may be delayed or absent; the provider's snapshot endpoint does not provide historical snapshots. The screen reports retrieval time, not a synchronized valuation time for each contract. The 30/70 rank cutoffs used for the card’s descriptive labels are display choices, not tested trading thresholds. A quote failure does not block the historical cone.

An IV value above the historical cone does not establish that an option is overpriced. Earnings, skew, liquidity and future jumps can explain a gap. Splits, dividend treatment, the chosen history and missing prices can change realized-volatility estimates. This tool is research material, not an option valuation model or investment advice.

Carry the definition into TradingView

Record the ticker, daily session, last price date, lookbacks, sample denominator and annualization factor before comparing a TradingView study with this tool. Check price adjustments and whether each study includes the current bar. A single historical-volatility line cannot replace the cone's cross-window distributions.

After checking the data here, use the AI Finance Agent to research company news and earnings context. The Pine Script AI Coding Agent can help draft a transparent historical-volatility study from these rules. Review its calculations and validate the script. OHLC data alone cannot reconstruct option implied volatility.

Sources and calculation scope

Sources checked October 21, 2026. Formula choices and sample alignment above describe this implementation.

Volatility cone questions

How does a volatility cone differ from historical volatility?

A historical-volatility line shows one rolling lookback through time. A cone summarizes distributions across several lookback lengths, then compares the latest estimate with each distribution. Its horizontal axis is window length, not a forecast date.

Why do the displayed windows use equal sample counts?

This tool aligns rolling end dates to the longest eligible window. With 505 closes and a 252-return longest window, every displayed horizon uses 253 estimates ending on the same dates. Shorter windows discard earlier estimates to make the historical coverage comparable.

Does this tool calculate historical IV percentile?

No. The IV card compares an options snapshot mean with the historical distribution of 30-observation realized volatility. It does not load historical IV. The snapshot uses the first page of up to 250 Massive contracts and the earliest returned eligible expiry 20 to 60 calendar days away.

Why is a long window or the IV card missing?

A window needs at least five rolling estimates, so 252 returns require at least 257 closes to appear. The tool requests two calendar years, but actual coverage varies. The IV card is absent when no eligible option IV is returned or the options request fails; the historical cone can still be calculated.

Can a high percentile tell me to sell options?

No. A high percentile describes the selected historical sample. Future event risk, option skew, transaction costs and liquidity still matter. An IV-to-HV gap is not proof of mispricing or a profitable trade.

Investigate the context behind a volatility change

Bring the symbol, sample dates and unusual window to the AI Finance Agent for news and earnings research. Keep the underlying sources with your notes before writing a trading rule.