The S&P 500 posted four straight days of gains before inching down on Friday. The index ultimately finished the week up 1.6%, marking its fifth weekly gain in the past six weeks.