Factors Directory

Quantitative Trading Factors

Relative Volatility Index (RVI)

Technical indicatorsVolatility FactorTechnical Factors

factor.formula

Calculate the upward momentum UM. If the price on the current day is higher than the price on the previous day, it is the standard deviation of the prices over the past N1 days, otherwise it is 0.

Calculate the downward momentum DM. If the price on the current day is lower than the price on the previous day, it is the standard deviation of the prices on the past N1 days, otherwise it is 0.

Calculate the average upward momentum UA, and perform exponential moving average (EMA) smoothing on the current upward momentum UM. N2 is the smoothing window size.

Calculate the average downward momentum DA, and perform exponential moving average (EMA) smoothing on the current downward momentum DM. N2 is the smoothing window size.

Calculate the relative strength RS as the percentage of the average upward momentum UA in the total momentum (UA+DA).

Calculate the relative volatility index RVI as the average of the high price relative strength RS and the low price relative strength RS.

Calculate the initial value of UA and smooth UM using the simple moving average (SMA), where N is the smoothing window size.

Calculate the initial value of DA and smooth DM using a simple moving average (SMA), where N is the smoothing window size.

If the sum of the average upside momentum UA and the average downside momentum DA is zero, to avoid division by zero error, set RVI = 0.

in:

  • :

    The closing price of the current trading cycle can be daily, hourly, etc.

  • :

    The closing price of the previous trading period.

  • :

    The standard deviation of prices over the past N1 trading cycles is used to measure the volatility of prices. N1 is usually set to 10.

  • :

    The simple moving average (SMA) window size used when calculating the initial values ​​of UA and DA represents the initial smoothing period of the average momentum and is usually taken as 5.

  • :

    The window size for calculating the price standard deviation represents the length of the period for measuring price volatility, which is usually 10.

  • :

    The exponential moving average (EMA) smoothing window size for calculating the average momentum UA/DA represents the smoothing period of the average momentum, which is usually 20.

  • :

    Upward Momentum: When the price rises, the standard deviation is used to characterize the strength of the rise; otherwise, it is 0.

  • :

    Downward Momentum: When the price falls, the standard deviation is used to characterize the strength of the fall; otherwise, it is 0.

  • :

    Average Upward Momentum is a smoothing of the upward momentum UM, calculated using the exponential moving average EMA method, to reflect the sustainability of the upward momentum.

  • :

    Average Downward Momentum is a smoothing of the downward momentum DM, calculated using the exponential moving average EMA method, which reflects the sustainability of the downward force.

  • :

    Relative Strength refers to the proportion of average upward momentum in total momentum, reflecting the relative strength of bullish forces.

  • :

    The Relative Volatility Index is calculated by the relative strength of high and low prices and is used to determine the direction of price fluctuations and potential trend reversals.

  • :

    Simple Moving Average is used to smooth data. It is calculated as the arithmetic mean of the data within the specified window period.

factor.explanation

The calculation method of the RVI indicator borrows the idea of the relative strength index (RSI), but the core difference is that RVI uses the standard deviation of the price rather than the price itself to measure momentum. RVI judges the long and short forces of the market by analyzing price fluctuations (rather than price levels). When the RVI value is high, it indicates that the upward momentum is increasing, which may indicate a price increase; conversely, when the RVI value is low, it indicates that the downward momentum is increasing, which may indicate a price drop. RVI is usually used in conjunction with trend indicators such as moving averages to enhance the accuracy of trading decisions and avoid generating too many invalid signals in a volatile market. The RVI indicator can more sensitively capture price fluctuations and trend changes.

Related Factors