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

Function MA

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

Source from the content-addressed store, hash-verified

13def MIN(S1,S2): return np.minimum(S1,S2) #序列min
14
15def MA(S,N): #求序列的N日平均值,返回序列
16 return pd.Series(S).rolling(N).mean().values
17
18def REF(S, N=1): #对序列整体下移动N,返回序列(shift后会产生NAN)
19 return pd.Series(S).shift(N).values

Callers 14

Demo2.pyFile · 0.85
BIASFunction · 0.85
BOLLFunction · 0.85
PSYFunction · 0.85
CCIFunction · 0.85
ATRFunction · 0.85
BBIFunction · 0.85
DMIFunction · 0.85
TRIXFunction · 0.85
EMVFunction · 0.85
DPOFunction · 0.85
DMAFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected