Stocks pushed higher as oil plunged for the second day in a row and financials staged an across-the-board rally that stemmed investor pessimism about the effects of inflation on the economy.
The major indexes each posted gains of about 1 percent following a lackluster opening in which investors weighed inflation against a surprising across-the-board rally in bank and airline stocks.
Oil dropped more than $5 a barrel at one point on a surprising surge in crude supplies that suggests cutbacks in the United States may be taking hold.
"We got the follow-through that we looked for with these numbers," Tom Reiley, of SCS Commodities, said on CNBC. "It looks like the bubble may have burst for the short term."
Investors earlier were spooked by a Consumer Price Index reading showing that prices in June rose by the biggest amount since 1982 on a continued surge in gasoline prices.
Stock gains were tempered by losses in consumer care companies, with Procter & Gamble and Kimberly Clark both dropping.
But investors also got a boost from Wells Fargo, as the fifth-largest US bank posted earnings of 53 cents per share which, though lower than a year ago, beat analyst expectations.
At the same time, the company said optimism about for the future will lead to a 10 percent dividend increase. Other bank stocks posting strong gains included Washington Mutual and Bank of America. Dow bank stocks gained more than 7 percent.
Also, Delta Air Lines reported a $1 billion quarterly loss after special charges, as the airline industry continues to struggle with sky-high fuel prices.
But excluding special charges, Delta said it earned $137 million, or 35 cents per share, easily beating analyst estimates. Airline stocks gained 4.4 percent.
Telecoms were weighing on the market early, with Sprint Nextel surrendering gains it received Tuesday following a CNBC report that SK Telecom, the largest provider of wireless phone service in South Korea, was in talks to buy Sprint.
Metals stocks were being hit by rising materials costs, with the Dow Iron & Steel sector falling 4 percent.
Fannie Mae and Freddie Mac recovered after the Securities and Exchange Commission issued a rule to curb short selling in 19 financial firms and major investment banks, in an effort to clamp down on market manipulation which some say has played a role in the fall of Bear Stearns in March.
Investors will be closely watching Lehman Brothers, whose CEO Dick Fuld issued a memo that many insiders consider an advertisement for the firm to be boughtpossibly by private equity or possibly a bank — at a level above its current market price, CNBC has learned.
JPMorgan Chase led Dow gainers a day before it reports earnings, while Intel was the biggest loser on the blue-chip index despite a revenue forecast Tuesday topping expectations and a quarterly net income rise of 25 percent, helped by strong sales of microprocessors used in notebook computers.
Blackberry maker Research in Motion is likely to see its shares under pressure following a downgrade to underperform by Needham & Co., which cited soaring sales of RIM rival Apple's iPhone.