mirror of
https://github.com/wassname/options_backtester.git
synced 2026-06-27 18:05:27 +08:00
Accumulated returns now start at 1 instead of 0
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user