Skip to content
This repository was archived by the owner on Feb 19, 2022. It is now read-only.
This repository was archived by the owner on Feb 19, 2022. It is now read-only.

Calculation for the Stochastic Oszillator is wrong. #5

Description

@HermanoCrespo

SOk = pd.Series((df['Close'] - df['Low']) / (df['High'] - df['Low']), name='SO%k')

is not the correct calculation of the stochastics %K

See here:
http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:stochastic_oscillator_fast_slow_and_full

%K = (Current Close - Lowest Low)/(Highest High - Lowest Low) * 100
%D = 3-day SMA of %K

Lowest Low = lowest low for the look-back period
Highest High = highest high for the look-back period
%K is multiplied by 100 to move the decimal point two places

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions