做了一点常用的技术指标,方便以后查阅。
SMA (简单滑动平均)
1 | def SMA(price, n): |
RSI
1 | def RSI(close_price, n): |
KDJ
1 | def KDJ(series, n, a1, a2): |
W%R(威廉指数)
1 | def WR(series, n1, n2): |
EMA(指数滑动平均)
1 | def EMA(price, n): |
MACD
1 | def MACD(close_price, period1, period2, period3): |
Bollinger Band(布林带)
1 | def BBand(close_price, n, k): |