1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-03 02:50:58 +08:00

fix black

This commit is contained in:
wangwenxi.handsome
2021-07-26 11:25:14 +00:00
parent c202a4b1e6
commit 4924717276

View File

@@ -358,12 +358,12 @@ class Indicator:
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(