mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-03 19:10:58 +08:00
add back trade_val
This commit is contained in:
@@ -782,6 +782,7 @@ class Exchange:
|
||||
else:
|
||||
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)
|
||||
if trade_val <= 1e-5:
|
||||
# if dealing is not successful, the trade_cost should be zero.
|
||||
|
||||
Reference in New Issue
Block a user