mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-04 07:50:08 +08:00
ENH: Don't trigger AssetDateBounds for orders of 0 shares.
This commit is contained in:
@@ -297,6 +297,10 @@ class AssetDateBounds(TradingControl):
|
||||
Fail if the algo has passed this Asset's end_date, or before the
|
||||
Asset's start date.
|
||||
"""
|
||||
# If the order is for 0 shares, then silently pass through.
|
||||
if amount == 0:
|
||||
return
|
||||
|
||||
normalized_algo_dt = pd.Timestamp(algo_datetime).normalize()
|
||||
|
||||
# Fail if the algo is before this Asset's start_date
|
||||
|
||||
Reference in New Issue
Block a user