Open jaredbroad opened 4 years ago
spy_pso.csv Columns: "SPY high" "SPY low" "SPY close" "PSO"
script:
import talib
import pandas as pd
history = pd.read_csv("https://github.com/QuantConnect/Lean/raw/master/Data/equity/usa/daily/spy.zip",
index_col=0, names=["open", "high", "low", "close", "volume"])
high = history.high
low = history.low
close = history.close
k, d = talib.STOCH(high, low, close,
fastk_period=8,
slowk_period=8,
slowd_period=8)
nsk = 0.1 * (k - 50)
ss = talib.EMA(talib.EMA(nsk.dropna(), 5), 5).dropna()
expss = np.exp(ss)
pso = ((expss - 1) / (expss + 1)).to_frame()
pso["high"] = high
pso["low"] = low
pso["close"] = close
pso = pso.iloc[:, [1, 2, 3, 0]]
pso.to_csv("spy_pso.csv", header=False)
I will take this one.
Expected Behavior
Support "Premier Stochastic Oscillator"
Actual Behavior
No implementation of "Premier Stochastic Oscillator"
Potential Solution
Implement "Premier Stochastic Oscillator"
Checklist
master
branch