diff --git a/qlib/backtest/executor.py b/qlib/backtest/executor.py index b99380c54..45c9082ed 100644 --- a/qlib/backtest/executor.py +++ b/qlib/backtest/executor.py @@ -348,13 +348,6 @@ class NestedExecutor(BaseExecutor): self.inner_strategy.alter_outer_trade_decision(trade_decision) return trade_decision - # def _get_inner_trade_decision(self, outer_trade_decision: BaseTradeDecision, inner_execute_result): - # # In some cases, the inner strategy can be skipped, but the inner executor should keep running - # if outer_trade_decision.empty() and self._skip_empty_decision: - # return EmptyTradeDecision(self.inner_strategy) - # return self.inner_strategy.generate_trade_decision(inner_execute_result) - # _inner_trade_decision = self._get_inner_trade_decision(trade_decision, _inner_execute_result) - def _collect_data(self, trade_decision: BaseTradeDecision, level: int = 0): execute_result = [] inner_order_indicators = [] diff --git a/qlib/backtest/order.py b/qlib/backtest/order.py index 1a88ded93..5e5e254e6 100644 --- a/qlib/backtest/order.py +++ b/qlib/backtest/order.py @@ -15,6 +15,7 @@ from qlib.backtest.utils import TradeCalendarManager import warnings import numpy as np import pandas as pd +import numpy as np from dataclasses import dataclass, field from typing import ClassVar, Optional, Union, List, Set, Tuple diff --git a/qlib/backtest/utils.py b/qlib/backtest/utils.py index 5c643df30..7cce7b8d0 100644 --- a/qlib/backtest/utils.py +++ b/qlib/backtest/utils.py @@ -164,6 +164,12 @@ class LevelInfrastructure(BaseInfrastructure): """level instrastructure is created by executor, and then shared to strategies on the same level""" def get_support_infra(self): + """ + Descriptions about the infrastructure + + sub_level_infra: + - **NOTE**: this will only work after _init_sub_trading !!! + """ return ["trade_calendar", "sub_level_infra"] def reset_cal(self, freq, start_time, end_time):