Choppiness Index
Calculate the Choppiness Index (CHOP) for a given price series.
The Choppiness Index quantifies whether the market is trending or moving sideways (“choppy”) by comparing the sum of True Range over the window (a measure of the total price path travelled) to the net range the price actually covered over that same window (the distance between the highest high and the lowest low). When price travels a long, winding path but ends up covering little net ground, the index is high (near 100), signalling a choppy, range-bound market. When price travels efficiently in one direction, the index is low (near 0), signalling a trending market.
The formula is as follows:
\[\text{CHOP} = 100 \cdot \log_{10}(\operatorname{Sum}(\text{True Range},\; \text{window}) / (\max(\text{High},\; \text{window}) - \min(\text{Low},\; \text{window}))) / \log_{10}(\text{window})\]Also known as: CHOP, Choppiness Index.
Choppiness Index in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_choppiness_index as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(
tickers=["EURUSD"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2021-01-01",
end_date="2025-12-31",
)
toolkit.technicals.get_choppiness_index().tail(5)
Or, after setting up the Finance Toolkit MCP, ask:
Was the euro against the dollar trending or moving sideways from 26 to 31 December 2025, according to the Choppiness Index?
Which returns:
| Date | EURUSD | Benchmark |
|---|---|---|
| 2025-12-26 | 52.4784 | 50.3552 |
| 2025-12-28 | 53.5899 | 48.3828 |
| 2025-12-29 | 54.145 | 45.0165 |
| 2025-12-30 | 58.6754 | 41.7357 |
| 2025-12-31 | 54.8842 | 41.2609 |
Parameters
get_choppiness_index accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
period | str | The time period to consider for historical data. Can be “intraday”, “daily”, “weekly”, “monthly”, “quarterly” or “yearly”. Defaults to “daily”. | "weekly" |
close_column | str | The column name for closing prices in the historical data. Defaults to “Adj Close”, in which case the open, high and low prices are adjusted for dividends in the same way. | "Close" |
window | int | Number of periods to consider for the Choppiness Index calculation. Defaults to 14. | 20 |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
growth | bool | Whether to calculate the growth of the Choppiness Index. Defaults to False. | True |
lag | int | list[int] | The lag to use for the growth calculation. Defaults to 1. | 4 |
standardize | bool | Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False. | True |