Closed schalekamp closed 9 years ago
print weights [[ 2.77880107e-09] [ 3.20322848e-06] [ 1.54301198e-06] [ 9.99995251e-01]] <---- every time optimal_portfolio() runs the solver returns 99% weight on 1 asset
Yeah, this is because there are so few stocks used in this example. Basically, one will always be closest to the efficient frontier. Use more stocks or shrink the means to 1.
print weights [[ 2.77880107e-09] [ 3.20322848e-06] [ 1.54301198e-06] [ 9.99995251e-01]] <---- every time optimal_portfolio() runs the solver returns 99% weight on 1 asset