TTR (version 0.23-6)

KST: Know Sure Thing

Description

The Know Sure Thing (KST) is a smooth, summed, rate of change indicator. Developed by Martin Pring.

Usage

KST(price, n = c(10, 10, 10, 15), nROC = c(10, 15, 20, 30), nSig = 9,
  maType, wts = 1:NROW(n), ...)

Arguments

price

Price series that is coercible to xts or matrix.

n

A vector of the number of periods to use in the MA calculations.

nROC

A vector of the number of periods to use in the ROC calculations.

nSig

The number of periods to use for the KST signal line.

maType

Either:

  1. A function or a string naming the function to be called.

  2. A list with the first component like (1) above, and additional parameters specified as named components. See Examples.

wts

A vector the same length as n, of the weight for each period (need not sum to one).

Other arguments to be passed to the maType function in case (1) above.

Value

A object of the same class as price or a vector (if try.xts fails) containing the Know Sure Thing values.

Details

For each day (week, month, etc.), the KST calculates the ROC over several periods. Those ROCs are smoothed using the given moving averages, then multiplied by their respective weighting values. The resulting values are summed for each day (month, week, etc.).

References

The following site(s) were used to code/document this indicator: https://web.archive.org/web/20110715112957/http://www.pring.com/movieweb/daily_kst.htm https://web.archive.org/web/20100101162707/http://www.pring.com/movieweb/KST_MCM.htm

See Also

See EMA, SMA, etc. for moving average options; and note Warning section. See ROC for the rate-of-change function. See MACD for a generic oscillator.

Examples

Run this code
# NOT RUN {
data(ttrc)
kst <- KST(ttrc[,"Close"])

kst4MA <- KST(ttrc[,"Close"],
  maType=list(list(SMA),list(EMA),list(DEMA),list(WMA)))

# }

Run the code above in your browser using DataLab