def GET_CLOSE_DATA_WEEK(self, context, security,isLastest=True,data={},dataCount=20,isSample=False):
df_data = ts.get_k_data(security, index=False, ktype='W').tail(dataCount) if isSample else ts.get_k_data(security, index=False, ktype='D').tail(dataCount*5)
if df_data.empty == True:
print "security:%s in context:%s NO GET_CLOSE_DATA_WEEK!" %(str(security),str(context))
return np.array([np.nan])
return self.GET_CLOSE_DATA_WEEK_DF(context, df_data, isSample)
评论列表
文章目录