mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-14 16:26:55 +08:00
add back trade_val
This commit is contained in:
@@ -782,6 +782,7 @@ class Exchange:
|
|||||||
else:
|
else:
|
||||||
raise NotImplementedError("order type {} error".format(order.type))
|
raise NotImplementedError("order type {} error".format(order.type))
|
||||||
|
|
||||||
|
trade_val = order.deal_amount * trade_price
|
||||||
trade_cost = max(trade_val * cost_ratio, self.min_cost)
|
trade_cost = max(trade_val * cost_ratio, self.min_cost)
|
||||||
if trade_val <= 1e-5:
|
if trade_val <= 1e-5:
|
||||||
# if dealing is not successful, the trade_cost should be zero.
|
# if dealing is not successful, the trade_cost should be zero.
|
||||||
|
|||||||
Reference in New Issue
Block a user