# Technical Studies Reference

- Technical Studies Reference
- Common Study Inputs (Opens a new page)
- Using Studies (Opens a new page)

### Inertia

This study calculates and displays the Inertia study. The step-by-step calculation method is explained below.

The components of the Relative Vigor Index (RVI) are calculated as follows. We let \(C_i\), \(O_i\), \(H_i\), and \(L_i\) be the closing, opening, high, and low prices at time index \(i\), respectively.

*Close-Open Average*:

The summand is the average of the difference in the closing and opening prices for consecutive values of the index, and \(CloseOpenAvg_i\) is the average of three of these averages.

** High-Low Average:**
$$HighLowAvg_i = \frac{(H_i-L_i) + 2(H_{i-1}-L_{i-1})+2(H_{i-2}-L_{i-2})+(H_{i-3}-L_{i-3})}{6}$$
$$HighLowAvg_i = \frac{1}{3}\sum_{k=1}^3{\frac{(H_{i-k+1}-L_{i-k+1})+(H_{i-k}-L_{i-k})}{2}}$$

The summand is the average of the difference in the closing and opening prices for consecutive values of the index, and \(HighLowAvg_i\) is the average of three of these averages.

For the next calculations, let \(d\) be the starting value of the index, and let \(r\) be the RVI Length, which is an input. For \(i=d\), we have the following.

*RVI Numerator*:

This is the sum of the sequence of \(CloseOpenAvg\)'s starting at \(CloseOpenAvg_i\) and ending at \(CloseOpenAvg_{r+i-1}\).

*RVI Denominator*:

This is the sum of the sequence of \(HighLowAvg\)'s starting at \(HighLowAvg_i\) and ending at \(HighLowAvg_{r+i-1}\).

*RVI*:

From these we calculate the RVI as follows.

$$RVI_i=\left\{ \begin{matrix} \frac{RVINum_i}{RVIDenom_i} & RVIDenom_i \neq 0 \\ 0 & RVIDenom_i=0 \end{matrix}\right .$$*Inertia Calculation*:

The inertia of the RVI is precisely the Linear Regression Indicator (LRI) of the RVI. The LRI is described in detail in Moving Linear Regression / Moving Average - Least Squares. We let \(l\) be the Linear Regression Length, which is an input. The regression statistics are calculated for each \(i\) where the data points are taken \(l\) at a time. Explicit formulas are given below.

$$b_i=\frac{l \cdot \sum_{k=1}^l{(k+i-1)RVI_{k+i-1}}-\sum_{k=1}^l{(k+i-1)}\cdot \sum_{k=1}^l{RVI_{k+i-1}}}{l \cdot \sum_{k=1}^l{(k+i-1)^2}-\left(\sum_{k=1}^l{(k+i-1)}\right)^2}$$ $$a_i=\frac{\sum_{k=1}^l{RVI_{k+i-1}}-b_i \cdot \sum_{k=1}^l{(k+i-1)}}{l}$$ $$LRI_i=a_i+lb_i$$*Last modified Friday, 09th June, 2017.