NEW YORK -- U.S. stocks finished higher Thursday as optimism that the U.S. and Mexico can work out a deal before costly tariffs kick in next week helped power the market to its third straight gain.
A modest rally gained strength in the final hour of trading after Bloomberg reported that the U.S. was considering delaying a 5% tariff on Mexican goods that is set to go into effect on Monday.
The report came as the two countries held a second day of trade talks. Both sides claimed to be making progress, but President Donald Trump insisted earlier in the day that a "lot of progress" had to be made before he would call off the tariffs.
Investors have been anxious about escalating trade disputes between the U.S. and key trading partners, primarily China. Worries that the trade conflicts will drag on, stifling economic growth and hurting corporate profits, drove a monthlong sell-off in May. That derailed a market run that culminated with the benchmark S&P 500 setting an all-time high on April 30.
Stocks gave up more ground on Monday, but the market has bounced back and is on track to end the first week of June with solid gains.
"History says, as a result of such a good start to the year, don't be surprised that May is down, because it has been 60% of the time," said Sam Stovall, chief investment strategist at CFRA. "Yet, after a down May, we tend to get a reflex rally in June 100% of the time."
The S&P 500 index gained 17.34 points, or 0.6%, to 2,843.49. The Dow Jones Industrial Average rose 181.09 points, or 0.7%, to 25,720.66. It briefly climbed 260 points.
The Nasdaq composite reversed an early slide, adding 40.08 points, or 0.5%, to 7,615.55. The Russell 2000 index of smaller companies dropped 3.25 points, or 0.2%, to 1,503.54.
Stock indexes in Europe finished mixed.
Bond prices fell, pushing up the yield on the 10-year Treasury note to 2.13% from 2.12% late Wednesday.
U.S. and Mexican officials continued trade talks on Thursday in a bid to avert import tariffs that President Trump has threatened to impose unless Mexico acts to stem the flood of Central American migrants at America's southern border.
Lawmakers who have been in talks with both U.S. and Mexican officials said they were hopeful a deal could be reached to satisfy Trump, or at least delay the tariffs.
The trade dispute with Mexico and China threatens to stifle economic growth in the U.S. and globally. Uncertainty surrounding the trade negotiations has sent many traders fleeing to safer investments, like bonds and gold.
Still, investors have been in a buying mood most of this week because they're betting the Federal Reserve will cut interest rates this year. Fed Chairman Jerome Powell said Tuesday that the central bank would "act as appropriate" if the Trump administration's disputes with China and Mexico threatened U.S. economic expansion.
The government's May jobs report, due out Friday, could prove a key factor in what the Fed does next. A separate gauge of employment growth by ADP earlier this week showed a sharp slowdown in hiring last month. And economists surveyed by FactSet are projecting that the government will also report that hiring slowed last month.
"Investors would prefer a lighter side report for employment Friday because it would help keep the pressure off the Fed from certainly raising rates, but would give it an additional reason to lower rates," Stovall said.
Technology, consumer staples and financial stocks were among the big gainers Thursday. Chipmaker Advanced Micro Devices jumped 7.9%, Campbell Soup added 2.6% and American Express gained 1.1%.
Energy stocks recouped some ground following a broad sell-off a day earlier as crude oil prices rose. Occidental Petroleum rose 3.4% and Chevron added 2.6%.
A smattering of company earnings results brought on either severe punishment or lavish rewards from investors.
Arts and crafts retailer Michaels plunged 12.4% after sales at established stores fell more sharply than Wall Street had forecast. The company also trimmed its full year profit forecast.
Stitch Fix shares surged 14.7% after the online clothing styling service surprised investors with a fiscal third quarter profit.
Ciena shares jumped 26.8% after the developer of high-speed networking technology beat Wall Street's fiscal second quarter financial forecasts.
Oil prices rebounded after a steep sell-off a day earlier.
Benchmark U.S. crude gained 1.8% to settle at $52.90 a barrel. Brent crude oil, the international standard, closed 1.7% higher at $61.67 a barrel.
U.S. crude has fallen in five of the past six weeks amid signs that China's economic growth is slowing. Despite Thursday's increase, it remains 20.7% below its 2019 closing high of $66.30 in April. The slide puts U.S. crude in what Wall Street calls a bear market.
In other energy futures trading, wholesale gasoline rose 0.9% to $1.71 per gallon. Heating oil added 0.5% to $1.79 per gallon. Natural gas slid 2.3% to $2.32 per 1,000 cubic feet.
Gold rose 0.7% higher to $1,342.70 per ounce, silver added 0.8% to $14.91 per ounce and copper gained 1% to $2.65 per pound.
The dollar rose to 108.44 Japanese yen from 108.42 yen on Wednesday. The euro strengthened to $1.1273 from $1.1228.