Stocks closed broadly higher on Wall Street as investors hope that new talks set for September can result in progress in resolving the U.S.-China trade dispute and more in Thursday’s Stock Market Update.

Technology companies and banks were the biggest winners Thursday. Microsoft rose 1.9% and Wells Fargo added 1.6%

Retailers also did well. Discount store chain Dollar General soared 10.7% after reporting results that were better than analysts were expecting.

Best Buy slumped 8% after the consumer electronics chain lowered its revenue outlook, citing the impact of U.S. tariffs on Chinese imports.

In another sign that investors were feeling more optimistic, demand for U.S. government bonds showed signs of waning after surging in recent weeks amid recession worries.

Even so, long-term bond yields remained below short-term ones, a so-called inversion in the U.S. yield curve that has correctly predicted previous recessions.

Bond prices fell, sending the yield on the 10-year Treasury up to 1.49% from 1.47% late Wednesday. The 2-year Treasury rose to 1.53% from 1.49% the day before. The yield for the 10-year Treasury has been flat or below that of the 2-year this week.

While an inverted yield curve has preceded every U.S. recession, it is not a signal that one is imminent. It has taken 14 to 34 months for past recessions to begin following a yield curve inversion.

Uncertainty over the U.S.-China trade conflict and it impact on corporate profits has rattled investors this month.

The market is on track to end the week with a gain after having declined the past four weeks in a row. The major indexes have stemmed those losses this week, but are still down just under 2% as the month draws to a close. If those losses hold, August would be the second monthly drop for the market this year after May.

STOCK MARKET UPDATE

KEEPING SCORE: The S&P 500 rose 36 points, or 1.3%, to 2,924. The Dow Jones Industrial Average added 326, or 1.3%, to 26,362. The Nasdaq climbed 116, or 1.5%, to 7,973.

Investors favored smaller company stocks for the second straight day. The Russell 2000 index was up 1.6%.

Major stock indexes in Europe closed broadly higher.

ANALYST’S TAKE: Investors are hoping that the U.S. and China renew trade talks next month, having determined that the dispute is what’s causing the global economy to teeter on the brink of recession, said Sam Stovall, chief investment strategist at CFRA.

“All the market is trading on today is optimism, not on reality,” he said.

TRADE WAR OPTIMISM: A published report noted that China’s commerce ministry said it is discussing the next round of in-person trade negotiations with the U.S. to held next month.

In an interview with Bloomberg, Treasury Secretary Steven Mnuchin said talks with China are ongoing and are expected to continue in Washington, though he did not specify when.

Trade negotiators are due to meet in September for new negotiations, though there has been no sign of progress in recent days since an escalation by both sides earlier this month.

Last week, the trade conflict escalated again with both sides threatening new tariffs on each other’s goods, triggering a sharp sell-off in global markets.

Some of the Trump administration’s additional tariffs on Chinese products take effect Sunday and others on Dec. 15. In addition, higher tariffs on a separate group of Chinese products are to take effect Oct. 1.

Investors worry the spiraling tariff war over trade and technology could tip the global economy into recession.

EYE ON THE ECONOMY: Investors shrugged off new data showing the U.S. economy grew at a slower pace in the second quarter. The government reported that gross domestic product, the broadest gauge of economic health, advanced at a moderate 2% annual rate in the April-June quarter, down from a 3.1% gain in the first quarter. The figure was lower than the government’s initial estimate a month ago of 2.1% growth.

In a separate report Thursday, the Labor Department said that the number of Americans filing claims for unemployment benefits, a proxy for layoffs, rose by 4,000 last week to a still-low 215,000. Economists believe this weekly indicator will be one of the first signs to show if the economy is starting to falter.

Even though the economy is slowing, one encouraging sign is that consumer spending, which drives about 70% of growth, accelerated last quarter at the fastest pace in nearly five years. At the same time, business investment, which has weakened in the face of the Trump administration’s trade wars, was revised lower and subtracted from growth in the April-June period.

RAKING IN THE BUCKS: Shares in Dollar General jumped 10.7% after the discount retailer reported quarterly results that were better than analysts were expecting. Rival Dollar Tree gave up an early gain, sliding 1.9%.

UNDER A TARIFF CLOUD: Best Buy slumped 8%, the biggest decliner in the S&P 500, after the consumer electronics chain reported strong quarterly profit that was overshadowed by disappointing revenue growth. The company lowered its revenue outlook for the year, citing the expected impact of U.S. tariffs on Chinese imports.

LOUSY OUTLOOK: Abercrombie & Fitch slid 15.1% after the teen clothing retailer lowered its full-year sales forecast.

© The Associated Press. All rights reserved.