mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-27 18:04:12 +08:00
STY: Remove warning when ordering zero shares.
Many algorithms that use the new order methods like order_target() will legitimately try to order 0 shares many times. The printed warning at every turn is quite annoying and too verbose. We do not display it on Quantopian either so I'm removing it here as well.
This commit is contained in:
@@ -100,12 +100,7 @@ class Blotter(object):
|
||||
amount = int(almost_equal_to(amount))
|
||||
|
||||
# just validates amount and passes rest on to TransactionSimulator
|
||||
# Tell the user if they try to buy 0 shares of something.
|
||||
if amount == 0:
|
||||
zero_message = "Requested to trade zero shares of {psid}".format(
|
||||
psid=sid
|
||||
)
|
||||
log.debug(zero_message)
|
||||
# Don't bother placing orders for 0 shares.
|
||||
return
|
||||
elif amount > self.max_shares:
|
||||
|
||||
Reference in New Issue
Block a user