Closed leafyoung closed 2 years ago
Good point: the reason why this happens is that the calculation of CDaR/CVaR introduce auxiliary parameters (self._alpha
, self._z
below. I don't see a clean way to calculate these for a given set of input weights via set_weights
, so I might just have to override the parent method and raise a NotImplementedError
def portfolio_performance(self, verbose=False):
mu = objective_functions.portfolio_return(
self.weights, self.expected_returns, negative=False
)
cdar = self._alpha + 1.0 / (len(self.returns) * (1 - self._beta)) * cp.sum(
self._z
)
cdar_val = cdar.value
ok. Thanks, Martin.
Describe the bug CDaR and CVaR uses cp solver in the
portfolio_performanace
to get the value of cdar and cvar. But they they do not work with manually set weights.Operating system, python version, PyPortfolioOpt version Linux, Python 3.10.4, PyPortfolioOpt 1.5.2