more business logic and tests for PortfolioManager