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

Function STD

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

Source from the content-addressed store, hash-verified

22 return pd.Series(S).diff(N) #np.diff(S)直接删除nan,会少一行
23
24def STD(S,N): #求序列的N日标准差,返回序列
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)

Callers 1

BOLLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected