mirror of
https://github.com/wassname/catalyst.git
synced 2026-10-01 12:01:05 +08:00
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:
1 parent
ac6a15f20a
commit
6f9a03aa76
1 file changed
+3
-7
@@ -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
|
||||
|
||||
Reference in new issue
Block a user