BUG: Capital change deltas rely on cash, not portfolio_value

The value of holdings is irrelevant when altering the
capital base of the current perf period.
This commit is contained in:
John Ricklefs
2016-09-01 15:19:55 -04:00
parent 615d1535f7
commit 5b1aa5ec55
2 changed files with 11 additions and 10 deletions
+1 -1
View File
@@ -858,7 +858,7 @@ class TradingAlgorithm(object):
if capital_change['type'] == 'target':
target = capital_change['value']
capital_change_amount = target - \
self.updated_portfolio().portfolio_value
self.updated_portfolio().cash
self.portfolio_needs_update = True
log.info('Processing capital change to target %s at %s. Capital '