MCPcopy Index your code
hub / github.com/mpquant/Ashare / SUM

Function SUM

MyTT.py:30–31  ·  view source on GitHub ↗
(S, N)

Source from the content-addressed store, hash-verified

28 return np.where(S_BOOL, S_TRUE, S_FALSE)
29
30def SUM(S, N): #对序列求N天累计和,返回序列
31 return pd.Series(S).rolling(N).sum().values
32
33def HHV(S,N): # HHV(C, 5) # 最近5天收盘最高价
34 return pd.Series(S).rolling(N).max().values

Callers 6

COUNTFunction · 0.85
EVERYFunction · 0.85
EXISTFunction · 0.85
DMIFunction · 0.85
VRFunction · 0.85
BRARFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected