(AP) -- The S&P 500 finished with its first weekly gain in four weeks Friday as investors welcomed a thaw in the punishing trade war between the U.S. and China.
After two days of negotiations in Washington, the U.S. agreed to suspend a planned hike in tariffs on $250 billion of Chinese goods that had been set to kick in Tuesday. Beijing, meanwhile, agreed to buy $40 billion to $50 billion in U.S. farm products.
Word of the trade concessions filtered out in the last half-hour of trading and pushed the Dow Jones Industrial Average 517 points higher, though the momentum faded near the close.
"The market is welcoming any progress here, because (trade) has been the biggest overhang on growth," said Ben Phillips, chief investment officer at EventShares. "Any sort of deal, even if it's a super light, mini-deal, still gets the market constructive and saying, 'OK, we're moving in the right direction.'"
The S&P 500 index closed higher for the third-straight day, adding 32.14 points, or 1.1%, to 2,970.27. Earlier it had been up 1.9%. The Dow rose 319.92 points, or 1.2%, to 26,816.59.
The Nasdaq gained 106.26 points, or 1.3%, to 8,057.04. The Russell 2000 index of smaller company stocks outpaced the broader market, climbing 26.54, or 1.8%, to 1,511.90. The indexes all notched gains for the week.
Treasury yields rose as investors felt less need for safety and dumped bonds. The yield on the 10-year Treasury, a benchmark for mortgages and many other kinds of loans, jumped to 1.73% from 1.65% late Thursday.
The rally got going early, reflecting optimism among investors that Washington and Beijing would reach at least a limited deal on trade. The U.S.-China trade dispute has been a drag on economic growth and slowed manufacturing around the world.
Investors got encouragement from President Donald Trump, who said "Good things are happening," before meeting with Chinese Vice Premier Liu He for trade talks at the White House.
Later in the day, after emerging from the meeting to announce the partial trade deal, Trump told the Chinese delegation "You're very tough negotiators."
The White House said the two sides made some progress on the thornier issues, including China's lax protection of foreign intellectual property. But more progress will have to be made on key differences in later negotiations, including U.S. allegations that China forces foreign countries to hand over trade secrets in return for access to the Chinese market.
Markets around the world have swung sharply on every morsel of progress or dissonance dribbling out about the U.S.-China trade war.
The concessions agreed upon by the U.S. and China Friday mark a sharp turnaround after expectations were lowered earlier in the week when the U.S. blacklisted a group of Chinese technology companies over alleged human rights violations.
The Trump administration has already raised tariffs on more than $360 billion worth of Chinese imports, but the stakes were set to rise. The U.S. had planned to raise tariffs on $250 billion in Chinese imports from 25% to 30% Tuesday. Those are now suspended. But the two sides did not mention tariffs on $160 billion of goods scheduled for Dec. 15.
Technology stocks, which often do lots of business with China, helped power the indexes higher Friday. Apple climbed 2.7%, and edged ahead of Microsoft as the most valuable company in the S&P 500. Broadcom added 2.4%.
Industrial stocks also notched solid gains. Caterpillar climbed 4.7% and farm equipment maker Deere gain 1.9%.
The jump in bond yields helped send bank stocks higher on expectations of bigger profits for making loans. JPMorgan Chase rose 1.7%, and Bank of America gained 1.6%.
Stocks jumped across Europe on hopes that the United Kingdom and European Union can reach a trade deal ahead of London's pending exit from the bloc. The German DAX surged 2.9%, while the CAC 40 in France jumped 1.7%. The FTSE 100 in London rose 0.8%, held back in part by a stronger British pound, which adds pressure on British exporters.
A missile strike on an Iranian tanker revived concerns about oil supplies and pushed energy prices higher. The explosion follows other attacks earlier this year on tankers in the Persian Gulf, through which about 20% of all oil traded worldwide passes.
Benchmark crude oil rose $1.15 to settle at $54.70 a barrel. Brent crude oil, the international standard, gained $1.41 to close at $60.51 a barrel. The rise in energy prices lifted oil and energy services companies. Exxon rose 1.1% and Schlumberger climbed 4.5%.
Fastenal surged 17.2% after the maker of fasteners and other industrial products reported surprisingly good first quarter profit and revenue. The company reported solid growth from its industrial vending and onsite services businesses.
Newmont Goldcorp was among the biggest decliners in the S&P 500 after gold prices fell $12.10, or 0.8%, to $1,482.70 per ounce, as investors shifted to more risky holdings. Newmont shares slid 3.4%.
Investors will be focusing on the health of Corporate America next week as companies begin reporting their results for the third quarter. Expectations are generally low, with analysts forecasting a drop of 4.1% from a year ago. The results, plus what CEOs say about their spending and revenue forecasts, should give a better picture of the economy's potential direction.
"You're going to see a little soft earnings (results) this quarter, is our expectation, largely on the manufacturing and global companies, but also a little softness on services," Phillips said.
In other commodities trading Friday, wholesale gasoline rose 2 cents to $1.64 per gallon. Heating oil climbed 4 cents to $1.96 per gallon. Natural gas fell 1 cent to $2.21 per 1,000 cubic feet.
Silver fell 6 cents to $17.46 per ounce and copper rose 1 cent to $2.62 per pound.
The dollar rose to 108.52 Japanese yen from 107.91 yen on Thursday. The euro strengthened to $1.1041 from $1.1006.