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.

Know Sure Thing (KST) in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_know_sure_thing as shown below.

from financetoolkit import Toolkit

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

toolkit.technicals.get_know_sure_thing().xs("^GSPC", level=1, axis="columns").tail(5)

Or, after setting up the Finance Toolkit MCP, ask:

How did the Know Sure Thing indicator of the S&P 500 and its signal line move from 24 to 31 December 2025?

Which returns:

Date KST Signal Line
2025-12-24 0.1217 0.1297
2025-12-26 0.1149 0.1271
2025-12-29 0.1085 0.1233
2025-12-30 0.1088 0.1192
2025-12-31 0.1105 0.1166

Parameters

get_know_sure_thing accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe time period to consider for historical data. Can be “intraday”, “daily”, “weekly”, “monthly”, “quarterly” or “yearly”. Defaults to “daily”."weekly"
close_columnstrThe column name for closing prices in the historical data. Defaults to “Adj Close”."Close"
roc_windowslist[int] | NoneThe four lookback periods used for the underlying Rate of Change calculations. Defaults to the standard [10, 15, 20, 30].[9, 12, 18, 24]
sma_windowslist[int] | NoneThe four Simple Moving Average smoothing periods applied to each Rate of Change series. Defaults to the standard [10, 10, 10, 15].[6, 6, 6, 9]
weightslist[int] | NoneThe four weights applied to each smoothed Rate of Change series before summing. Defaults to the standard [1, 2, 3, 4].[1, 2, 3, 4]
signal_windowintNumber of periods for the Simple Moving Average of the KST used as the signal line. Defaults to 9.6
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 KST and Signal Line. 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
Share