Portfolio management and optimization framework