mirror of
https://github.com/wassname/catalyst.git
synced 2026-10-29 13:00:42 +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:
1 parent
e8f6b43f2b
commit
643d556482
1 file changed
+6
@@ -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