Stocks turned higher after Federal Reserve Chairman Ben Bernanke indicated the central bank would continue to stimulate the economy, even amid signs of growing strength in the U.S. economy.
The Dow Jones Industrial Average rose more than 20 points after trading lower most of the session, and after squeezing out a gainthe previous session.
Pfizer, Cisco, and Bank of America led blue chips higher, while Merck and Microsoft fell.
The S&P 500 and the Nasdaq also turned higher. The CBOE Volatility Index, widely considered the best gauge of fear in the market, fell below 17.
Most key S&P 500 sectors rose, led by consumer discretionary, telecom, and materials.
The market turned higher around 3 p.m., soon after the S&P 500 crossed about 1,304. That level may have triggered shorts who had bet the market would move lower despite the strong economic reports, said Marc Pado, U.S. market strategist and technical analyst at Cantor Fitzgerald.
"As soon as we triggered above 1,304 it was a rocket shot," Pado said. "Nobody wants to be short heading into tomorrow’s numbers."
The Labor Department will release nonfarm payroll data for January on Friday at 8:30 a.m.
Earlier, Federal President Bernanke said high unemployment and low inflation require the Fed to continue stimulating the economy, although he acknowledged the economy is getting stronger.
"Until we see a sustained period of stronger job creation, we cannot consider the recovery to be truly established," Bernanke said in remarks prepared for delivery at the National Press Club.
The comments had little affect on the market, since they were consistent with Bernanke's views for quite some time, said Joe Saluzzi, co-manager of trading at Themis Trading.
"The only thing that would have (moved the market) would have been a surprise, and we didn’t get it," Saluzzi said. "It's more of the same, and they’ll never stop," he added, questioning how the Fed could continue to stimulate the economy amid emerging signs of inflation.
Turmoil in Egypt also remained in focus as thousands of supporters and opponents of President Mubarak battled in Cairo's main square, raining stones, bottles and firebombs on each other in scenes of uncontrolled violence as soldiers stood by without intervening.
The dollar rose against a basket of currencies, moderating gains in oil prices. Brent crude closed slightly below $102 a barrel, after topping $103 earlier, while U.S. light sweet crude dropped to under $91, even as the clashes in Egyptraised the prospect of further unrest in the Middle East.
Prices are soaring across a range of commodities, with copper hitting another fresh high and wheat futures rising to a 2-1/2 year high on Wednesday. Gold rose about 1.6 percent to close above $1,352 an ounce.
Meanwhile, bond prices sank, as the 10-year Treasury note fell 13/32 points, to 92 15/32 to yield 3.543 percent, the highest yield since May 13, 2010.