def GET_CLOSE_DAY(self, context, security, ref=0 ,data={}):
dataCount = ref + 1
df_data = ts.get_k_data(security, index=False, ktype='D').tail(dataCount)
if df_data.empty == True:
print "security:%s NO GET_CLOSE_DAY!" %(str(security))
return np.nan
if len(df_data['close']) < ref + 1:
return np.nan
return df_data['close'].values[-ref]
# ????????
评论列表
文章目录