Squeeze Momentum (TTM Squeeze)

Calculate the Squeeze Momentum (TTM Squeeze): whether the Bollinger Bands lie inside the Keltner Channels (a squeeze of volatility) and the momentum that shows the direction of the breakout.

The squeeze compares two volatility bands around the same simple average of the close: Bollinger Bands, which follow the standard deviation, and a Keltner Channel, which follows the average True Range. When the Bollinger Bands contract inside the Keltner Channel, volatility is unusually low and the market is “in a squeeze”. Carter trades the release of the squeeze (the first period the bands leave the channel) in the direction of the momentum, LazyBear’s linear regression of the close relative to the middle of its recent range and its average.

The formula is as follows:

\[\text{Middle} = \operatorname{SMA}(\text{Close},\; \text{window})\] \[\text{Bollinger Bands} = \text{Middle} \;\pm \;\text{num\_std\_dev} \cdot \operatorname{StdDev}(\text{Close},\; \text{window})\] \[\text{Keltner Channel}(m) = \text{Middle} \;\pm m \cdot \operatorname{SMA}(\text{True Range},\; \text{window})\] \[\text{Squeeze} = \text{the number of} \;\text{keltner\_multipliers} \;m \;\text{with the Bollinger Bands inside Keltner Channel}(m)\] \[\text{Momentum} = \text{Linear Regression}\left(\text{Close} - \frac{\frac{\text{Highest High} + \text{Lowest Low}}{2} + \text{Middle}}{2},\; \text{window}\right)\]

With the default multipliers 2, 1.5 and 1 (the wide, normal and narrow channels of the TTM Squeeze Pro), the Squeeze is 0 without a squeeze and 1, 2 or 3 for a low, normal or high compression. Carter’s original squeeze (a Keltner Channel of 1.5) is on from 2; a single Keltner multiplier of 1.5 returns it as 1 (on) or 0 (off).

Also known as: TTM Squeeze, Squeeze Pro, SQZ, SQZMOM, squeeze momentum indicator.

Example · QQQ · 2025

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

from financetoolkit import Toolkit

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

toolkit.technicals.get_squeeze_momentum().xs("QQQ", level=1, axis="columns")

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

When was the Invesco QQQ ETF in a volatility squeeze in 2025, and which way did its momentum point?

Which returns:

Parameters

get_squeeze_momentum 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”, in which case the open, high and low prices are adjusted for dividends in the same way."Close"
windowintThe number of periods of the bands, the channels, the range and the regression. Defaults to 20, as defined by Carter.20
num_std_devfloatThe number of standard deviations of the Bollinger Bands. Defaults to 2.0, as defined by Carter.3
keltner_multiplierslist[float] | NoneThe widths, in average True Ranges, of the Keltner Channels the Bollinger Bands are compared with. Defaults to None, which uses [2.0, 1.5, 1.0], as in TA-Lib’s SQZMOM.
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 Momentum and Squeeze. 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 Carter, J.F. (2005). “Mastering the Trade.” McGraw-Hill, chapter 11.
  • Paper LazyBear (2014). “Squeeze Momentum Indicator.” TradingView script.
  • Library Referenced against TA-Lib’s SQZMOM
  • Library Referenced against pandas-ta-classic’s squeeze
  • Library Shares similar logic as pandas-ta-classic’s squeeze_pro
  • Library Shares similar logic as finta’s SQZMI
Share