diff --git a/qlib/contrib/strategy/strategy.py b/qlib/contrib/strategy/strategy.py index 74df39f3e..550ff649d 100644 --- a/qlib/contrib/strategy/strategy.py +++ b/qlib/contrib/strategy/strategy.py @@ -7,7 +7,6 @@ import numpy as np import pandas as pd from ..backtest.order import Order -from ...utils import get_pre_trading_date from .order_generator import OrderGenWInteract @@ -390,11 +389,11 @@ class TopkDropoutStrategy(BaseStrategy, ListAdjustTimer): current_stock_list = current_temp.get_stock_list() value = cash * self.risk_degree / len(buy) if len(buy) > 0 else 0 - # open_cost should be considered in the real trading environment, while the backtest in evaluate.py does not consider it - # as the aim of demo is to accomplish same strategy as evaluate.py, so comment out this line + # open_cost should be considered in the real trading environment, while the backtest in evaluate.py does not + # consider it as the aim of demo is to accomplish same strategy as evaluate.py, so comment out this line # value = value / (1+trade_exchange.open_cost) # set open_cost limit for code in buy: - # check is stock supended + # check is stock suspended if not trade_exchange.is_stock_tradable(stock_id=code, trade_date=trade_date): continue # buy order