MyManGeorge
New Member
- Joined
- Jan 29, 2019
- Messages
- 1
Hello!
I'm using solver for stock portfolio optimization. The solver changes weights to achieve maximum expected return. I have set the following constraints: The portfolio should consist of at least 5 stocks (out of 10) and maximum weight assigned for one stock is 30%. In this case the solver gives the following weights to five stocks: 30%/30%/30%/9,9999%/0,0001%.
I want to add one more constraint which would be that if a stock is assigned to the portfolio, the minimum assigned weight is at least 5%. So what I want is for the solver to figure out that if the assigned weight is not 0% (excluding the stock from the portfolio), it should be at least 5%.
This is something I cannot figure out, so I'm turning to this forum for help.
Thank you!
George
I'm using solver for stock portfolio optimization. The solver changes weights to achieve maximum expected return. I have set the following constraints: The portfolio should consist of at least 5 stocks (out of 10) and maximum weight assigned for one stock is 30%. In this case the solver gives the following weights to five stocks: 30%/30%/30%/9,9999%/0,0001%.
I want to add one more constraint which would be that if a stock is assigned to the portfolio, the minimum assigned weight is at least 5%. So what I want is for the solver to figure out that if the assigned weight is not 0% (excluding the stock from the portfolio), it should be at least 5%.
This is something I cannot figure out, so I'm turning to this forum for help.
Thank you!
George