Closed MarcBoettinger closed 3 years ago
@MarcBoettinger
CLA
has weight bounds of 0 to 1. Is this also true for your analytical result?
Could you check whether EfficientFrontier
does a better job? e.g
from pypfopt import EfficientFrontier, plotting
ef = EfficientFrontier(mu, S)
fig,ax = plt.subplots()
plotting.plot_efficient_frontier(ef, ax=ax, show_assets=True)
# Return and std for the optimised min volatility portfolio
ef.min_volatility()
ret, std, _ = ef.portfolio_performance()
@MarcBoettinger @robertmartin8 Thats correct, Merton (1972) does have the no-short sale constraint.
For a valid comparison, one should specify the bounds as (-np.inf, np.inf)
when creating the EfficientFrontier
object.
Thanks, that's correct, my fault. The function efficient_frontier is constraint by default to weights in (0,1).
This can be closed.
Weights are constraint by default to (0,1) whereas Merton 1972 is unconstraint with weights sum to 1
Hi,
I just went through the Merton (1972) prove of the analytical efficient frontier and the minimum variance portfolio. We recall that the expected return of the minimum variance portfolio is (mu S^-1 transpose(1)) / (transpose(1) S^-1 1) and the volatility (1 / (transpose(1) S^-1 1) )^0.5.
Now I plotted the unconstraint efficient frontier for a 10 assets, 50 assets and 100 assets portfolio using pyporfolioopt.
The analytical minimum variance portfolio is on the efficient frontier with 10 assets but will deviate from it with an increasing number of assets. Now there is no doubt that the analytical value should be prefered. I checked on how returns are understood (simple returns) which could be a potential source of a difference.
My guess is the following: the efficient frontier in pyportfolioopt is derived by a minimization of sigma given mu. The algorithm stops too early when the number of assets is > 10. If that is true the impact is significant.
My code: