mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-02 13:21:51 +08:00
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
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user