Closed nicktids closed 2 years ago
I’ll fix the notebook
Thanks
Yes Probably should not have closed when I found the error, as still a bug
Using a new ef to max_sharpe fixes the problem for me:
...
# Find and plot the tangency portfolio
ef2 = EfficientFrontier(mu, S)
ef2.max_sharpe()
ret_tangent, std_tangent, _ = ef2.portfolio_performance()
...
And, big thanks to Robert for the amazing work!
Describe the bug The last cell of Cookbook 2 does not run due to InstantiationError: The objective function was changed after the initial optimization. Please create a new instance instead.
Expected behavior I believe is the ef.max_sharpe() where a new objective function is being created
Code sample
Additional context Love the work and effort you have put in here, I'm trying to build an efficient portfolio for work for an asset allocation problem. To show a possible long term returns for a set asset allocation.
Tested on your Binder as well in case it was my environment https://hub.gke2.mybinder.org/user/robertmartin8-pyportfolioopt-1fz91ksx/notebooks/cookbook/2-Mean-Variance-Optimisation.ipynb