Calculate the Awesome Oscillator (AO) for a given price series.

The Awesome Oscillator measures market momentum by comparing a short-term and a long-term Simple Moving Average of the median price (the midpoint of each period’s high and low, rather than the closing price). It was developed by Bill Williams as part of his broader “Trading Chaos” collection of momentum indicators.

The formula is as follows:

\[\text{Median Price} = (\text{High} + \text{Low}) / 2\] \[\text{AO} = \operatorname{SMA}(\text{Median Price},\; \text{short\_window}) - \operatorname{SMA}(\text{Median Price},\; \text{long\_window})\]

Also known as: AO, Bill Williams Awesome Oscillator.

Awesome Oscillator (AO) in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_awesome_oscillator as shown below.

from financetoolkit import Toolkit

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

toolkit.technicals.get_awesome_oscillator().tail(5)

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

How did the momentum of Solana shift from 27 to 31 December 2025, measured by the Awesome Oscillator?

Which returns:

Date SOLUSD Benchmark
2025-12-27 -8.9048 8.1464
2025-12-28 -8.6621 7.9295
2025-12-29 -7.5992 7.0338
2025-12-30 -6.6618 6.2715
2025-12-31 -5.546 4.9234

Parameters

get_awesome_oscillator 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”."Close"
short_windowintThe number of periods for the short-term SMA of the median price. Defaults to 5.3
long_windowintThe number of periods for the long-term SMA of the median price. Defaults to 34.21
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 AO. 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