Know Sure Thing (KST)
Calculate the Know Sure Thing (KST) for a given price series.
The Know Sure Thing is a momentum oscillator developed by Martin Pring that combines four smoothed Rate of Change series, each calculated over a progressively longer lookback period, into a single weighted sum. Smoothing each Rate of Change with a Simple Moving Average before combining them reduces noise, while the increasing weights on the longer lookback periods give more influence to the more significant, longer-term price cycles. A signal line (a Simple Moving Average of the KST itself) is used to spot crossovers, in the same way the MACD line is compared to its signal line.
The formula is as follows:
\[\operatorname{RCMA}(i) = \operatorname{SMA}(\operatorname{ROC}(\text{Close},\; \text{roc\_windows} \left[i\right]),\; \text{sma\_windows} \left[i\right])\] \[\text{KST} = \operatorname{Sum}(\operatorname{RCMA}(i) \cdot \text{weights} \left[i\right]) \text{for} i = 1..4\] \[\text{Signal Line} = \operatorname{SMA}(\text{KST},\; \text{signal\_window})\]Also known as: KST, Pring’s Know Sure Thing, Summed Rate of Change.
No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Know Sure Thing (KST) for you. Just ask in plain English.
Calculate the Know Sure Thing (KST) in Python
The Know Sure Thing (KST) is available in the Technicals module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_know_sure_thing as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(tickers=["AAPL", "MSFT"])
toolkit.technicals.get_know_sure_thing().xs("AAPL", level=1, axis="columns")
Parameters
get_know_sure_thing accepts the following parameters:
- period (str, optional): The time period to consider for historical data. Can be “daily”, “weekly”, “quarterly”, or “yearly”. Defaults to “daily”.
- close_column (str, optional): The column name for closing prices in the historical data. Defaults to “Adj Close”.
- roc_windows (list[int] | None, optional): The four lookback periods used for the underlying Rate of Change calculations. Defaults to the standard [10, 15, 20, 30].
- sma_windows (list[int] | None, optional): The four Simple Moving Average smoothing periods applied to each Rate of Change series. Defaults to the standard [10, 10, 10, 15].
- weights (list[int] | None, optional): The four weights applied to each smoothed Rate of Change series before summing. Defaults to the standard [1, 2, 3, 4].
- signal_window (int, optional): Number of periods for the Simple Moving Average of the KST used as the signal line. Defaults to 9.
- rounding (int | None, optional): The number of decimals to round the results to. Defaults to 4.
- growth (bool, optional): Whether to calculate the growth of the KST and Signal Line. Defaults to False.
- lag (int | list[int], optional): The lag to use for the growth calculation.
- standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False. Defaults to 1.
Related Momentum Indicators
The Technicals module page introduces the module, and the sidebar lists all of its functions.