The S&P 500 gained 0.6% on Friday but it wasn’t enough to wipe out the weekly loss. The minor decline was the first negative week after six weeks of gains.