Relative Volatility Index (RVI)
Summary
Relative Volatility Index: Donald Dorsey's volatility oscillator, built exactly like RSI except that the quantity routed to the up and down buckets is the rolling standard deviation of price rather than the size of the move. The direction of the close-to-close change still decides which bucket a bar feeds.
Bounded in 0..100. High values mean the recent volatility arrived mostly on up bars, low values that it arrived mostly on down bars. Dorsey proposed it as a confirming filter rather than a stand-alone signal: take a long entry only while RVI is above 50, a short only while it is below.
Formula
With S the standard deviation of the last optInStdDevPeriod values of inReal, and C the input series:
U[i] = S[i] if C[i] > C[i-1], else 0
D[i] = S[i] if C[i] < C[i-1], else 0
RVI = 100 * RMA(U, optInTimePeriod) / ( RMA(U, optInTimePeriod) + RMA(D, optInTimePeriod) )
RMA is Wilder's smoothed moving average, seeded with the simple average of its first optInTimePeriod inputs. A bar whose close equals the previous close feeds neither bucket.
Notes
- This is Dorsey's 1993 original, which measures the closes alone. His 1995 revision averages the index of the highs with the index of the lows; some vendors reserve the name RVI for that revision and call this one RVIorig. It is not implemented here.
- A tie contributes to neither bucket, matching RSI's treatment of an unchanged close. Descriptions that write the denominator as a smoothed
Sinstead ofU + Dare counting ties as down bars, which is a different indicator. - Both smoothed legs can be exactly zero at the same bar, which happens whenever the smoothing carries no memory and the bar is a tie. RVI reports its neutral centre, 50, there rather than a non-finite value.
- The standard deviation is the population form. The sample form differs by a constant factor that cancels in the ratio, so it is not a variant.
- Sources publishing something else under this name, and how far from this function they land on a 252-bar equity series: a plain exponential smoother instead of Wilder's, up to 11.6 index points; one shared period for both the deviation and the smoothing, up to 15.6; an RSI taken over the standard-deviation series, up to 35.2; a linear-regression residual, up to 36.0. These are different indicators, not errors.
- Unrelated to the Relative Vigor Index, which several platforms also abbreviate RVI.
Inputs
inReal— Source price/value series, canonically the close
Outputs
outReal— Relative Volatility Index value
Parameters
| Parameter | Type | Default | Accepted values | Description |
|---|---|---|---|---|
optInTimePeriod | integer | 14 | 1–100000 | Wilder smoothing period applied to both legs |
optInStdDevPeriod | integer | 10 | 2–100000 | Number of trailing values the standard deviation spans |
Properties
Numerical Stability: Initial Unstable Period
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ☐ Candlestick |
| ☐ Can Output NaN or ±Inf |
| ☐ Identity at Period 1 |
Implementation
TA-Lib Definition: rvi.c · rvi.yaml
| Native | File |
|---|---|
| C | ta_RVI.c |
| Rust | rvi.rs |
| Java | Core_RVI.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
Relative Volatility Index, RVIorig
See Also
References
- Donald Dorsey, "The Relative Volatility Index", Technical Analysis of Stocks & Commodities, V.11:6 (June 1993), 253-256
- Donald Dorsey, "Refining the Relative Volatility Index", Technical Analysis of Stocks & Commodities, V.13:9 (September 1995), 388-391
- Chart manual: Relative Volatility Index
- DXcharts: Relative Volatility Index