error checking added

error checking
-sell
if the quotes are zero continue with the rest of portfolios investments
if the buy quote is zero in the portfolio buying stocks -> appreciation
factor cannot divide 0
if percent invested is zero
-buy
they do not have enough cash to buy

-sellbuy
selling stock and then losing money where their current money goes to
zero or the total money in the end of the selling process is zero or
below
if percent invest is zero