The broader market index advanced 1% to 3,478.73 while the Nasdaq popped 1.7% to end the day at 11,665.06. The Dow Jones Industrial Average gained 83.48 points, or 0.3% to end at 28,331.92.
"When you're coming off a major low, the first phase of the bull market is really strong, and you tend to get very extended," said Keith Lerner, chief market strategist at Truist/SunTrust Advisory. Lerner noted, however, that this "tends to be a period where historically you would start to consolidate some of the gains."
Shares of Salesforce surged 26% — their biggest one-day gain ever — after the software company posted blowout earnings after the bell on Tuesday. Salesforce will be added to the Dow at the end of August, S&P Dow Jones Indices said Monday. The changes are driven by Apple's coming stock split, which will reduce the technology weighting in the price-weighted average.
Facebook and Netflix jumped 8.2% and 11.6%, respectively. Amazon advanced nearly 3% while Alphabet and Microsoft gained 2.4% and 2.2%, respectively. Apple rose 1.4%.
Wednesday's gains put the S&P 500 up more than 58% since hitting an intraday low on March 23. The Nasdaq has soared by 75% in that time period.
But "if you cut through it all, this rally has really been about five or six stocks," said Mark Travis, CEO of Intrepid Capital, referring to the major tech names. "I think it creates a bit of a smokescreen as far as what's really happening below the surface."
Sentiment on Wednesday was lifted in part by positive news on the coronavirus vaccine front and strong U.S. economic data.
Moderna said its coronavirus vaccine showed promising results in a small trial of patients aged 56 and older. The company's stock jumped 6.4% on the news.
U.S. durable goods orders jumped by 11.2% in July, easily topping a 4.3% estimate from Refinitiv.
Markets have been bolstered "by converts finally joining the party, by recent persistent declines in Covid cases, the halo of ongoing new treatments, and renewed progress on trade negotiations with China," Jim Paulsen, chief investment strategist at the Leuthold Group, told CNBC.
To be sure, Kansas City Federal Reserve President Esther George told CNBC the risk of a double-dip recession is increasing.
On Thursday, the Federal Reserve will hold its annual symposium on monetary policy. Wall Street will look for clues on further stimulus and where the economy is headed out of the event. Investors will be looking specifically for Powell's comments on inflation and its impact on the dollar.
"What Powell says tomorrow about inflation will of course be key as he tells us what he's rooting for and what threshold he would respond to," said Peter Boockvar, chief investment officer at Bleakley Advisory Group, in a note. "It's just a question of what would trigger that first rate hike but an effective vaccine better have the Fed thinking about when."
Subscribe to CNBC PRO for exclusive insights and analysis, and live business day programming from around the world.