MAINT: Use return scalars in performance instead of object.

Remove another case of creating a DailyReturn object, in favor
of passing the return scalar directly to the risk module.
This commit is contained in:
Eddie Hebert
2013-10-02 15:57:00 -04:00
parent ac6a15f20a
commit 6f9a03aa76
+3 -7
View File
@@ -320,17 +320,13 @@ class PerformanceTracker(object):
self.cumulative_performance.update_dividends(todays_date)
self.todays_performance.update_dividends(todays_date)
todays_return_obj = zp.DailyReturn(
todays_date,
self.todays_performance.returns
)
self.returns[todays_date] = self.todays_performance.returns
# update risk metrics for cumulative performance
self.cumulative_risk_metrics.update(
todays_return_obj.date,
todays_return_obj.returns,
self.all_benchmark_returns[todays_return_obj.date])
todays_date,
self.todays_performance.returns,
self.all_benchmark_returns[todays_date])
# increment the day counter before we move markers forward.
self.day_count += 1.0