U.S. stocks rebounded after an early wobble Friday afternoon, building on gains from a two-day winning streak in a week of volatile trading. Gains in health care stocks and banks outweighed losses in energy companies, which fell despite a gain in the price of oil.

KEEPING SCORE: The S&P 500 index rose 14 points, or 0.6 percent, to 2,503 as of 2:20 p.m. Eastern Time. The Dow Jones Industrial Average gained 106 points, or 0.5 percent, to 23,245. The Nasdaq added 53 points, or 0.8 percent, to 6,632. The Russell 2000 index of smaller-company stocks rose 8 points, or 0.7 percent, 1,340.

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.

THE QUOTE: “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.”

VOLATILE WEEK: 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.

BETTING ON BANKS: Several big banks were trading higher. Bank of America gained 1 percent to $24.60. Wells Fargo rose 1.5 percent to $46.18 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 admitted in 2015 that its employees opened millions of unauthorized bank accounts for customers in order to meet unrealistic sales goals.

MORE OVERSIGHT: Tesla climbed 5.4 percent to $333.03 after naming two independent directors to its board under an agreement with federal regulators.

HOUSE OF PAIN: Homebuilders fell broadly in the morning after the National Association of Realtors said its pending home sales index fell last month as fewer Americans signed contracts to buy homes. Higher mortgage rates and prices are squeezing would-be buyers out of the market, especially in the West. The stocks mostly recovered by mid-afternoon. Beazer Homes USA was flat at $9.71 after being down more than 5 percent earlier.

ENERGY: Oil prices recovered after wavering in midmorning trading. Benchmark U.S. crude was up 1.5 percent to $45.29 a barrel in New York. Brent crude, used to price international oils, rose 1.3 percent to $53.40 a barrel in London.

Despite the rise in oil prices, energy sector stocks declined. Cabot Oil & Gas slid 3.2 percent to $23.01, while Newfield Exploration lost 0.8 percent to $14.39.

BOND YIELDS: Bonds prices rose early then leveled off. The yield on the 10-year Treasury was flat at 2.74 percent.

CURRENCY: The dollar declined to 110.41 yen from Thursday’s 110.74 yen. The euro weakened to $1.1436 from $1.1449.

MARKETS OVERSEAS: In Europe, Germany’s DAX rose 1.7 percent and France’s CAC 40 added 1.7 percent. London’s FTSE 100 gained 2.3 percent. Major indexes in Asia finished mostly higher. Tokyo’s Nikkei 225 shed 0.3 percent, while Hong Kong’s Hang Seng ended 0.1 percent higher. Seoul’s Kospi added 0.6 percent. India’s Sensex gained 1 percent. Benchmarks in Taiwan, New Zealand and Singapore also rose.