Closed renzonuz closed 4 years ago
Hi, In the case of a limited number of assets, Is there a way to put labels in plotted point? Thx a lot Roberto
@renzonuz what is wrong with the optimal portfolio?
@arbarbera Unfortunately not, however you might be able to take a look at the plotting code here and modify it to suit your needs.
@robertmartin8 the problem is that the optimizator gives me a Expected annual return: 7.3% and Annual volatility: 4.8%
however as you can see on the the optimal portfolio signaled with a red x is at Expected annual return: 0% and Annual volatility: 0%, do you know what the problem could be?
regards
Renzo
Hmm my mistake, that is indeed a bug. I wonder if it's got something to do with the time period - I've never tested the plots with a different frequency.
On Wed, 15 Jul 2020, 19:16 renzonuz, notifications@github.com wrote:
@robertmartin8 https://github.com/robertmartin8 the problem is that the optimizator gives me a Expected annual return: 7.3% and Annual volatility: 4.8%
however as you can see on the the optimal portfolio signaled with a red x is at Expected annual return: 0% and Annual volatility: 0%, do you know what the problem could be?
[image: image] https://user-images.githubusercontent.com/67790786/87538967-784be580-c673-11ea-9585-f5d1d9e6c417.png
regards
Renzo
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/robertmartin8/PyPortfolioOpt/issues/147#issuecomment-658709106, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACZ7ECOYZR4NO5234DD3FGTR3WF2FANCNFSM4OPZTTBA .
I think this has got to do with the numerical differences between CLA and max_sharpe
. Your max_sharpe
is currently plotting the constrained efficient frontier (since you have weight bounds at 15%), while CLA
is unconstrained.
If you try the below snippet, I think you'll see that it gives you something different to ef.portfolio_performance
. I suspect the Sharpe will be higher because it is unconstrained.
cla = CLA(mu, Sigma)
cla.max_sharpe()
cla.portfolio_performance(verbose=True)
I am still working on a way to plot the efficient frontier directly from the EfficientFrontier
object rather than CLA
, so in future these should correspond.
Hi im using the following code to graph the efficient frontier, however the graph i get its setting the optimal portfolio at a point that does not make sense
with this optimal port:
i get the following frontier and optimal port:
code used: