Projection Oscillator

Calculate the Projection Oscillator of a price series: where the close lies within Widner’s Projection Bands, 0 on the lower band and 1 on the upper band.

Widner (1995) projects every high and low of the window forward to the latest period along the least-squares slope of the highs and of the lows over the window. The upper Projection Band is the highest of the projected highs and the lower band the lowest of the projected lows, so the bands follow the trend of the window rather than lying flat like the highest high and lowest low of the Stochastic Oscillator. The Projection Oscillator is the stochastic within those bands: high readings mean the close is near the top of its trend channel, and Widner reads turns from extreme readings as signals.

The formula is as follows:

\[\text{Slope High, Slope Low} = \text{the least-squares slopes of the highs and of the lows over the window}\] \[\text{Upper Band} = \max(\operatorname{High}(t - i) + i \cdot \text{Slope High}),\;\; i = 0,\; \ldots,\; \text{window} - 1\] \[\text{Lower Band} = \min(\operatorname{Low}(t - i) + i \cdot \text{Slope Low}),\;\; i = 0,\; \ldots,\; \text{window} - 1\] \[\text{Projection Oscillator} = \frac{\text{Close} - \text{Lower Band}}{\text{Upper Band} - \text{Lower Band}}\]

Also known as: PO, Projection Oscillator, Projection Bands, Widner.

Example · AAPL, MSFT · 2021 to 2025

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

from financetoolkit import Toolkit

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

toolkit.technicals.get_projection_oscillator()

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

Where did Apple and Microsoft trade within their projection bands in 2025?

Which returns:

Parameters

get_projection_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, at least 2. 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 Projection Oscillator. 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 Widner, M. (1995). “Signaling Change with Projection Bands.” Technical Analysis of Stocks & Commodities, 13(7), 275-281.
  • Library Shares similar logic as pandas-ta-classic’s po
Share