From 40001f3509936266d1e4e424f68606f241e88896 Mon Sep 17 00:00:00 2001 From: Thomas Wiecki Date: Mon, 2 Jun 2014 15:50:21 +0200 Subject: [PATCH] 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. --- zipline/finance/blotter.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/zipline/finance/blotter.py b/zipline/finance/blotter.py index 0dc5e54d..49999655 100644 --- a/zipline/finance/blotter.py +++ b/zipline/finance/blotter.py @@ -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: