# Choppiness Index

This study calculates and displays a Choppiness Index of the price data.

Let $$H$$ and $$L$$ be random variables denoting the High Price and Low Price, respectively, and let $$H_t$$ and $$L_t$$ be their respective values at Index $$t$$. Let the Inputs Summation Period and ATR Period be denoted as $$n_S$$ and $$n_{ATR}$$, respectively. Let $$ATR(n_{ATR})$$ denote the Average True Range with Length $$n_{ATR}$$. Then we denote the Choppiness Index at Index $$t$$ for the given Inputs as $$CI_t(n_S,n_{ATR})$$, and we compute it as follows.

$$\displaystyle{CI_t(n_S,n_{ATR}) = \frac{\left. 100\log\left(\sum_{i = t - n_S + 1}^t ATR_i(n_{ATR}) \middle/ (\max_t(H,n_S) - \min_t(L,n_S)\right) \right.}{\log(n_S)}}$$

This Subgraph is displayed for $$t > \max(n_S, n_{ATR}) - 1$$.

The above formula is used as long as $$\max_t(H,n_S) - \min_t(L,n_S) \neq 0$$. Otherwise, $$CI_t(n_S,n_{ATR}) = 0$$.

For an explanation of the Sigma ($$\Sigma$$) notation for summation, refer to our description here: Summation.

For an explanation of the functions $$\max_t()$$ and $$\min_t()$$, refer to our descriptions here: Moving Maximum and Moving Minimum.