You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
when passing a vector of expected returns with possibly negative values, as desired for the long short case, i guess max_return_value is still wrongly computed as the max(expected_returns), but, should be computed as max(weight_bounds[0] * neg_expected_returns) and max(weight_bounds[1]) * pos_expected_returns) for the differently signed parts of the expected_returns vector
399iftarget_return>self._max_return_value:
-->400raiseValueError(
401"target_return must be lower than the maximum possible return"402 )
404update_existing_parameter=self.is_parameter_defined("target_return")
405ifupdate_existing_parameter:
ValueError: target_returnmustbelowerthanthemaximumpossiblereturn
Expected behavior
A clear and concise description of what you expected to happen.
Code sample
Add a minimal reproducible example (see here).
Describe the bug
when passing a vector of expected returns with possibly negative values, as desired for the long short case, i guess max_return_value is still wrongly computed as the max(expected_returns), but, should be computed as max(weight_bounds[0] * neg_expected_returns) and max(weight_bounds[1]) * pos_expected_returns) for the differently signed parts of the expected_returns vector
Expected behavior
A clear and concise description of what you expected to happen.
Code sample
Add a minimal reproducible example (see here).
Operating system, python version, PyPortfolioOpt version
e.g MacOS 10.146, python 3.7.3, PyPortfolioOpt 1.2.6
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: