From 23ff65ad32a16a8efff48e2118a4ff81e831cb9f Mon Sep 17 00:00:00 2001 From: Eddie Hebert Date: Tue, 9 Apr 2013 11:59:28 -0400 Subject: [PATCH] MAINT: Convert per share cost to float during init. The cost value should always be a float. The per share calculation shouldn't be changed dramatically by being a float, (except for potential rounding errors), but change to so that PerShare and PerTrade are aligned. # Please enter the commit message for your changes. Lines starting --- zipline/finance/commission.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zipline/finance/commission.py b/zipline/finance/commission.py index b7737f05..58a3df3e 100644 --- a/zipline/finance/commission.py +++ b/zipline/finance/commission.py @@ -26,7 +26,7 @@ class PerShare(object): means three cents per share, which is a very conservative (quite high) for per share costs. """ - self.cost = cost + self.cost = float(cost) def calculate(self, transaction): """