solver problem with Stock portfolio

lirongr1996

New Member
Joined
Apr 17, 2021
Messages
1
Office Version
  1. 2013
Platform
  1. Windows
Hi,
I am trying to optimize the stock portfolio.
I have 12 stocks and $ 1 million.
The constraints:
1. I need choose between 4-8 stocks to the portfolio.
2. The weights of the stocks will be between 0.1 to 0.4.
3. Sharpe ratio need will be small equal to 1.0
4. Will be at least 100000 cash
5. can be taken a loan up to 50

How can I make the solver choose 4-8 stocks with the constraint of the weights will be at least 0.1? That it will be zeros in some wieghts who do not in the portfolio.

I ave the constraints:
1. binary variable for each stocks.
2. variable for each stocks.
3. the constraints for choose between 4-8 socks with the binary variables.
4.The sum of the variables represent the weights will be 1
5. The variable represent the weights will be Small equal to the binary variables- I thought that will be help for fill zeros in the stocks that do not int the portfolio.
6. The sum of the variables for each stocks minus the variable of the cash will be small equal to milion and a half dollar.

Thank you for the help.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: solver problem with Stock portfolio- two constraints collides [SOLVED]
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top