- Bank stocks climbed 1.4 percent to lead the broader market higher ahead of the release of the Federal Reserve's stress test results.
- Stocks also jumped after the European Central Bank tried to walk back remarks made by ECB President Mario Draghi a day earlier.
- Tech rebounded from Tuesday's sell-off, lifting the Nasdaq composite 1.4 percent.
U.S. equities closed higher on Wednesday as bank stocks led the charge.
The Dow Jones industrial average jumped about 140 points with Goldman Sachs contributing the most gains. Caterpillar was the best-performing stocks in the index, rising 2.4 percent.
"A part of the equity rise today is to make up for what the markets thought to be excess pessimism," said Komal Sri-Kumar, president of Sri-Kumar Global Strategies.
The S&P 500 advanced 0.88 percent with financials rising 1.54 percent to lead advancers. The index also notched its biggest one-day gain since late April.
The SPDR S&P Bank exchange-traded fund (KBE), which tracks large banks, spiked 1.4 percent higher as investors braced for the release of the Federal Reserve's stress test results.
Analysts expect several big banks to come out of the test with substantial increases in return to shareholders — potentially using cash reserves to pay out more than 100 percent of their profits. As a result, higher figures would also reflect banks' confidence in their own financial health.
"This is the first time we've seen deregulation come into play, which is the banks below $250 billion don't have to pass the qualitative test anymore. That pressure taken off gives them a lot of flexibility to ask for more capital deployment," Marty Mosby, director of bank and equity strategies at broker-dealer Vining Sparks, told CNBC's "Closing Bell."
Shares of JPMorgan Chase and Goldman Sachs both climbed more than 1 percent.
Stocks also jumped after the European Central Bank tried to walk back remarks made by ECB President Mario Draghi a day earlier.
A source familiar with Draghi's knowledge told Reuters that Draghi intended to signal tolerance for a period of weaker inflation, not an imminent policy tightening.
Draghi said Tuesday "the threat of deflation is gone and reflationary forces are at play," sending the euro to a one-year high against the dollar. The currency pulled back from those levels on Wednesday following Reuters' report.
"This just proves how trapped they are that after just one speech and the market reaction that followed has the ECB already in a tizzy," said Peter Boockvar, chief market analyst at The Lindsey Group. "What do they think will happen when further tapering actually takes place which we still expect to happen in September?"
U.S. stock futures followed the dollar higher, with Nasdaq futures erasing losses. The Nasdaq has been in focus recently, with technology stocks facing pressure given their high valuation.
Most of tech rebounded Wednesday with Facebook, Apple, Amazon and Netflix all rising. Shares of Amazon briefly dipped lower after President Donald Trump took a swipe at CEO Jeff Bezos on Twitter.
The Nasdaq composite gained 1.4 percent.
The tech sector has been the stalwart of the U.S. stock market, rising about 17 percent for the year. But the tech sector dropped 1.6 percent Tuesday.
"The correction in Tech began a few weeks back and is ongoing... stay patient, better entry points are likely to be found in the weeks and months ahead," Chris Verrone, head of technical analysis at Strategas Research Partners, said in a note Wednesday.
"While the reversal in Technology stocks is certainly a change, we're reluctant to view recent price action too bearishly with flows moving into sectors like Financials and other risk barometers firming," he said.
Financials entered Wednesday's session as the second-best-performing sector over the past month, rising 2.42 percent amid the prospects of higher interest rates.
The benchmark 10-year yield sat at 2.22 percent, following sharp gains from the previous session.
In economic news, mortgage applications fell 6 percent last week, while pending home sales fell for the third straight month in May.
The Dow Jones industrial average rose 143.95 points, or 0.68 percent, to close at 21,454.61, with Caterpillar leading advancers and Johnson & Johnson lagging.
The gained 21.31 points, or 0.88 percent, to end at 2,440.69, with financials leading nine sectors higher and utilities underperforming.
The Nasdaq advanced 87.79 points, or 1.43 percent, to close at 6,234.41.
About three stocks advanced for every decliner at the New York Stock Exchange, with an exchange volume of 853.84 million and a composite volume of 3.45 billion at the close.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded near 10.
—CNBC's Evelyn Cheng contributed to this report.