By Caitlin McCabe and Will Horner

The S&P 500 and Dow Jones Industrial Average edged higher Wednesday in a choppy trading session as signs of progress on a stimulus package lifted investor sentiment.

The indexes opened lower, before paring their losses over the course of the day. By the afternoon, as Democratic and Republican lawmakers said they saw potential for a compromise on a new coronavirus-aid bill, the indexes reversed.

The S&P 500 finished the day up 6.56 points, or 0.2%, to 3669.01, a record close. The blue-chip index gained 59.87 points, or 0.2%, to 29883.79.

The Nasdaq Composite, meanwhile, fell 5.74 points to 12349.37.

The market has been propelled higher in recent weeks by optimism that Covid-19 vaccines will help accelerate the economic rebound. That has led to a blockbuster rally, spurred, in part, by a jump in stocks that are sensitive to economic growth. Last month, the Dow vaulted above 30000 for the first time.

That rally lost some momentum Wednesday, even after the U.K. granted emergency-use authorization for a Covid-19 vaccine developed by Pfizer and BioNTech. Public health experts expect that a similar authorization in the U.S. could come later this month.

"That's exciting but that was also expected," Chris Konstantinos, chief investment strategist at RiverFront Investment Group, said of the U.K.'s green light of the vaccine. "We're in a bit of an information vacuum. We're through earning season and now the market is kind of waiting until the end of the year and watching vaccine news and stimulus news."

Still, investors and analysts say they are optimistic about the equity markets in the months ahead. Market strategists in recent weeks have been raising their S&P 500 price targets for 2021 as they anticipate a strong economic recovery once swaths of the population are vaccinated.

The Federal Reserve's commitment to providing sustained stimulus has also extended investors' risk appetite.

"Why would you be a seller of stocks when you know that policy support, both fiscal and monetary, is there and probably will be there going forward?" said Derek Halpenny, head of research for global markets in the European region at MUFG Bank.

At the same time, many investors have noted that valuations appear to be stretched and some say they are closely watching sentiment surveys, which have grown increasingly bullish in recent weeks.

"If December was a lot like today, I think that'd be good for the markets," said John Lynch, chief investment officer for Comerica Wealth Management. "We wouldn't want to get too far ahead of ourselves."

Even with small signs Wednesday that lawmakers may be willing to end their monthslong standoff over a stimulus package, it remains unclear how successful negotiations will be. On Tuesday, a bipartisan group of lawmakers unveiled a short-term $908 billion relief proposal. On Wednesday, House Speaker Nancy Pelosi (D., Calif.) and Senate Minority Leader Chuck Schumer (D., N.Y.) said in a joint statement that the proposal should be the foundation for negotiations on a new coronavirus-relief bill.

Among the biggest winners in Wednesday's market were shares of energy companies, with Apache and Occidental Petroleum both jumping more than 5%. Meanwhile, brent crude oil, the international benchmark, rose 1.8% to $48.25 a barrel.

Oil prices have rallied recently on vaccine optimism. This week's meeting of the Organization of the Petroleum Exporting Countries and its partners to decide on production policy could help determine the short-term direction of the market.

Bank stocks also rallied Wednesday, while Pfizer added $1.39, or 3.5%, to $40.80 after its U.K. government approval.

Salesforce.com tumbled $20.57, or 8.5% to $220.78 after the cloud-computing company on Tuesday confirmed that it had agreed to buy Slack Technologies for $27.7 billion.

Tesla fell $15.94, or 2.7%, to $568.82. This week, S&P Dow Jones Indices said it would add Tesla's full weight to the S&P 500 all at once later this month.

Even with the potential for vaccine distribution on the horizon in the U.S., traders are still contending with an economy that remains deeply wounded and uncertainty surrounding whether fresh coronavirus lockdowns will be implemented once President-elect Joe Biden takes office.

Traders will be paying close attention later this week to fresh jobs report figures. The ADP National Employment Report on Wednesday showed that job creation in the nonfarm private sector slowed last month. About 307,000 new nonfarm jobs were created, less than economists had been forecasting.

Meanwhile, the Fed's periodic compilation of anecdotes from business contacts, known as the Beige Book, said Wednesday that the U.S. economy expanded at a "modest or moderate pace" this fall. However, four regional Fed branches reported "little or no growth."

In bond markets, the yield on the 10-year Treasurys jumped to 0.948%, from 0.933% on Tuesday.

Overseas, the Stoxx Europe 600 edged down slightly. In Asia, the major stock indexes also ended trading on a muted note. Japan's Nikkei 225 closed almost flat, while the Shanghai Composite Index and Hong Kong's Hang Seng Index slid roughly 0.1%.

Write to Caitlin McCabe at caitlin.mccabe@wsj.com and Will Horner at William.Horner@wsj.com

(END) Dow Jones Newswires

12-02-20 1731ET