From 37a8bda4b249fee1bfec8d439936d8d1b971ccd8 Mon Sep 17 00:00:00 2001 From: fawce Date: Fri, 6 Apr 2012 22:31:35 -0400 Subject: [PATCH] fixed bogus initial portfolio value (should be zero). --- zipline/finance/performance.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/zipline/finance/performance.py b/zipline/finance/performance.py index 7b8211cd..56a9ead8 100644 --- a/zipline/finance/performance.py +++ b/zipline/finance/performance.py @@ -166,15 +166,23 @@ class PerformanceTracker(): self.result_stream = None self.last_dict = None + # this performance period will span the entire simulation. self.cumulative_performance = PerformancePeriod( + # initial positions are empty {}, - self.capital_base, + # initial portfolio positions have zero value + 0, + # initial cash is your capital base. starting_cash = self.capital_base ) - + + # this performance period will span just the current market day self.todays_performance = PerformancePeriod( + # initial positions are empty {}, - self.capital_base, + # initial portfolio positions have zero value + 0, + # initial cash is your capital base. starting_cash = self.capital_base )