The problem is that I need Investors to be sorted by their Portfolio Object, which has a total Value inside, which is constantly as he/she buys/sells stocks.
The "constantly changing" is the tricky part here.
AFAIK, is no efficient (i.e. O(logN) or better performance) data structure that can keep something sorted on a constantly changing value. All general purpose map API's I've come across assume that keys don't change while a mapping is a member of the map.
So, what I think you will have to use an event mechanism to track "change of value" events for the Portfolio
object. The event handler would need to atomically remove the Portfolio from the ordered mapping, make the change, and then add it back in again at the new position.
To implement the data structures you need either a pair of maps or a bidirectional map.