Pyti相对强度指数在0到100之间时会产生负数。你知道吗
from pyti.relative_strength_index import relative_strength_index as rsi
import numpy as np
y=[1,3,5,2,6,2,8,5,5,6,7,1,78,3,7,3,67,3,563,4545,563,2,65,3,56,34,56,43,56,56,56,562343243,43,43,45,56,2,2356,4345,2,67,34,6,3,56,2343,56,45,56,67,56,67,23,4556,23,45,3,56,56,45,6767,1]
s= np.array(y)
rsssi = rsi(s,3)
print(rsssi)
pyti
中有一个bug:这会导致
gains
和losses
忽略实际收益/损失。另外,如果您考虑到这个库中的最后一次提交是一年前,您就会明白这个bug被修复的可能性非常小。你知道吗我建议您将粘贴this代码复制到项目中并更改以下行:
致:
相关问题 更多 >
编程相关推荐