U.S. stocks rose on Wednesday with the S&P 500 hovering near its highest level in more than four months following promising early data for a potential COVID-19 vaccine and a strong quarterly showing by Goldman Sachs.

Moderna Inc rose 5.8% after a small-scale study showed its experimental COVID-19 vaccine produced high levels of virus-killing antibodies.

Travel-related stocks Carnival Corp, Royal Caribbean Cruises Ltd, Marriott International and Wynn Resorts rose between 6% and 17%, with the S&P 1500 airlines index up 6%.

"A vaccine or treatment for COVID-19 remains the best hope for the economy," said Adam Phillips, director of portfolio strategy at EP Wealth Advisors in Torrance, California.

"Even though we like to see progress on a vaccine, the fact remains that it will not be available for sometime and the number of cases around the country continue to climb each day."

The United States has failed to control the coronavirus and there is a high level of uncertainty over how much the pandemic will affect the economy, Philadelphia Federal Reserve Bank President Patrick Harker said, as a number of U.S. sunbelt states reported a surge in COVID-19 cases recently.

The three main U.S. stock indexes have recouped most of their losses from the coronavirus-led slump, with a raft of stimulus measures and encouraging economic data lifting the S&P 500 to within 5% of its record high hit in February.

With the second-quarter earnings season now underway, investors are looking for annual forecasts from marquee companies for signs of the pace of the rebound in Corporate America.

Goldman Sachs rose 0.6% as its trading revenue doubled in the second quarter, driven by big swings in stock and bond markets since March.

Morgan Stanley gained 0.6% and Bank of America rose 1.3% ahead of their results on Thursday which would wrap up earnings from the big six U.S. banks. The broader banking index climbed 2.0%.

At 12:50 p.m. ET, the Dow Jones Industrial Average was up 156.43 points, or 0.59%, at 26,799.02, the S&P 500 was up 18.24 points, or 0.57%, at 3,215.76. The Nasdaq Composite was up 4.91 points, or 0.05%, at 10,493.48.

Gains for the Nasdaq were capped by online retail giant Amazon.com Inc, video streaming platform Netflix Inc and Microsoft Corp which slipped after surging to record highs recently.

"It's a sign that we are returning to normal so people start rotating out of those areas that have really benefited the most from this unique recession," said Phillips.

UnitedHealth Group Inc fell 1.8% after warning of rising costs later this year as Americans catch up on less urgent surgeries halted by the coronavirus pandemic.

Advancing issues outnumbered decliners by a 4.46-to-1 ratio on the NYSE by a 3.40-to-1 ratio on the Nasdaq.

The S&P index recorded 27 new 52-week highs and no new low, while the Nasdaq recorded 62 new highs and two new lows.

(Reporting by Medha Singh in Bengaluru; Editing by Maju Samuel)

By Medha Singh and Devik Jain