upadted portfolio logic