Rather than nesting classes, I'd move this into a separate file that inherits from `Portfolio` or is later mixed into `Portfolio`.