Calculate the New Highs - New Lows for a given price series.

New Highs - New Lows measures the number of tickers reaching a new high over the specified window minus the number of tickers reaching a new low over the same window. It is a market-wide breadth reading computed across all tickers in the Toolkit instance (excluding the synthetic “Portfolio” and “Benchmark” columns), and the resulting single reading is broadcast to every ticker column so it lines up with the other breadth indicators.

The formula is as follows:

\[\text{New Highs} - \text{New Lows} = (\text{Number of tickers at}\; a \;\text{window-period high}) - (\text{Number of tickers at}\; a \;\text{window-period low})\]

The reading counts tickers at a high or low of the lookback window, so it needs a broad universe and a history of at least one window before the start of the period of interest: in the first periods every ticker is compared with only a few prices, so it is often counted at a high or a low, and on the first date at both. Persistently more new lows than new highs while an index still rises is a classic sign of narrowing breadth.

Also known as: new highs minus new lows, record high percent.

New Highs - New Lows in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_new_highs_new_lows as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    tickers=["XLK", "XLF", "XLE", "XLV", "XLY", "XLP", "XLI", "XLB", "XLU", "XLRE", "XLC"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2024-10-01",
    end_date="2025-12-31",
)

# New Highs - New Lows is one market-wide reading, repeated in every ticker column
toolkit.technicals.get_new_highs_new_lows(window=20).loc[:, ["XLK"]].tail(5)

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

Of the 11 Select Sector SPDR ETFs (XLK, XLF, XLE, XLV, XLY, XLP, XLI, XLB, XLU, XLRE and XLC), how many closed at a 20-day high, net of those at a 20-day low, on each trading day from 24 to 31 December 2025?

Which returns:

Date XLK
2025-12-24 5
2025-12-26 1
2025-12-29 0
2025-12-30 2
2025-12-31 0

Parameters

get_new_highs_new_lows 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 name of the column containing the close prices. Defaults to “Adj Close”."Close"
windowintNumber of periods for the new high / new low lookback. Defaults to 252.126
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