public static Portfolio Open(PortfolioId id, AccountType accountType, Money initialDeposit)
        {
            if (initialDeposit < MinimumPortfolioBalance)
            {
                throw new InvalidOperationException(String.Format("The intial deposit of {0} is lower than the require a minimum of {1}", initialDeposit, MinimumPortfolioBalance));
            }

            var portfolio = new Portfolio(id);
            portfolio.RaiseEvent(new PortfolioOpened());
            portfolio.OpenAccount(accountType);
            portfolio.CreditAccount(accountType, initialDeposit);

            return portfolio;
        }
 protected Account(Portfolio portfolio, AccountId identity)
     : base(portfolio, identity)
 {
 }
 public static Account OpenAccount(Portfolio portfolio, AccountType accountType)
 {
     var account = new Account(portfolio, new AccountId(accountType));
     return account;
 }