Modest rise gives stocks a third straight week of gains

Consumer staples and health care stocks were among the biggest risers as investors assessed the latest company earnings and economic news.

After several weeks speculating about the implications of a slowdown in China and the timing of an interest rate increase by the Federal Reserve, traders are squarely tuned into company earnings as they hunt for insight into how the global economy is doing.

“That’s what the market is focused on,” said Quincy Krosby, a market strategist at Prudential Financial. “Are we seeing a pickup in demand overseas and in the United States, and if so, which sectors? That’s what this is about.”