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.
While the equity markets were weak Thursday in the face of strong economic news, there was not a lot of movement or volume. The clashes in Egypt were on investors' minds, but the situation in the Middle East is not the driving force behind U.S. stocks, said Doug Godine, head of equities at Signal Hill Capital.
"The market is worrying about it and dealing with it, but we don’t see it as a major threat to at least the potential strength of our equity markets this year," Godine told CNBC.com.
Rising signs of inflation are more of a worry right now to investors, he said, although Bernanke dismissed concerns that the Fed's stimulative policies were beginning to drive inflation higher.
Generally, Godine said stocks will go up "stubbornly on light volume for awhile—reflective of the encouraging economic news, good earnings news, but remaining pessimism around stocks," noting that flows out of municipal bond and money market funds and into U.S. equity funds are in the initial stages.
"You have a lot of runway there for that trend to continue," Godine said.
Microsoft's $500 million, three-part bond offering is another positive sign, he said. That's because Microsoft plans to use proceeds from the offering—in which it is taking advantage of low rates—to buy back "what they see as cheap equity," Godine said, an indication companies have confidence in their future.
Several retailers reported surprisingly strong revenue gains in Januarydespite snowstorms that analysts feared would crimp consumer spending. Costco , Limited Brands and Gap all traded higher.
More than 70 percent of all retail apparel stores rose on Thursday.
On the earnings front, Merck reported results that topped forecasts, but its profit outlook for the current year was below what analysts were expecting, sending the pharma-giant's shares down. Rival GlaxoSmithKline posted a loss after taking a massive charge to provide for U.S. litigation over its diabetes drug, Avandia.
Royal Dutch Shell disappointed investors with below-forecast quarterly profit, with concerns over its refining business overshadowing a sharp rise driven by higher oil prices.
Dow Chemical rose slightly after posting a better-than-expected profit, helped by brisk agricultural, plastic and electronic sales, with earnings from joint ventures in the glass and energy sectors particularly strong.
MasterCard gained after the credit-card provider's profit soared 41 percent to $415 million, as consumers around the world spent more money. Meanwhile, rival Visa traded flat after reporting quarterly profit rose 16 percent, slightly beating expectations, as consumer spending ramped up and the company processed more transactions abroad.
Unilever reported forecast-beating quarterly profitand said it was confident about dealing with soaring commodity costs and competition.
Green Mountain Coffee Roasters shares soared,
Estee Lauder's shares also skyrocketed after the cosmetics retailer beat results thanks to strong holiday sales. Wedbush raised its price target on the company to $100 a share from $87.
And Sony gained despite reporting a drop in third quarter profits due to competition for TVs and the strong yen.
Verizon started taking orders online for its Apple iPhone, a week before it is due to hit store shelves. However, some Verizon customers complained they were unable to buy the phone online. Separately, the wireless provider said Thursday that its board of directors authorized a 100 million share buyback.
Ford Motor shares slipped after the automaker said it is recalling nearly 363,000 F-150 pickup trucks in North America because of a potential problem with the door handles not working properly.
Cummings slipped after UBS removed the engine maker from its "key calls" list, but Credit Siusse raised its taraget price to $139 a share from $124.
In a day of heavy economic news, new claims for unemployment benefits dropped more than expected last week, according to the Labor Department, pointing to continued gradual improvement in the jobs market. Initial claims for state unemployment benefits tumbled 42,000 to a seasonally adjusted 415,000. Economists had forecast claims dropping to 420,000, according to a Reuters poll.
Meanwhile, productivity rose 3.6 percent in 2010 after a 3.5 percent gain in 2009, with both years the best showing since 2002, according to the Labor Department. Labor costs dropped 1.5 percent last year after a 1.6 percent decline in 2009.
The services sector grew in January at its fastest pace since August 2005. The ISM said its index of national non-manufacturing activity rose to 59.4 in January from 57.1 in December. Economists had expected a reading of 57.0, according to a Reuters survey. A reading below 50 indicates contraction in the sector, while a number above 50 means expansion.
And factory orders edged up in December and shipments of finished products were stronger, signaling a continuing pickup in activity in the manufacturing sector. Total factory orders rose 0.2 percent to a seasonally adjusted $426.8 billion, according to the Commerce Department—contrary to forecasts for a 0.5 percent decline made by Wall Street economists surveyed by Reuters and following an upwardly revised 1.3 percent boost in November orders.
Billionaire investor Jim Rogers told CNBC on Thursdayhe expected to see more political and social unrest in the future, driving commodity prices up even further, adding he invested in more in commodities than in stocks.
Overseas, the European Central Bank kept interest rates on hold at a record low of 1 percentas expected on Thursday, despite rising inflation fears. The current median expectation among economists is for no change until the fourth quarter of 2011 although financial market investors have started to bet on a rise in the third quarter.
While Bernanke doesn't see an inflation threat, Trichet has warned that inflation numbers merit “very close monitoring”as they may rise further in the coming months due to higher energy costs.
Trichet's comments about inflation last month helped send the euro higher against the dollar on expectations the ECB would be first to move rates higher.
European stock fell on disappointing results from Shell and Banco Santander. The FTSEurofirst300 Index fell 0.1 percent.
On Tap This Week:
THURSDAY: Minneapolis Fed President speaks; Earnings after-the-bell from Sunoco
FRIDAY: Nonfarm payrolls; earnings before-the-bell from Aetna.
More From CNBC.com: