(AP) -- Stocks closed broadly higher on Wall Street for the second straight day Thursday as the U.S. and China kicked off a new round of negotiations in their long-running trade war.
Technology companies and banks led the rally as investors turned hopeful that the 13th round of trade talks will bring both sides closer to ending the costly conflict between the world's two biggest economies.
Traders were encouraged after President Donald Trump said he would meet with Chinese Vice Premier Liu He, who is leading Beijing's negotiating team, at the White House on Friday. He also said China wants to make a deal.
"It's really good that Trump is meeting him, because that increases the odds that some type of positive news may happen tomorrow," said Brad Bernstein, senior portfolio manager at UBS Global Wealth Management.
The S&P 500 rose 18.73 points, or 0.6%, to 2,938.13. The benchmark index had been up about 1% earlier in the day. The Dow Jones Industrial Average gained 150.66 points, or 0.6%, to 26,496.67. It had been up as much as 257 points.
The Nasdaq added 47.04 points, or 0.6%, to 7,950.78. The Russell 2000 index of smaller companies picked up 5.90 points, or 0.4%, to 1,485.36.
Major indexes in Europe closed broadly higher. Asian markets finished mixed.
Thursday's rally extended the S&P 500's gains from the day before, though the index remains on track for its fourth-straight weekly loss.
Markets have been jittery this week as investors assessed the potential for a breakthrough in the trade talks even as tensions escalated between Washington and Beijing. The U.S. blacklisted a group of Chinese technology companies over alleged human rights violations earlier this week. Meanwhile, China has clashed with the NBA and U.S. companies over free-speech issues.
The trade war has dragged on for 15 months, inflicting economic damage on both countries and raising fears of a global recession.
The Trump administration has slapped tariffs on more than $360 billion worth of Chinese imports. Tariffs on $250 billion worth of goods are set to increase to 30% from 25% on Oct. 15, and new tariffs will kick in on another $160 billion on Dec. 15. That would extend import taxes to virtually everything China ships to the United States. China has hit back by targeting about $120 billion in U.S. goods, focusing on farm products.
While representatives of both countries have failed to make progress in resolving the trade conflict, there is more pressure this time for them to reach some type of agreement, even if it's merely to keep additional tariffs from kicking in, Bernstein said.
"The stakes are higher now than they've been in most, if not all, of the recent negotiations, because there are tariffs that are scheduled to increase in five days on China, which will directly impact you and me, and the economy and the world," he said.
Thursday's gains helped the S&P 500 cut its losses after a volatile week of trading. The index is now down 0.5% for the week. On Wednesday it had been on track for 1.1% weekly loss.
Despite also recovering some lost ground, the Dow and Nasdaq are still on track to finish the week in the red.
Technology stocks helped lift the market Thursday. The sector is particularly sensitive to any news coming out of trade negotiations because many of the companies rely on China for sales growth and supply chains. Apple gained 1.3%. Chipmakers also rose. Intel added 1.2% and Nvidia picked up 1.3%.
Several big banks notched solid gains, including Bank of America, which climbed 2%. Banks benefited from rising bond yields, which allow banks to charge higher interest rates on loans. The yield on the 10-year Treasury rose to 1.67% from 1.58% late Wednesday, a big move.
Energy companies got a boost from a 1.8% increase in crude oil prices. Chevron rose 1.3%.
Safe-play sectors like real estate and utilities lagged the market.
Bed Bath & Beyond surged 21.6% after the struggling home goods chain named Target's former chief merchandising officer to be its new CEO and president. Mark Tritton, a 30-year-retail industry veteran, will assume the top role on Nov. 4 and succeed interim CEO Mary A. Winston.
Delta Air Lines fell 1.5% after the company gave investors a weak profit forecast for the fourth quarter. The fourth quarter is among the busiest for U.S. airlines because of holiday travelers. The dim outlook didn't weigh on other major airlines. JetBlue airways added 0.9% and United Airlines rose 1%.
Benchmark crude oil rose 96 cents to settle at $53.55 a barrel. Brent crude oil, the international standard, gained 78 cents to close at $59.10 a barrel. Wholesale gasoline rose 3 cents to $1.62 per gallon. Heating oil was unchanged at $1.92 per gallon. Natural gas fell 1 cent to $2.22 per 1,000 cubic feet.
Gold fell $11.30 to $1.494.80 per ounce, silver fell 21 cents to $17.52 per ounce and copper rose 5 cents to $2.61 per pound.
The dollar rose to 107.91 Japanese yen from 107.55 yen on Wednesday. The euro strengthened to $1.1006 from $1.0974.