implied-volatility range study

IV Rank Indicator for thinkorswim

IV Rank commonly measures current implied volatility's position in a high-low range. A frequency percentile counts observations below the current value. Platform labels vary, so inspect the definition rather than assuming every field named percentile uses a frequency calculation.

Source review completed

Prompt brief

ThinkScript · one source file

Review in thinkorswim

Example request

Create a lower thinkorswim IV Rank study using daily implied volatility over 252 bars, with safe zero-range handling, 20 and 80 guide levels, a current-value label, and threshold-cross alerts.

Editable sourceFocused revisionsCheck in native editor

Direct answer

A common IV Rank formula is 100 × (current IV - lowest IV) ÷ (highest IV - lowest IV) over a selected lookback. In thinkScript, the implied-volatility input and aggregation must be defined, and the study must handle missing values or a zero range. The result describes relative range position, not whether an option is mispriced.

What to know first

  • Lookback and aggregation are part of the calculation.
  • Range position and frequency percentile are different statistics, even when platform naming overlaps.
  • Unavailable IV or equal high and low values need explicit handling.

Reference points

Keep the calculation explicit

Current IV
The implied-volatility value returned for the selected symbol, period, and price type.
Range high
The highest valid implied-volatility value in the selected lookback.
Range low
The lowest valid implied-volatility value in the selected lookback.
IV Rank
The current value's position between those high and low bounds, commonly scaled from 0 to 100.

IV Rank is sensitive to one extreme observation

Because the formula uses the lookback high and low, an old spike can compress later readings until it leaves the window. Record the number of bars and aggregation rather than describing only a number of calendar days.

A frequency percentile measures the share of observations below the current IV. Schwab also uses the label Current IV Percentile for a statistic described relative to the prior year's IV highs and lows and sometimes calls it IV rank. Match the actual definition and source series before comparing it with a custom study.

Handle the data boundary in code

The imp_volatility function has symbol, period, and price-type behavior documented by thinkorswim. A custom study should avoid dividing by zero and decide whether to hide, carry, or label unavailable values.

Pineify can generate the calculation, thresholds, labels, and alerts. Confirm the underlying IV series before interpreting the rank.

Compute a value and handle a missing one

With hypothetical IV low 20%, high 60%, and current IV 30%, range-based IV Rank is 100 × (30 - 20) / (60 - 20) = 25. If 80 of 100 historical observations are strictly below 30%, the frequency percentile is 80. A zero high-low range makes the rank undefined, not automatically zero.

For a 252-daily-bar lookback, keep the IV series and its high-low calculation in daily aggregation. Mixing a daily series with primary-chart expressions can change aggregation behavior. Show missing data as unavailable; silently carrying old IV forward can create a fresh-looking but stale rank.

Pineify thinkScript workflow

Turn the specification into editable thinkScript

Give the Coding Agent the formula, inputs, plots, alerts, and edge cases. It returns one editable study or strategy file and keeps focused revisions in the same code artifact.

Open the thinkScript agent

Sources and scope

Last verified:

Pineify provides information and code-generation assistance, not investment advice. Generated scripts, strategy reports, simulations, and historical examples cannot predict prices or guarantee returns. Review every script and test it in its target platform before relying on its output.

Frequently asked questions

How is IV Rank calculated on thinkorswim?

A common formula scales current implied volatility between the lowest and highest valid IV values over a stated lookback. The source series, aggregation, and missing-data rule must also be specified.

Is IV Rank the same as IV percentile?

The high-low range formula and a count-based percentile are different. However, Schwab's Current IV Percentile label is also described as IV rank. Check the platform definition, lookback, and IV source rather than treating the label as a universal formula.

Can Pineify create IV Rank alerts?

Yes. Define the lookback, aggregation, threshold, crossing behavior, and no-data handling. The alert should be verified against the displayed IV series in thinkorswim.

Continue in the thinkScript coding workspace

Generate one editable thinkScript study or strategy, inspect the source, request focused changes, and complete the final check in thinkorswim.

Pineify generates source code. Review its syntax and chart behavior in thinkorswim before use.