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

Function IF

MyTT.py:27–28  ·  view source on GitHub ↗
(S_BOOL,S_TRUE,S_FALSE)

Source from the content-addressed store, hash-verified

25 return pd.Series(S).rolling(N).std(ddof=0).values
26
27def IF(S_BOOL,S_TRUE,S_FALSE): #序列布尔判断 res=S_TRUE if S_BOOL==True else S_FALSE
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

Callers 5

EVERYFunction · 0.85
EXISTFunction · 0.85
CROSSFunction · 0.85
DMIFunction · 0.85
VRFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected