Price Zone Oscillator (PZO)

Calculate the Price Zone Oscillator (PZO): the share of the recent closes that moved up, from -100 to 100, which shows overbought and oversold levels and the direction of a trend.

The Price Zone Oscillator of Khalil and Steckler (2011) counts each close as positive when it closed above the previous close and as negative when it closed below, and divides the EMA of these signed closes by the EMA of the closes. It is thereby the share of the recent price action that went up, on a scale of -100 to 100: above 40 is overbought and below -40 oversold in a trendless market, while in a trend Khalil and Steckler use the crossings of zero, 15 and -5.

The formula is as follows:

\[\text{Signed Close} = \operatorname{sign}(\operatorname{Close}(t) - \operatorname{Close}(t - 1)) \cdot \operatorname{Close}(t)\] \[\text{PZO} = \frac{100 \cdot \operatorname{EMA}(\text{Signed Close},\; \text{window})}{\operatorname{EMA}(\text{Close},\; \text{window})}\]

Both EMAs run over the periods with a change, so they start on the same period.

Also known as: PZO.

Example · AAPL, MSFT · 2024 to 2025

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

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_price_zone_oscillator()

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

Was Apple or Microsoft overbought or oversold in 2025 according to the Price Zone Oscillator?

Which returns:

Parameters

get_price_zone_oscillator 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 EMAs. Defaults to 14.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 PZO. 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

  • Paper Khalil, W. & Steckler, D. (2011). “Entering The Price Zone.” Technical Analysis of Stocks & Commodities, 29(6), 28-35.
  • Library Shares similar logic as finta’s PZO
Share