Calculate the Relative Vigor Index (RVI) for a given price series.

The Relative Vigor Index measures the conviction behind a move by comparing where each period closes relative to its open with the period’s full high-low range: in an uptrend prices tend to close above their open, in a downtrend below it.

The formula is as follows:

\[\text{Numerator} = (\text{Close} - \text{Open}) \text{smoothed with the symmetric weights}\; 1,\;\; \text{2},\;\; \text{2},\;\; \text{1 over the current and three prior periods},\;\; \text{divided by 6}\] \[\text{Denominator} = (\text{High} - \text{Low}) \text{smoothed with the same weights}\] \[\text{RVI} = \operatorname{SMA}(\text{Numerator},\; \text{window}) / \operatorname{SMA}(\text{Denominator},\; \text{window})\] \[\text{Signal Line} = \text{RVI smoothed with the same symmetric weights}\]

The RVI usually lies between -1 and 1 and is positive when closes sit above opens. Crossovers of the RVI and its signal line are the usual trigger, and a divergence from price warns that a move lacks conviction. See momentum_model.get_relative_vigor_index for the full formula.

Also known as: RVI, RVGI, vigor index.

Relative Vigor Index in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_relative_vigor_index as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    tickers=["^HSI"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.technicals.get_relative_vigor_index().xs("^HSI", level=1, axis="columns").tail(5)

Or, after setting up the Finance Toolkit MCP, ask:

How did the Relative Vigor Index of the Hang Seng and its signal line move from 24 to 31 December 2025?

Which returns:

Date Relative Vigor Index Signal Line
2025-12-24 -0.0322 -0.0822
2025-12-26 0.0098 -0.0505
2025-12-29 -0.0084 -0.0215
2025-12-30 -0.0505 -0.0133
2025-12-31 -0.0627 -0.0285

Parameters

get_relative_vigor_index accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe time period to consider for historical data. Can be “intraday”, “daily”, “weekly”, “monthly”, “quarterly” or “yearly”. Defaults to “daily”."weekly"
close_columnstrThe column in the historical data that represents the closing prices. Defaults to “Adj Close”, in which case the open, high and low prices are adjusted for dividends in the same way."Close"
windowintThe number of periods for the averages of the numerator and denominator. Defaults to 10, Ehlers’ setting.20
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise).2
growthboolWhether to calculate the growth of the indicator values. Defaults to False.True
lagint | list[int]The lag to use for the growth calculation. Defaults to 1.4
standardizeboolWhether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.True
Share