可参考下面实现:
F = 0.02
t = table(take(`a`b`c`d`e ,100) as sym, rand(100.0,100) as bidPrice)
tclean = select sym,bidPrice,move(log(bidPrice / mavg(bidPrice,3)),1) as? ln from t?
def cleanFun(F,x,y) : iif(abs(x) > F, y,x)
tclean[`clean] = eachPre(cleanFun{F}, tclean[`ln])
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…