Eymeric Plaisant
df
containing the historical price data, as well as two tuples - roc_periods
and sma_periods
- that specify the periods to use for the rate of change and moving average calculations, respectively. It returns the same DataFrame with additional columns for each of the four ROC values, the four weighted moving averages, the KST, and the KSTS (the KST smoothed with a 9-period moving average).df['KST'] = ta.trend.kst(close=df['close'], roc1=10, roc2=15, roc3=20, roc4=30, window1=10, window2=10, window3=10, window4=15, fillna= True)