Accumulated returns now start at 1 instead of 0

This commit is contained in:
Javier Rodríguez Chatruc
2020-01-08 16:24:49 -03:00
parent 3de145c5bf
commit 29b31113d4
+1 -1
View File
@@ -72,7 +72,7 @@ class Backtest:
bar.update()
self.balance['% change'] = self.balance['capital'].pct_change()
self.balance['accumulated return'] = (1.0 + self.balance['% change']).cumprod() - 1
self.balance['accumulated return'] = (1.0 + self.balance['% change']).cumprod()
return self.trade_log