stoch
Calculate the Stochastic Oscillator.
The Stochastic Oscillator measures where the close is in relation to the recent trading range. The values range from zero to 100. %D values over 75 indicate an overbought condition; values under 25 indicate an oversold condition. When the Fast %D crosses above the Slow %D, it is a buy signal; when it crosses below, it is a sell signal. The Raw %K is generally considered too erratic to use for crossover signals.
obb.technical.stoch(data: Union[list, dict, pd.DataFrame, List[pd.DataFrame], pd.Series, List[pd.Series], numpy.ndarray, Data, List[Data]], index: str = date, fast_k_period: int = 14, slow_d_period: int = 3, slow_k_period: int = 3)
Parameters
- Standard
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| data | List[Data] | The data to use for the Stochastic Oscillator calculation. | None | False |
| index | str | Index column name to use with data, by default "date". | date | True |
| fast_k_period | NonNegativeInt | The fast %K period, by default 14. | 14 | True |
| slow_d_period | NonNegativeInt | The slow %D period, by default 3. | 3 | True |
| slow_k_period | NonNegativeInt | The slow %K period, by default 3. | 3 | True |
Returns
The Stochastic Oscillator data.