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:
| Date | Momentum | Squeeze |
|---|---|---|
| 2025-01-02 | -5.8277 | 1 |
| 2025-01-03 | -6.9897 | 1 |
| 2025-01-06 | -7.0133 | 1 |
| 2025-01-07 | -8.2058 | 1 |
| 2025-01-08 | -9.4557 | 1 |
| 2025-01-10 | -11.9872 | 1 |
| 2025-01-13 | -13.3968 | 1 |
| 2025-01-14 | -14.7269 | 1 |
| 2025-01-15 | -13.1827 | 1 |
| 2025-01-16 | -11.3985 | 1 |
| 2025-01-17 | -7.8886 | 2 |
| 2025-01-21 | -5.3931 | 1 |
| 2025-01-22 | -2.2888 | 1 |
| 2025-01-23 | 0.9937 | 1 |
| 2025-01-24 | 3.9148 | 0 |
| 2025-01-27 | 4.5904 | 1 |
| 2025-01-28 | 6.7965 | 1 |
| 2025-01-29 | 8.0636 | 1 |
| 2025-01-30 | 8.8564 | 1 |
| 2025-01-31 | 8.8437 | 1 |
| 2025-02-03 | 7.7740 | 1 |
| 2025-02-04 | 8.5110 | 1 |
| 2025-02-05 | 10.1144 | 1 |
| 2025-02-06 | 11.1626 | 1 |
| 2025-02-07 | 10.7142 | 1 |
| 2025-02-10 | 10.4493 | 1 |
| 2025-02-11 | 9.4230 | 1 |
| 2025-02-12 | 7.6483 | 2 |
| 2025-02-13 | 7.9856 | 2 |
| 2025-02-14 | 8.0472 | 2 |
| 2025-02-18 | 8.8584 | 1 |
| 2025-02-19 | 9.8670 | 1 |
| 2025-02-20 | 10.9225 | 1 |
| 2025-02-21 | 10.0830 | 1 |
| 2025-02-24 | 8.0486 | 1 |
| 2025-02-25 | 3.6133 | 1 |
| 2025-02-26 | 0.3483 | 0 |
| 2025-02-27 | -4.8884 | 0 |
| 2025-02-28 | -7.8819 | 0 |
| 2025-03-03 | -12.4805 | 0 |
| 2025-03-04 | -17.0194 | 0 |
| 2025-03-05 | -19.3216 | 0 |
| 2025-03-06 | -23.3716 | 0 |
| 2025-03-07 | -25.5629 | 0 |
| 2025-03-10 | -30.6927 | 0 |
| 2025-03-11 | -34.5283 | 0 |
| 2025-03-12 | -36.7169 | 0 |
| 2025-03-13 | -39.8881 | 0 |
| 2025-03-14 | -39.4716 | 0 |
| 2025-03-17 | -37.6215 | 0 |
| 2025-03-18 | -36.4801 | 0 |
| 2025-03-19 | -33.3020 | 0 |
| 2025-03-20 | -29.9285 | 0 |
| 2025-03-21 | -26.3122 | 0 |
| 2025-03-24 | -20.6038 | 0 |
| 2025-03-25 | -15.0217 | 0 |
| 2025-03-26 | -11.0481 | 1 |
| 2025-03-27 | -8.4577 | 1 |
| 2025-03-28 | -7.3824 | 1 |
| 2025-03-31 | -6.2829 | 1 |
| 2025-04-01 | -4.4934 | 1 |
| 2025-04-02 | -1.2434 | 2 |
| 2025-04-03 | -3.4309 | 1 |
| 2025-04-04 | -8.6733 | 0 |
| 2025-04-07 | -13.7464 | 0 |
| 2025-04-08 | -19.9211 | 0 |
| 2025-04-09 | -16.1045 | 0 |
| 2025-04-10 | -17.0707 | 0 |
| 2025-04-11 | -15.5093 | 0 |
| 2025-04-14 | -13.1293 | 0 |
| 2025-04-15 | -11.5347 | 0 |
| 2025-04-16 | -11.9073 | 0 |
| 2025-04-17 | -12.2402 | 0 |
| 2025-04-21 | -13.9979 | 0 |
| 2025-04-22 | -11.9999 | 0 |
| 2025-04-23 | -7.5058 | 1 |
| 2025-04-24 | -1.0861 | 1 |
| 2025-04-25 | 6.2074 | 1 |
| 2025-04-28 | 11.8998 | 1 |
| 2025-04-29 | 18.0378 | 1 |
| 2025-04-30 | 24.0109 | 1 |
| 2025-05-01 | 30.7721 | 1 |
| 2025-05-02 | 35.8535 | 0 |
| 2025-05-05 | 37.3039 | 0 |
| 2025-05-06 | 36.9498 | 0 |
| 2025-05-07 | 34.8786 | 0 |
| 2025-05-08 | 37.0048 | 0 |
| 2025-05-09 | 36.7186 | 0 |
| 2025-05-12 | 39.5289 | 0 |
| 2025-05-13 | 42.8437 | 0 |
| 2025-05-14 | 45.8666 | 0 |
| 2025-05-15 | 46.6519 | 0 |
| 2025-05-16 | 46.8296 | 0 |
| 2025-05-19 | 44.5020 | 0 |
| 2025-05-20 | 41.2273 | 0 |
| 2025-05-21 | 36.7674 | 0 |
| 2025-05-22 | 33.2013 | 0 |
| 2025-05-23 | 29.2760 | 0 |
| 2025-05-27 | 27.5120 | 0 |
| 2025-05-28 | 25.4081 | 0 |
| 2025-05-29 | 22.6003 | 0 |
| 2025-05-30 | 20.0594 | 0 |
| 2025-06-02 | 18.8996 | 0 |
| 2025-06-03 | 18.0436 | 0 |
| 2025-06-04 | 16.6044 | 0 |
| 2025-06-05 | 13.7116 | 0 |
| 2025-06-06 | 11.7361 | 0 |
| 2025-06-09 | 9.0002 | 1 |
| 2025-06-10 | 8.1519 | 1 |
| 2025-06-11 | 7.5573 | 1 |
| 2025-06-12 | 7.6900 | 1 |
| 2025-06-13 | 6.8132 | 1 |
| 2025-06-16 | 7.7898 | 1 |
| 2025-06-17 | 7.7799 | 0 |
| 2025-06-18 | 7.4222 | 0 |
| 2025-06-20 | 6.0021 | 1 |
| 2025-06-23 | 5.5603 | 1 |
| 2025-06-24 | 5.5615 | 1 |
| 2025-06-25 | 6.6755 | 1 |
| 2025-06-26 | 8.2400 | 1 |
| 2025-06-27 | 9.4826 | 0 |
| 2025-06-30 | 10.7243 | 0 |
| 2025-07-01 | 10.9560 | 0 |
| 2025-07-02 | 12.1193 | 0 |
| 2025-07-03 | 14.0336 | 0 |
| 2025-07-07 | 14.2423 | 0 |
| 2025-07-08 | 14.7544 | 0 |
| 2025-07-09 | 15.4913 | 0 |
| 2025-07-10 | 16.0634 | 0 |
| 2025-07-11 | 16.0209 | 0 |
| 2025-07-14 | 16.3041 | 0 |
| 2025-07-15 | 15.6769 | 0 |
| 2025-07-16 | 15.6256 | 0 |
| 2025-07-17 | 15.6318 | 0 |
| 2025-07-18 | 15.1041 | 0 |
| 2025-07-21 | 14.5120 | 0 |
| 2025-07-22 | 12.9791 | 0 |
| 2025-07-23 | 12.1172 | 0 |
| 2025-07-24 | 11.3220 | 0 |
| 2025-07-25 | 10.8720 | 0 |
| 2025-07-28 | 10.7183 | 0 |
| 2025-07-29 | 10.3780 | 0 |
| 2025-07-30 | 9.4571 | 0 |
| 2025-07-31 | 7.9938 | 0 |
| 2025-08-01 | 4.9966 | 1 |
| 2025-08-04 | 3.5948 | 1 |
| 2025-08-05 | 1.5503 | 1 |
| 2025-08-06 | 1.2732 | 1 |
| 2025-08-07 | 1.3055 | 1 |
| 2025-08-08 | 2.1487 | 1 |
| 2025-08-11 | 2.6673 | 1 |
| 2025-08-12 | 4.2151 | 1 |
| 2025-08-13 | 5.5444 | 0 |
| 2025-08-14 | 7.0287 | 0 |
| 2025-08-15 | 7.8258 | 0 |
| 2025-08-18 | 8.7500 | 0 |
| 2025-08-19 | 7.6122 | 0 |
| 2025-08-20 | 6.0738 | 0 |
| 2025-08-21 | 4.2430 | 0 |
| 2025-08-22 | 4.1827 | 1 |
| 2025-08-25 | 3.9904 | 1 |
| 2025-08-26 | 4.1234 | 1 |
| 2025-08-27 | 4.4510 | 1 |
| 2025-08-28 | 4.9605 | 0 |
| 2025-08-29 | 2.6713 | 1 |
| 2025-09-02 | 0.3519 | 1 |
| 2025-09-03 | -1.4880 | 1 |
| 2025-09-04 | -1.7419 | 1 |
| 2025-09-05 | -1.6952 | 2 |
| 2025-09-08 | -0.6407 | 1 |
| 2025-09-09 | 0.4848 | 1 |
| 2025-09-10 | 2.1980 | 1 |
| 2025-09-11 | 4.4485 | 1 |
| 2025-09-12 | 6.9463 | 1 |
| 2025-09-15 | 9.8227 | 0 |
| 2025-09-16 | 12.3362 | 0 |
| 2025-09-17 | 13.6446 | 0 |
| 2025-09-18 | 14.9989 | 0 |
| 2025-09-19 | 16.3107 | 0 |
| 2025-09-22 | 18.4724 | 0 |
| 2025-09-23 | 19.3378 | 0 |
| 2025-09-24 | 19.7050 | 0 |
| 2025-09-25 | 19.4317 | 0 |
| 2025-09-26 | 19.7568 | 0 |
| 2025-09-29 | 19.5048 | 0 |
| 2025-09-30 | 18.3560 | 0 |
| 2025-10-01 | 17.5737 | 0 |
| 2025-10-02 | 17.0912 | 0 |
| 2025-10-03 | 15.6427 | 0 |
| 2025-10-06 | 14.9761 | 0 |
| 2025-10-07 | 13.5599 | 0 |
| 2025-10-08 | 13.0289 | 0 |
| 2025-10-09 | 12.3304 | 0 |
| 2025-10-10 | 7.7666 | 1 |
| 2025-10-13 | 6.1451 | 1 |
| 2025-10-14 | 3.8297 | 1 |
| 2025-10-15 | 2.0809 | 2 |
| 2025-10-16 | 0.3769 | 2 |
| 2025-10-17 | -0.1075 | 2 |
| 2025-10-20 | 1.1956 | 2 |
| 2025-10-21 | 2.0968 | 2 |
| 2025-10-22 | 1.6943 | 2 |
| 2025-10-23 | 1.9674 | 2 |
| 2025-10-24 | 3.3381 | 2 |
| 2025-10-27 | 6.3382 | 1 |
| 2025-10-28 | 9.6121 | 0 |
| 2025-10-29 | 13.1454 | 0 |
| 2025-10-30 | 14.6764 | 0 |
| 2025-10-31 | 16.1955 | 0 |
| 2025-11-03 | 18.3991 | 0 |
| 2025-11-04 | 17.6630 | 0 |
| 2025-11-05 | 18.1548 | 0 |
| 2025-11-06 | 16.3620 | 0 |
| 2025-11-07 | 12.1134 | 0 |
| 2025-11-10 | 11.4134 | 0 |
| 2025-11-11 | 9.5566 | 0 |
| 2025-11-12 | 7.7069 | 0 |
| 2025-11-13 | 3.1673 | 1 |
| 2025-11-14 | -0.8468 | 1 |
| 2025-11-17 | -4.8782 | 1 |
| 2025-11-18 | -9.6284 | 0 |
| 2025-11-19 | -13.8834 | 0 |
| 2025-11-20 | -19.6119 | 0 |
| 2025-11-21 | -23.2357 | 0 |
| 2025-11-24 | -22.7003 | 0 |
| 2025-11-25 | -20.7347 | 0 |
| 2025-11-26 | -17.1195 | 1 |
| 2025-11-28 | -13.2818 | 1 |
| 2025-12-01 | -9.4678 | 1 |
| 2025-12-02 | -3.9366 | 1 |
| 2025-12-03 | 0.6175 | 1 |
| 2025-12-04 | 5.3645 | 1 |
| 2025-12-05 | 9.0808 | 0 |
| 2025-12-08 | 11.9617 | 0 |
| 2025-12-09 | 15.9733 | 0 |
| 2025-12-10 | 19.9400 | 0 |
| 2025-12-11 | 23.2114 | 0 |
| 2025-12-12 | 22.7566 | 0 |
| 2025-12-15 | 21.5370 | 0 |
| 2025-12-16 | 19.8509 | 0 |
| 2025-12-17 | 15.2604 | 0 |
| 2025-12-18 | 12.4475 | 0 |
| 2025-12-19 | 9.5461 | 0 |
| 2025-12-22 | 6.4964 | 1 |
| 2025-12-23 | 4.9716 | 1 |
| 2025-12-24 | 3.8112 | 1 |
| 2025-12-26 | 3.0720 | 1 |
| 2025-12-29 | 2.2261 | 1 |
| 2025-12-30 | 0.9902 | 1 |
| 2025-12-31 | -0.3707 | 1 |
250 rows
Parameters
get_squeeze_momentum accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
period | str | The 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_column | str | The 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" |
window | int | The number of periods of the bands, the channels, the range and the regression. Defaults to 20, as defined by Carter. | 20 |
num_std_dev | float | The number of standard deviations of the Bollinger Bands. Defaults to 2.0, as defined by Carter. | 3 |
keltner_multipliers | list[float] | None | The 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. | |
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
growth | bool | Whether to calculate the growth of the Momentum and Squeeze. Defaults to False. | True |
lag | int | list[int] | The lag to use for the growth calculation. Defaults to 1. | 4 |
standardize | bool | Whether 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_columns | str | list[str] | None | The 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