(AP) -- Stocks rose on Wall Street Thursday after the U.S. and China took steps to ease tensions in their costly trade war, putting investors in a buying mood.
Technology, financial and consumer-focused stocks helped power the modest rally, which extended the market's solid gains from the day before despite losing some momentum in the final hour of trading. The benchmark S&P 500 index closed within 0.6% of its all-time high set July 26.
The U.S. agreed to delay another round of tariffs on Chinese imports by two weeks to Oct. 15. Meanwhile, Chinese importers have asked U.S. suppliers for prices for soybeans, pork and other farm goods -- a sign they might step up purchases of American agricultural products.
The gestures stoked cautious optimism among investors that the next round of trade talks in October between Washington and Beijing may lead to some progress after a string of failed attempts at resolving the longstanding dispute.
"What's driving markets today is the potential for an interim trade deal," said Tony Roth, chief investment officer at Wilmington Trust. "There's enough pain to (China's) domestic economy and there's enough pain to our domestic economy that it's in both presidents' interests to take a step back and have a little bit of breathing room right now. That's what's changed."
The S&P 500 index rose 8.64 points, or 0.3%, to 3,009.57. The Dow Jones Industrial Average extended its winning streak to a seventh straight day, gaining 45.41 points, or 0.2%, to 27,182.45.
The Nasdaq added 24.79 points, or 0.3%, to 8,194.47. The Russell 2000 index of smaller company stocks gave up an early gain, sliding 0.65 point to 1,575.07.
The U.S.-China talks have basically gone nowhere since early May, when the two sides appeared to be nearing a deal. Along the way, the countries have slapped import taxes on hundreds of billions of dollars' worth of each other's products.
Financial markets were rattled in August as the trade conflict escalated yet again, fueling worries that more tariffs and a slowing global economy could bump the U.S. into a recession. The economic uncertainty has also become a drag on companies.
The two countries' conciliatory moves Wednesday and Thursday have raised hopes on Wall Street that the upcoming round of trade negotiations may yield a different outcome than previous attempts.
The reason? The trade war has begun to take its toll economically on both economies.
"Six months ago, even three months ago, you weren't registering as much economic deterioration as you are now in both economies," Roth said. "The markets are believing that there's some credibility in the idea that there may be an interim trade truce, let's call it, where they roll back some of the tariffs, the Chinese would by some stuff, and there would be relief to both economies."
Several weeks of solid gains have helped the S&P 500 more than recoup its losses in August, nudging it closer to another record high close this week.
The index is also on track for its best September since 2013. The S&P 500 is up 2.8% this month after slipping 1.8% in August. That's notable because the index has fallen in September 55% of the time since World War II, although the record has been better during the 10-year bull market.
Small companies are the star performers so far this month. The Russell 2000 index of smaller-company stocks is up 5.4%, with much of the gain coming this week. Those smaller companies are viewed as more insulated from the impact of volatile swings in the U.S.-China trade war.
Tech stocks notched solid gains Thursday. The sector's companies, particularly chipmakers, are heavily impacted by the trade war because many of them make products in China or rely on Chinese suppliers.
Chipmaker Intel gained 0.4%, while Advanced Micro Devices rose 1.5%. Microsoft, the most valuable company in the S&P 500, added 1%.
Consumer-focused stocks also helped lift the market. Starbucks rose 1.2%.
Energy companies tumbled as oil prices slid 1.2%. Oilfield services company Schlumberger dropped 1.1%.
Health care stocks gave up an early gain. UnitedHealth Group fell 1.8%.
The yield on the 10-year Treasury rose to 1.78% from 1.73% a day earlier, giving a boost to financial sector stocks. Higher yields drive interest rates on mortgages and other consumer loans higher, which drives up bank profits. SunTrust Banks gained 1.3% and American Express rose 0.9%.
Tailored Brands plunged 29.8% after the owner of Men's Wearhouse and Jos. A Bank gave investors a dismal third quarter profit forecast and halted its dividend.
Investors gave a cool reception to SmileDirectClub's stock market debut. Shares in the direct-to-consumer teeth-straightening company ended 27.5% lower than its opening price.
Benchmark crude oil fell 66 cents to settle at $55.09 a barrel. Brent crude oil, the international standard, dropped 43 cents to close at $60.38 a barrel. Wholesale gasoline fell 2 cents to $1.55 per gallon. Heating oil declined 1 cent to $1.89 per gallon. Natural gas rose 2 cents to $2.57 per 1,000 cubic feet.
Gold rose $4.30 to $1,498.70 per ounce, silver rose 1 cent to $18.04 per ounce and copper rose 2 cents to $2.62 per pound.
The dollar rose to 108.14 Japanese yen from 107.79 yen on Wednesday. The euro strengthened to $1.1073 from $1.1007.
Stocks in Europe finished higher following the European Central Bank's latest round of economic stimulus.