Although the S&P 500 ended the week higher than it began, investors may face more declines soon, said Sam Stovall, chief investment strategist at the independent research firm CFRA.

“You often don’t just have a straight ‘V” recovery,” he said. “You usually have a retest.”

Lighter trading volume than usual — typical for a holiday week — was responsible for some of the seesawing, but volatility has become a hallmark of trading lately as financial markets slid off their highs. Since October began, the S&P 500 has gained or lost 2 percent or more 12 times. In the six months before that, there were only two moves of that size.

Investors have been grappling with a slowing of global growth, corporate profits being squeezed by rising interest rates, a trade war with China and turmoil in the White House. A partial government shutdown that looks certain to continue into 2019, has complicated matters.

Oil prices, which are close to their lowest levels in more than a year, rose 1.6 percent on Friday, with the American benchmark ending the day at $45.33 a barrel.