Stocks closed higher in choppy trading Tuesday, wiping out the previous session's declines, thanks to better-than-expected earnings reports and as investors remained hopeful that the central bank may still be open to further easing.
The Dow Jones Industrial Average rallied 78.33 points, or 0.62 percent, to finish at 12,805.54, led by Disney and Merck.
The S&P 500 jumped 10.03 points, or 0.74 percent, to end at 1,363.67. The Nasdaq added 13.10 points, or 0.45 percent, to close at 2,910.04.
The CBOE Volatility Index, widely considered the best gauge of fear in the market, slipped back below 17. (Read More: S&P 500 Nears ‘Ultimate’ Death Cross)
All 10 S&P sectors finished in positive territory, led by materials and health care.
Stocks initially tumbled after Bernanke's testimony at first blush gave no clear indication that the Fed was planning to provide further easing. Bernanke also told the Senate Banking Committee in his semiannual report that economic uncertainty is increasing, mainly due to the European debt crisis and the looming “Fiscal Cliff” in the U.S. (Read More: After ‘The Bernank,’ Stocks a Buy—Pros)
Traders said Bernanke's grim economic outlook implied that the central bank is leaving the door open for further easing in the near future, which eventually helped turn the market around.
“He said in his comments that the Fed stands ready to do more asset purchases when needed,” said Keith Bliss, senior vice president at Cuttone & Co. (Read More: Fed Can't Save Economy, Or Markets 'On Its Own')
But some strategists remained skeptical.
"By now, it's clear that the hurdles to QE are high and yet Bernanke is caught in a position where he must provide complete reassurance that the Fed stands ready, knowing that officials' underlying confidence in the options at hand has diminished," wrote Citigroup's Robert DiClemente. "Barring a serious financial setback, we continue to see extended rate guidance as the furthest the Committee will go at this upcoming meeting."
Among earnings, Goldman Sachs ended higher after the financial giant blew past estimates, despite a substantial drop from last year. On Monday, Citigroup posted earnings that topped expectations. At least two brokerages raised their price target on Citigroup.
Coca-Cola gained after the world's biggest beverage producer posted a higher-than-expected quarterly profit, thanks to increased sales volume.
But fellow Dow component Johnson & Johnson reported earnings in line with expectations, while revenue fell shortof analysts' estimates.
Mattel jumped to lead the S&P 500 gainers after the toymaker beat earnings expectations.
Intel , Yahoo and CSX are slated to post earnings after the closing bell. Yahoo's results come a day after the Internet company appointed Google's Marissa Mayer as its new President and CEO.
BofA, AmEx, IBM, Qualcomm, Ebay and Yum Brands are among some notable companies scheduled to post earnings on Wednesday. (Read More: Cramer’s 4 Earnings to Watch Wednesday)
Earnings season has only just started—of the 46 S&P 500 companies that have reported so far, 72 percent have topped above estimates, while 13 percent have missed. If all remaining companies report profit in line with expectations, earnings will be up 6 percent from second quarter last year, according to data from Thomson Reuters.
On the economic front, consumer prices were flat in June, in line with expectations, as the cost of gasoline dropped, according to the Labor Department. Industrial production gained in June, according to the Federal Reserve, while capacity utilization was 78.8 percent. Still, the data still signaled a slowdown in economic growth in the second quarter as manufacturing output rose at an annual rate of 1.4 percent, down from a 9.8 percent rate in the first quarter.
Meanwhile, homebuilder sentiment jumped in July to its highest level since March 2007, according to the NAHB/Wells Fargo Housing Market index. However, homebuilders including Lennar , D.R. Horton and Beazer remained under pressure.
—By CNBC’s JeeYeon Park (Follow JeeYeon on Twitter: @JeeYeonParkCNBC)
Coming Up This Week:
WEDNESDAY: Weekly mortgage apps, housing starts, Ben Bernanke speaks, Fed's Beige Book; Earnings from BofA, Abbott Labs, Honeywell, PNC Bank, USBancorp., AmEx, IBM (tentative), Qualcomm, Ebay, Yum Brands
THURSDAY: Jobless claims, existing home sales, Philadelphia Fed survey, leading indicators; Earnings from Morgan Stanley, Novartis, Philip Morris, Travelers, Verizon, AutoNation, BB&T, Blackstone, Nokia, Southwest Airlines, Google, Microsoft, AMD, Capital One, Chipotle, ETrade, Sandisk
FRIDAY: Fender and Kayak trading debut; Earnings from GE, Schlumberger, Xerox
More From CNBC.com: