Stocks wavered between small gains and losses on Friday, struggling to maintain the momentum from a two-day winning streak following a week of volatile trading.

The Dow dropped 76 points, or 0.3 percent, to 23,045. The S&P 500 index fell 3 points, or 0.1 percent.

On Thursday the Dow erased a 600-point loss and finished with a gain of 260 points. The swing was indicative of the volatility that has gripped the stock market throughout December. Investors have been spooked by President Donald Trump's criticisms of the Federal Reserve, as well as issues such as slowing global growth.

Get Breaking News Delivered to Your Inbox

Mr. Trump has made the stock market a key barometer of his success, pointing to its strong performance earlier this year as proof his policies are working. As the stock market swooned, he has repeatedly attacked the U.S. central bank for raising interest rates, calling it his "biggest threat" and describing it as "out of control."

Friday witnessed its own fluctuations, though less dramatic than earlier in the month.

"It seems like convulsions in either direction have been the real norm for much of December and that's certainly been the case this week," said Eric Wiegand senior portfolio manager for Private Wealth Management at U.S. Bank. "The initial push higher and then seeing it subside a little bit is perhaps getting back to a little bit more of a normal environment, reflecting the reality that we have still a number of issues overhanging the market."

The new normal?

Volatility has been the norm in December as investors have grown worried that the testy U.S.-China trade dispute and higher interest rates would slow the economy, hurting corporate profits. The Dow has dropped 2 percent or more in six trading sessions and had a 5 percent gain on Wednesday.

The market's sharp downturn since October has intensified this month, erasing all its 2018 gains and nudging the S&P 500 closer to its worst year since 2008. Even with the two-day winning streak heading into Friday, the Dow, S&P 500 and Nasdaq are all down more than 9 percent for the month and stocks are on track for their worst December since 1931.

"The market is substantially cheaper than it was going into the fourth quarter, and we believe quite a bit of the price action we saw in the fourth quarter was more indicative of a panic and a recession," said Janet Johnston, portfolio manager at TrimTabs Asset Management. "And that sets up a good buying opportunity."

Energy stocks

Energy companies led a broad, late-afternoon slide despite a rise in oil prices. Smaller company stocks were outgaining the rest of the market. Cabot Oil & Gas slid 3.4 percent, while Hess lost 2.8 percent.

Separately, Wells Fargo rose 0.6 percent on news that the lender has agreed to pay $575 million in a national settlement with state attorneys general over its fake bank accounts scandal. The San Francisco-based bank said in 2015 that its employees opened millions of unauthorized bank accounts for customers in order to meet unrealistic sales goals.

Tesla, meanwhile, climbed 5.6 percent after naming two independent directors to its board under an agreement with federal regulators.