Skip to content

Commit

Permalink
fix bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
Cuizi7 committed Nov 25, 2020
1 parent a6d2100 commit e90da12
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions rqalpha/data/bundle.py
Expand Up @@ -274,9 +274,7 @@ def __call__(self, *args, **kwargs):

STOCK_FIELDS = ['open', 'close', 'high', 'low', 'limit_up', 'limit_down', 'volume', 'total_turnover']
INDEX_FIELDS = ['open', 'close', 'high', 'low', 'volume', 'total_turnover']
# FUTURES_FIELDS = STOCK_FIELDS + ['basis_spread', 'settlement', 'prev_settlement']
FUTURES_FIELDS = STOCK_FIELDS + ['settlement', 'prev_settlement', 'open_interest']
# FUND_FIELDS = STOCK_FIELDS + ['acc_net_value', 'unit_net_value', 'discount_rate']
FUND_FIELDS = STOCK_FIELDS


Expand Down Expand Up @@ -333,7 +331,7 @@ def __call__(self, path, fields, **kwargs):
with h5py.File(path, 'r') as h5:
need_recreate_h5 = not self.h5_has_valid_fields(h5, fields)
if need_recreate_h5:
return GenerateDayBarTask(self._order_book_ids)(path, fields, **kwargs)
yield from GenerateDayBarTask(self._order_book_ids)(path, fields, **kwargs)
else:
with h5py.File(path, 'a') as h5:
for order_book_id in self._order_book_ids:
Expand Down

0 comments on commit e90da12

Please sign in to comment.