diff --git a/zipline/gens/tradesimulation.py b/zipline/gens/tradesimulation.py index 138a049f..b13b1ef8 100644 --- a/zipline/gens/tradesimulation.py +++ b/zipline/gens/tradesimulation.py @@ -153,10 +153,10 @@ class AlgorithmSimulator(object): if midnight_dt in algo.capital_changes: # process any capital changes that came overnight - perf_tracker.process_capital_changes( - algo.capital_changes[midnight_dt], - is_interday=True - ) + change = algo.capital_changes[midnight_dt] + log.info('Processing capital change of %s at %s' % + (change, midnight_dt)) + perf_tracker.process_capital_changes(change, is_interday=True) # Get the positions before updating the date so that prices are # fetched for trading close instead of midnight @@ -218,8 +218,11 @@ class AlgorithmSimulator(object): # process any capital changes that came between the last # and current minutes + change = algo.capital_changes[dt] + log.info('Processing capital change of %s at %s' % + (change, dt)) algo.perf_tracker.process_capital_changes( - algo.capital_changes[dt], + change, is_interday=False ) else: