Closed Originn closed 2 years ago
Hi @Originn,
You should be able to just call ef._max_return()
, as per below:
ef = EfficientFrontier(mu, S, weight_bounds=(None, None))
ef.add_objective(objective_functions.L2_reg)
print(ef._max_return())
Let met know if that doesn't work!
Hi,
I am quite new with PyPortfolioOpt and Python in general so please bare with me.
I am trying to print the value of self._max_return() in line 373 from efficient_frontier.py
if target_return > self._max_return(): raise ValueError( "target_return must be lower than the maximum possible return" )
Becasue if I input 12% target_return in my portfolio and run the following
I get the following ValueError "target_return must be lower than the maximum possible return"
As I don't want to guess the maximum possible return, I would like to print it. Is there a way to do it?
Thanks!