Stocks slipped slightly from session highs but still closed broadly higher to post their biggest gain in almost two months Tuesday, led by gains in the energy sector, following a handful of economic news that helped boost market confidence.
The Dow Jones Industrial Average gained 123.14 points, or 1.03 percent, to finish at 12,076.11.
Home Depot and Caterpillar led the blue-chip gainers, while BofA lagged.
The S&P 500 rose 16.04 points, or 1.26 percent, to close at 1287.87, while the tech-heavy Nasdaq climbed 39.03 points, or 1.48 percent, to 2,678.72. The CBOE Volatility Index, widely considered the best gauge of fear in the market, tumbled more than 6 percent to trade around 18.
The Dow and Nasdaq are seeing their best gains since Apr. 20, while the S&P is having its best day since Mar. 21.
All key S&P sectors were in the green, led by growth plays energy, industrials and materials.
“The rally has a lot to do with technicals,” according to Alan Valdes, director of floor operations at DME Securities, noting that markets tend to see a bounce ahead of options expiration. "If you look at the S&P 500, they've lost over $1 trillion in value since the beginning of May—that is telling."
Options expiration at the end of this week also could create more volume and increase stock moves as traders adjust their hedges. Volume on the consolidated tape of the NYSE was at 3.55 billion shares, while 915 million shares changed hands on the floor.
Bernanke warned that a failure to lift the government's debt ceiling risks a loss of confidence in America's creditworthiness, saying the U.S. could lose its AAA credit rating and the greenback's status as the reserve currency could be damaged.
"Even a short suspension of payments on principal or interest on the Treasury's debt obligations could cause severe disruptions in financial markets and the payments system," Bernanke said at an event sponsored by the Committee for a Responsible Federal Budget.
Stocks tumbledlast week after Bernanke acknowledged the economic slowdownduring a banking conference in Atlanta.
Oil prices gainedas U.S. light, sweet crude rose $2.07 to settle at $99.37 barrel, while London Brent crude climbed $1.06 to settle at $120.16. Gold climbed $8.80 to settle at $1,523.80 an ounce. (Read More: Gold to Reach $5,000 Due to Supply Shortage)