I am trying to use solver in excel to find the max sharpe ratio for a portfolio of 5 stocks. I need to somehow set a constraint where the weights of all five stocks still add up to 1.
How would I set a constraint of this nature? I have been unable to enter weight1+weight2+weight3+weight4+weight5=1. Is there a way to do this? or another solution.
If you are indeed using these weights, add one more constraint Lets say cells A2:E2 contain the weights which you are referring in other cells as well then enter the formula =SUM(A2:E2) in F2 Add a constraint Solver->Constraints->Add->Cell reference F1, = , 1
Get Answers For Free
Most questions answered within 1 hours.