Forum Discussion
Find optimal percent
NoaHomeRun wrote: ``there should never be an option for the ideal sell to be 0``
With the SUMPRODUCT approach to finding the optimum, it is implicit in the fact that you will never have 0% for "highest%", presumably. Right?
OTOH, if you do allow for 0% for "highest%", the SUMPRODUCT approach will choose that only if that does indeed maximize the total% return. Any alternative would result in a "greater" loss (more negative). Why would you prefer that?
-----
With the Solver approach, a constraint like B1>=0.01 could be added.
No matter: As I already explained, Solver does not always find the optimum "sell at" percentage based on your algorithm.
JoeUser2004 Thank you for your suggestions. I think I figured out the problems with the $'s. The issue now, as you mentioned is that the answer becomes 0 if there is no way to sell the stocks for a gain. I would much rather the formula produce a solution that sells them for the least loss rather then 0. You mentioned that the solver approach could do this. Could you explain that further? I have never used solver before. Thanks. Attached is a copy of my worksheet.
- NoaHomeRunSep 26, 2021Copper Contributor
@Joe User actually, never mind, I figured out the solver solution. Thank you so much for all the help you have given me. If there is anything I can do for you don't hesitate to ask. Thanks