mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-09 09:01:52 +08:00
MAINT: Add empty values for risk metric calculated components.
eigen vales, covariance, etc. are not calculated until the first return is passed through, so initialize this values to None, so that `repr` and its ilk work on a freshly created `RiskMetricsIterative` object.
This commit is contained in:
@@ -543,6 +543,12 @@ class RiskMetricsIterative(RiskMetricsBase):
|
||||
self.benchmark_volatility = []
|
||||
self.algorithm_period_returns = []
|
||||
self.benchmark_period_returns = []
|
||||
|
||||
self.algorithm_covariance = None
|
||||
self.benchmark_variance = None
|
||||
self.condition_number = None
|
||||
self.eigen_values = None
|
||||
|
||||
self.sharpe = []
|
||||
self.sortino = []
|
||||
self.information = []
|
||||
|
||||
Reference in New Issue
Block a user