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