AR and BR Sentiment (BRAR)

Calculate the AR and BR sentiment indicators (BRAR), which show how popular a security is and how willing the market is to buy it.

They set how far the prices rose against how far they fell, measured from the open (AR) and from the previous close (BR).

AR (popularity) compares how far the price rose above the open with how far it fell below it over the window, and BR (willingness) does the same against the previous close, which also counts the gaps between periods. Both are 100 when the upward and downward moves balance. AR from 150 and BR from 300 are read as overheated and AR below 50 and BR below 40 as depressed; BR crossing AR from below is a buy signal.

The formula is as follows:

\[\text{AR} = \frac{100 \cdot \operatorname{Sum}(\text{High} - \text{Open},\; \text{window})}{\operatorname{Sum}(\text{Open} - \text{Low},\; \text{window})}\] \[\text{BR} = \frac{100 \cdot \operatorname{Sum}(\max(\text{High} - \operatorname{Close}(t - 1),\; 0),\; \text{window})}{\operatorname{Sum}(\max(\operatorname{Close}(t - 1) - \text{Low},\; 0),\; \text{window})}\]

Also known as: BRAR, AR and BR, popularity and willingness indicators, sentiment indicator.

Example · AAPL, MSFT · 2024 to 2025

Install the Finance Toolkit with pip install financetoolkit -U, then call get_brar:

from financetoolkit import Toolkit

toolkit = Toolkit(
    tickers=["AAPL", "MSFT"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2024-01-01",
    end_date="2025-12-31",
)

toolkit.technicals.get_brar().xs("AAPL", level=1, axis="columns")

Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:

What did the BRAR sentiment indicator of Apple show in 2025?

Which returns:

Parameters

get_brar accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe time period to consider for historical data. Options are: “intraday” (intraday prices), “daily” (daily prices), “weekly” (weekly prices), “monthly” (monthly prices), “quarterly” (quarterly prices), “yearly” (yearly prices). Defaults to “daily”."weekly"
close_columnstrThe column name for closing prices in the historical data. Defaults to “Adj Close”."Close"
windowintThe number of periods of the sums. Defaults to 26.20
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 AR and BR. 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
show_columnsstr | list[str] | NoneThe columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column.None, which keeps every column

References

  • Library Referenced against pandas-ta-classic’s brar
Share