By Caitlin Ostroff

U.S. stocks rose Wednesday after White House negotiators said they aim to reach a deal on a new coronavirus-relief package by the end of the week.

The S&P 500 gained 0.6%, and the tech-heavy Nasdaq Composite added 0.4%. The Dow Jones Industrial Average advanced 1%, or about 270 points, boosted by a big gain in shares of Walt Disney.

Investors have been watching for signs that the government will deploy more fiscal stimulus to help counter the economic damage caused by the pandemic. Negotiators from the White House said Tuesday that they aim to reach agreement with Democrats on another aid package by week's end. Both sides have said they made progress in talks to bridge differences on unemployment payments and other proposals.

Economists have worried that a rise in U.S. coronavirus infection rates last month could curtail economic recovery as some regions moved to impose local restrictions to curb the number of cases. Wednesday's ADP National Employment Report showed nonfarm private-sector employment in the U.S. increased by 167,000 jobs in July, smaller than the 1 million increase economists expected.

This week, new coronavirus cases have inched lower, lending to optimism for faster economic recovery.

"What we have had so far is where economic activity and infection rates have been decoupled," said Altaf Kassam, head of investment strategy for State Street Global Advisors in Europe. "Going forward, we are going to have them much more coupled together. Economic activity and infection rates are going to be much more closely linked."

Also on the radar for markets: Deteriorating relations between Beijing and Washington, which are likely to weigh on investors' sentiment. The U.S. and China have agreed to high-level talks on Aug. 15 to assess Beijing's compliance with the bilateral trade agreement signed early this year, The Wall Street Journal reported late Tuesday.

As earnings season continues, shares of Walt Disney rose 9.8% after the media and entertainment company reported strong subscriber growth for its streaming service. Shares of payments company Square gained 14% after the company beat analysts' expectations for earnings and revenue.

Gold gained 1.9% to $2,059.80 a troy ounce, extending a bull run that has gained momentum during the coronavirus pandemic. This year's sharp drop in yields on U.S. Treasurys to levels below the expected pace of inflation is making gold, which doesn't generate an income, more attractive as a store of value. The precious metal, viewed as a haven asset, is also drawing investors concerned that the economic fallout from the pandemic may lead to another rout in stocks.

"It reminds me of the price rally in 2011 when gold posted its previous record," said Carsten Fritsch, an analyst at Commerzbank. He said gold could climb higher given guidance from the Federal Reserve that central bankers will keep interest rates low. "There's no hint of higher interest rates in the near future, even if there's an uptick in economic activity," he said.

Brent crude oil rose 3.7% to $46.07 a barrel, its highest since Saudi Arabia and Russia started a price and production war in March. Optimism among investors, falling U.S. inventories and a weaker dollar have supported oil. The ICE U.S. Dollar Index, which measures the greenback against a basket of currencies, fell 0.7%.

In bond markets, the yield on the 10-year Treasury ticked up to 0.538%, from 0.514% Tuesday, which was the second-lowest closing level this year. Government bond yields, which move inversely to price, have weakened in recent weeks following guidance from major central banks that interest rates are likely to remain low for an extended period.

Karen Langley contributed to this article.

Write to Caitlin Ostroff at caitlin.ostroff@wsj.com