Optimize portfolio grid