mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-02 19:03:42 +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:
@@ -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