@jointquat
财务数据函数 get_fundamentals_sum_mean_value 里面的
qt_list = range(qt,0,-1)+range(4,0,-1)*(count/4+1) 这行是不是有问题。
range 不能直接乘以float ,并且 range和range不能+
贴上我的代码:
a = []
s = '4321'*math.floor(count/4+1)
for num in range(len(s)):
a.append(int(s[num]))
qt_list = np.hstack([array(range(qt, 0, -1)), a])
@JoinQuant-PM 您好,调用KDJ函数出现以下错误,是什么原因?谢谢!
Traceback (most recent call last):
File "kuanke/user_space.py", line 148, in exec_msg
return getattr(self, func)(*msg['args'], **msg['kwargs'])
File "kuanke/user_space.py", line 308, in handle_data
self.func_handle_data(self.user_context, user_space_api.SecuritiesData(context.current_dt))
File "user_code.py", line 172, in handle_data
do_handle_data(context,data)
File "/home/server/y/envs/kuanke/lib/python2.7/site-packages/line_profiler.py", line 99, in wrapper
result = func(*args, **kwds)
File "user_code.py", line 180, in do_handle_data
postion_open(context,data)
File "/home/server/y/envs/kuanke/lib/python2.7/site-packages/line_profiler.py", line 99, in wrapper
result = func(*args, **kwds)
File "user_code.py", line 254, in postion_open
k, d, j = g.fu.KDJ(stock)
File "FqmUtility.py", line 322, in KDJ
for stock in security_list:
TypeError: iteration over non-sequence