The Dow Jones industrial average rose 189 points, or 1.4 percent, to 14,088 as of 3:46 p.m. EST. The Standard and Poor's 500 index gained 21 points, or 1.4 percent, to 1,518. The Nasdaq composite rose 43 points, or 1.4 percent, to 3,173.
The Dow has surged 304 points in the past two days, erasing its drop of 216 points Monday when inconclusive results from an election in Italy renewed worries that Europe's fiscal crisis could flare up again.
"The market psychology has clearly shifted. It's no longer sell the rally, it's buy the dips," said Dan Veru, chief investment officer of Palisade Capital Management. "The economic data continues to be strong."
Investors were also encouraged that Federal Reserve Chairman Ben Bernanke stood behind the central bank's low-interest-rate policies as he faced lawmakers for a second day. His comments dissipated worries about the bank's resolve to keep up the program. Those worries sprung up last week when minutes from the bank's last policy meeting revealed disagreement among Fed officials.
Also, the number of Americans who signed contracts to buy homes rose in January from December to the highest level in almost three years. The report continued a string of positive housing news. Sales of new homes jumped 16 percent last month to the highest level since July 2008, the government reported Tuesday.
Home builder stocks rose for the second day in a row. PulteGroup climbed 30 cents to $19.35, after rising 5.7 percent the day before. The government reported Tuesday that sales of new homes jumped 16 percent last month.
"Some encouraging news for the bulls has been the housing data that has come out over the past couple of days," said Todd Salamone, director of research at Schaeffer's Investment Research.
The Dow is up 7.6 percent since the start of the year, and is now less than 100 points away from its record close of 14,164 reached in October 2007. The S&P 500 is 6.5 percent higher for the year, and is about 3.2 percent short of its record close of 1,565.
Salamone said he remained "extremely bullish," on stocks in the medium and long-term, but cautioned that a pullback may lie ahead in coming days after the year's strong gains.
Discount retailers rose. Dollar Tree jumped $4.50 to $45.58 after reporting a 22 percent profit increase. Dollar General also rose $1.96 to $47.07. Family Dollar Stores rose $1.63 to $57.83.
In addition to the housing recovery, stronger company earnings and an improving job market have also given investors a reason to buy stocks.
Wall Street analysts predict that earnings for S&P 500 companies will climb 7.8 percent in the fourth quarter, the third straight quarter of growth.
The yield on the 10-year Treasury note rose two basis points to 1.90 percent.
Among other stocks making big moves;
Priceline.com rose $23.19 to $701.20 after reporting that its net income jumped in the fourth quarter as bookings grew.
First Solar plunged $4.78 to $26.59 after the company posted disappointing sales for the fourth quarter and gave a weak early outlook for the year.
Target fell 70 cents to $63.34 after the No. 2 discount chain's quarterly income fell 2 percent as it dealt with intense competition during the holiday shopping season.
DreamWorks Animation fell 43 cents to $16.18 after posting a loss of $82.7 million. The company booked a write-off on its November release "Rise of the Guardians" and on an upcoming movie that needs to be reworked.