Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yhmickey opened this issue May 17, 2019 · 1 comment
Open

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

yhmickey opened this issue May 17, 2019 · 1 comment

Comments

@yhmickey
Copy link

yhmickey commented May 17, 2019

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
Copy link

感觉完全不能用了...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants