fix negative comms

master
Dmitry Maylarov 4 years ago
parent 4d481aabfb
commit 7585d54eb0

@ -43,7 +43,7 @@ class PercentageCommisionScheme(bt.CommInfoBase):
) )
def _getcommission(self, size, price, pseudoexec): def _getcommission(self, size, price, pseudoexec):
return size * price * self.p.commission + 4 # 290rub/month return abs(size * price * self.p.commission) + 4 # 290rub/month
class Investing(bt.Strategy): class Investing(bt.Strategy):

Loading…
Cancel
Save