corrected the investment vs sp500 function calculation, corrected dates in portfolios to prevent yahoo request barfing on invalid dates