Calculate the daily advance/decline signal for a given price series.

Traditionally advancers versus decliners is a market-wide count of rising against falling stocks; applied to a single ticker it becomes a directional signal: +1 on a day the ticker closed higher than the day before, -1 on a day it closed lower and 0 on an unchanged day. It feeds the McClellan Oscillator; get_trin and get_new_highs_new_lows measure breadth across all tickers.

The formula is as follows:

\[\text{Signal} = + 1 \;\text{if Close} (t) > \operatorname{Close}(t-1),\;\; \text{-1 if Close(t) < Close(t-1)},\;\; \text{else 0}\]

Also known as: advance decline ratio, market breadth.

Advancers/Decliners Ratio in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_advancers_decliners as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    tickers=["EWJ", "EWG", "EWU", "EWQ", "EWZ", "INDA", "FXI", "EWC", "EWA", "EWY"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.technicals.get_advancers_decliners().loc[:, ["EWJ", "EWG", "EWZ", "INDA", "FXI", "Benchmark"]].tail(5)

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

On which trading days from 24 to 31 December 2025 did the iShares MSCI Japan (EWJ), Germany (EWG), Brazil (EWZ), India (INDA) and China Large-Cap (FXI) ETFs close higher or lower than the day before?

Which returns:

Date EWJ EWG EWZ INDA FXI Benchmark
2025-12-24 -1 1 -1 -1 1 1
2025-12-26 -1 1 1 -1 1 -1
2025-12-29 1 -1 -1 -1 -1 -1
2025-12-30 -1 1 1 1 1 -1
2025-12-31 -1 -1 -1 1 -1 -1

Parameters

get_advancers_decliners 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"
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