mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-30 04:34:21 +08:00
MAINT: Uses copysign to extract order direction in FixedSlippage.
Uses copysign instead of division by fabs.
This commit is contained in:
@@ -176,7 +176,7 @@ class FixedSlippage(object):
|
||||
if np.allclose(amount, 0):
|
||||
return
|
||||
|
||||
direction = amount / math.fabs(amount)
|
||||
direction = math.copysign(1, amount)
|
||||
|
||||
txn = create_transaction(
|
||||
event.sid,
|
||||
|
||||
Reference in New Issue
Block a user