(AP) -- Technology and health care companies led U.S. stocks broadly higher Thursday, setting the market on track to break a two-week losing streak.
Some encouraging economic data helped put investors in a buying mood, though trading volume was relatively subdued as markets reopened following the Independence Day holiday in the U.S.
Wall Street could be in for a bumpier ride Friday, when U.S. tariffs on billions of Chinese goods are set to kick in. Investors will also be watching out for the Labor Department's latest monthly report on jobs and wages.
"It feels like the market is responding to the stronger economic data and some easing of the trade tensions overnight and focusing a bit more on fundamentals and a bit less on the ongoing concerns about trade," said Christine Scalley, U.S. equity strategist at J.P. Morgan Private Bank.
The S&P 500 index rose 23.39 points, or 0.9 percent, to 2,736.61. The Dow Jones Industrial Average gained 181.92 points, or 0.8 percent, to 24,356.74. The Nasdaq composite added 83.75 points, or 1.1 percent, to 7,586.43. The Russell 2000 index of smaller-company stocks picked up 19.06 points, or 1.1 percent, to 1,679.48.
While uncertainty over U.S. trade policy has hung over the market for months, tensions intensified in recent weeks. The S&P 500 posted two consecutive weekly declines heading into this week.
On Friday the U.S. is set to impose a 25 percent tariff on $34 billion worth of Chinese imports. And China is expected to strike back with tariffs on a similar amount of U.S. exports.
The Trump administration has said it won't target an additional $16 billion worth of Chinese goods until it gathers further public comments. It's also identifying an additional $200 billion in Chinese goods for 10 percent tariffs, which could take effect if Beijing retaliates.
On Thursday in China, Commerce Ministry spokesman Gao Feng hit back at "threats and blackmail" ahead of the planned U.S. tariff hike. He added that China would be forced to fight back to protect its own interests.
The big question remains: how far will the two countries go in their dispute.
"The market tomorrow morning will be very focused on did the U.S. proceed -- which at this point it feels like they're going to -- and was there any reaction overseas from China," Scalley said.
Meanwhile, a German newspaper report suggested Thursday that the U.S. may propose reducing impending tariffs on auto imports from the European Union to zero.
Major European indexes surged on the report, which helped prime U.S. indexes for their solid start early Thursday.
Some encouraging U.S. economic data also gave traders something to cheer about. The Institute for Supply Management issued data indicating that U.S. service firms expanded at a surprisingly strong pace in June. Separately, payroll processor ADP said private U.S. employers added 177,000 in June. The Labor Department is due to release its June jobs report Friday.
Technology stocks, which lead all other sectors in the S&P 500 with an 11.3 percent gain this year, led the rally. Qorvo climbed 5.7 percent to $81.82.
Several health care sector stocks also helped lift the market. Celgene gained 2.2 percent to $80.39.
Benchmark U.S. crude dropped $1.20, or 1.6 percent, to settle at $72.94 per barrel in New York. Brent crude, used to price international oils, slid 85 cents, or 1.1 percent, to close at $77.39 per barrel in London.
The decline in oil prices weighed on some energy stocks. Marathon Oil dropped 2.7 percent to $20.70.
Bond prices were little changed. The yield on the 10-year Treasury held at 2.83 percent.
The dollar strengthened to 110.68 yen from 110.49 yen on Wednesday. The euro rose to $1.1680 from $1.1667.
Gold added $5.30 to $1,258.80 an ounce. Silver gained 5 cents to $16.10 an ounce. Copper fell 9 cents, or 3.1 percent, to $2.83 a pound.
In other energy futures trading, heating oil gained 1 cent to $2.18 a gallon. Wholesale gasoline added a penny to $2.13 a gallon. Natural gas fell 3 cents to $2.84 per 1,000 cubic feet.
Markets in Europe finished higher. Germany's DAX jumped 1.2 percent and France's CAC 40 climbed 0.9 percent. Britain's FTSE 100 gained 0.4 percent.
In Asia, markets ended the day mostly lower after China reaffirmed its determination to protect its interests in its rancorous trade dispute with Washington. Japan's Nikkei 225 index fell 0.8 percent, while Hong Kong's Hang Seng index closed 0.2 percent lower.