Skip to content

Commit

Permalink
fix black
Browse files Browse the repository at this point in the history
  • Loading branch information
wangwenxi-handsome committed Jul 26, 2021
1 parent c202a4b commit 4924717
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qlib/backtest/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,12 @@ def _get_base_vol_pri(
agg = pa_config.get("agg", "twap").lower()
price = pa_config.get("price", "deal_price").lower()

if(decision.trade_range is not None):
if(isinstance(decision.trade_range, IdxTradeRange)):
if decision.trade_range is not None:
if isinstance(decision.trade_range, IdxTradeRange):
raise TypeError(f"IdxTradeRange is not supported")
trade_start_time, trade_end_time = decision.trade_range.clip_time_range(
start_time=trade_start_time, end_time=trade_end_time
)
)

if price == "deal_price":
price_s = trade_exchange.get_deal_price(
Expand Down

0 comments on commit 4924717

Please sign in to comment.