Calculate the Elder Ray Index (Bull Power and Bear Power) for a given price series.

The Elder Ray Index measures buying and selling pressure in the market relative to a trend baseline (an Exponential Moving Average of the closing price). Bull Power captures how far the high extends above the EMA (buying pressure), while Bear Power captures how far the low extends below the EMA (selling pressure).

The formula is as follows:

\[\text{Bull Power} = \text{High} - \operatorname{EMA}(\text{Close},\; \text{window})\] \[\text{Bear Power} = \text{Low} - \operatorname{EMA}(\text{Close},\; \text{window})\]

Also known as: Elder Ray, Bull Power, Bear Power.

Elder Ray Index in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_elder_ray_index as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    tickers=["HGUSD"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.technicals.get_elder_ray_index().xs("HGUSD", level=1, axis="columns").tail(5)

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

How did bull power and bear power develop for copper from 26 to 31 December 2025, measured by the Elder Ray Index?

Which returns:

Date Bear Power Bull Power
2025-12-26 0.1172 0.3357
2025-12-28 0.1601 0.3185
2025-12-29 -0.0356 0.3307
2025-12-30 -0.0892 0.1712
2025-12-31 0.0046 0.1455

Parameters

get_elder_ray_index 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 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"
windowintThe number of periods for the EMA used as the trend baseline. Defaults to 13, as originally proposed by Elder.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 Bull and Bear Power. 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