quantOS-org / JAQS

http://www.quantos.org/jaqs/
Other
619 stars 343 forks source link

运行quantOS金融终端 案例报错 #64

Open yhmickey opened 5 years ago

yhmickey commented 5 years ago

lecture2_DemoStrategy报错:

Begin: DataApi login 18###9@tcp://data.quantos.org:8910 Already login as 182###9, skip init_from_config Initialize config success. Query data... Query data - query... NOTE: price adjust method is [post adjust] Query data - daily fields prepared. Query instrument info... Query adj_factor... Query groups (industry)...

ValueError Traceback (most recent call last)

in () 1 # 运行这里跑回测 ----> 2 test_save_dataview() 3 test_alpha_strategy_dataview() 4 test_backtest_analyze() in test_save_dataview() 14 15 dv.init_from_config(props, ds) ---> 16 dv.prepare_data() 17 18 # set the benchmark D:\QuantosFinanceTerminal\python\lib\site-packages\jaqs\data\dataview.py in prepare_data(self) 515 if group_fields: 516 print("Query groups (industry)...") --> 517 self._prepare_group(group_fields) 518 519 print("Data has been successfully prepared.") D:\QuantosFinanceTerminal\python\lib\site-packages\jaqs\data\dataview.py in _prepare_group(self, group_fields) 789 df = self.data_api.query_industry_daily(symbol=','.join(self.symbol), 790 start_date=self.extended_start_date_q, end_date=self.end_date, --> 791 type_=type_, level=level) 792 self.append_df(df, field, is_quarterly=False) 793 D:\QuantosFinanceTerminal\python\lib\site-packages\jaqs\data\dataservice.py in query_industry_daily(self, symbol, start_date, end_date, type_, level) 867 for sec, df in dic_sec.items()} 868 --> 869 df_ann_tmp = pd.concat({sec: df.loc[:, 'in_date'] for sec, df in dic_sec.items()}, axis=1) 870 df_value_tmp = pd.concat({sec: df.loc[:, 'industry{:d}_code'.format(level)] 871 for sec, df in dic_sec.items()}, D:\QuantosFinanceTerminal\python\lib\site-packages\pandas\core\reshape\concat.py in concat(objs, axis, join, join_axes, ignore_index, keys, levels, names, verify_integrity, copy) 210 keys=keys, levels=levels, names=names, 211 verify_integrity=verify_integrity, --> 212 copy=copy) 213 return op.get_result() 214 D:\QuantosFinanceTerminal\python\lib\site-packages\pandas\core\reshape\concat.py in __init__(self, objs, axis, join, join_axes, keys, levels, names, ignore_index, verify_integrity, copy) 243 244 if len(objs) == 0: --> 245 raise ValueError('No objects to concatenate') 246 247 if keys is None: ValueError: No objects to concatenate
hugo2046 commented 5 years ago

感觉完全不能用了...