Financial Time Series | ![]() ![]() |
Syntax
[spctk, spctd] = spctkd(fastpctk, fastpctd) [spctk, spctd] = spctkd([fastpctk fastpctd]) [spctk, spctd] = spctkd(fastpctk, fastpctd, dperiods, dmamethod) [spctk, spctd] = spctkd([fastpctk fastpctd], dperiods, dmamethod) skdts = spctkd(tsobj) skdts = spctkd(tsobj, dperiods, dmamethod) skdts = spctkd(tsobj, dperiods, dmamethod, ParameterName, ParameterValue, ...)
Arguments
Description
[spctk, spctd] = spctkd(fastpctk, fastpctd)
calculates the slow stochastics S%K and S%D. spctk
and spctd
are column vectors representing the respective slow stochastics.
[spctk, spctd] = spctkd([fastpctk fastpctd])
accepts a two-column matrix as input. The first column contains the fast stochastic F%K values, and the second contains the fast stochastic F%D values.
[spctk, spctd] = spctkd(fastpctk, fastpctd, dperiods, dmamethod)
calculates the slow stochastics, S%K and S%D, using the value of dperiods
to set the number of periods and dmamethod
to indicate the moving average method. The inputs fastpctk
and fastpctk
must contain the fast stochastics, F%K and F%D in column orientation. spctk
and spctd
are column vectors representing the respective slow stochastics.
Valid moving average methods for %D are Exponential ('e'
) and Triangular ('t'
). See tsmovavg
for explanations of these methods.
[spctk, spctd] = spctkd([fastpctk fastpctd], dperiods, dmamethod)
accepts a two-column matrix rather than two separate vectors. The first column contains the F%K values, and the second contains the F%D values.
skdts = spctkd(tsobj)
calculates the slow stochastics, S%K and S%D. tsobj
must contain the fast stochastics, F%K and F%D, in data series named PercentK
and PercentD
. skdts
is a financial time series object with the same dates as tsobj
. Within tsobj
the two series SlowPctK
and SlowPctD
represent the respective slow stochastics.
skdts = spctkd(tsobj, dperiods, dmamethod)
allows you to specify the length and the method of the moving average used to calculate S%D values.
skdts = spctkd(tsobj, dperiods, dmamethod, ParameterName,
ParameterValue, ...) accepts parameter name/parameter value pairs as input. These pairs specify the name(s) for the required data series if it is different from the expected default name(s). Valid parameter names are:
Parameter values are the strings that represent the valid parameter names.
Example
Compute the slow stochastics for Disney stock and plot the results.
load disney.mat dis_FastStoch = fpctkd(dis); dis_SlowStoch = spctkd(dis_FastStoch); plot(dis_SlowStoch) title('Slow Stochastics for Disney')
See Also
Reference
Achelis, Steven B., Technical Analysis From A To Z, Second Printing, McGraw-Hill, 1995, pg. 268 - 271
![]() | sortfts | std | ![]() |