For me at least that's equivalent to solving the knapsack problem, but hey - if it's easy for you to optimize usage of absurd amounts of capital according to your utility function, then more power to you.
what i was trying to say is, that first you have to work insanely hard and/or have a huge amount of luck to be in a situation where you actually have that problem. Then when you have reached that, you can think about how to solve it, which i fould find a very nice problem to deal with.