Posted Feb 25, 2024
After running the backtest on the historical data, I obtained a final portfolio value of $1,218,449. This result indicates that the strategy was profitable
0
63

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)