RBC sees S&P 500 roughly flat through year-end