Python量化分析,计算KDJ (使用如下方法计算与国内财经软件显示一致)
def calKdj(df): low_list = df['low'].rolling(9, min_periods=9).min() low_list.fillna(value=df['low'].expanding().min(), inplace=True) high_list = df['high'].rolling(9, min_periods=9).max() high_list.fillna(value=df['high'].expanding().max(), inplace=True) rsv = (df['close'] - low_list) / (high_list - low_list) * 100 df['K'] = pd.Series.ewm(rsv, com=2).mean() df['D'] = pd.Series.ewm(df['K'], com=2).mean() df['J'] = 3 * df['K'] - 2 * df['D'] return df
· Obsidian + DeepSeek:免费 AI 助力你的知识管理,让你的笔记飞起来!
· 分享4款.NET开源、免费、实用的商城系统
· 解决跨域问题的这6种方案,真香!
· 5. Nginx 负载均衡配置案例(附有详细截图说明++)
· Windows 提权-UAC 绕过
2021-02-03 opencv_java451.dll: Can't find dependent libraries 解决
2021-02-03 Java-Opencv(chromedriver) Forwarding newSession on session null to remote 解决方案