how to optimize investment portfolio