diff --git a/zipline/finance/performance.py b/zipline/finance/performance.py index 5a2aeaef..f8380ae9 100644 --- a/zipline/finance/performance.py +++ b/zipline/finance/performance.py @@ -247,12 +247,12 @@ class PerformanceTracker(object): self.cumulative_performance.update_last_sale(event) self.todays_performance.update_last_sale(event) - - def handle_market_close(self): #calculate performance as of last trade self.cumulative_performance.calculate_performance() self.todays_performance.calculate_performance() + def handle_market_close(self): + # add the return results from today to the list of DailyReturn objects. todays_date = self.market_close.replace(hour=0, minute=0, second=0) todays_return_obj = risk.DailyReturn( @@ -503,7 +503,7 @@ class PerformancePeriod(object): 'capital_used' : self.period_capital_used, 'starting_value' : self.starting_value, 'starting_cash' : self.starting_cash, - 'ending_cash' : self.ending_cash, + 'cash' : self.ending_cash, 'portfolio_value' : self.ending_cash + self.ending_value, 'cumulative_capital_used' : self.cumulative_capital_used, 'max_capital_used' : self.max_capital_used,