Stocks ended modestly higher after fluctuating in the final hour of trading as investors shrugged off further evidence of a slowing economy.
The Dow Jones Industrial Average rose 8.10 points, or 0.07 percent, to close at 12,402.76, rising for a second straight session.
Among Dow components, Microsoft gained in the wake of reports that David Einhorn, the hedge fund manager, is calling for CEO Steve Ballmer to resign.
Merck , meanwhile, was among the leading blue chip laggards after news of a government drug study that dismissed the effectiveness of giving patients with heart disease a high dose of niacin in addition to a statin. The study used Abbot Laboratories' Niaspan and Merck's Zocor, a statin.
TheS&P 500 rose 5.22 points, or 0.4 percent, to close at 1,325.69, while the tech-heavy Nasdaq gained 21.54 points, or 0.78 percent, to close at 2,782.92. The CBOE Volatility Index, widely considered the best gauge of fear in the market, fell to nearly 16.
Among key S&P 500 sectors, consumerdiscretionary and telecom rose, while utilities fell.
News on the economic frontpointed to continued weakness in the U.S. Investors had hoped initial claims for unemployment would fall, indicating the jobs market was picking up, but claims rose, and the second reading of first quarter economic growth didn't improve as expected. GDP remained at a sluggish 1.8 percent.
The fact the economic numbers have been disappointing indicates the Federal Reserve may continue to be generous in some form after the Fed's bond purchases to stimulate the economy, known as quantitative easing, ends in June, said Peter Cardillo, chief market economist at Avalon Partners.
At the same time, corporate profits were strong in the second quarter, and "that trend is going to continue," Cardillo said. "That brings us down to one simple factor, and that is, there is no place to put your money other than equities."
Cardillo does, however, also think gold prices will continue to rise over the next six to eight months, reaching $1,800 an ounce.
The economic headwinds, combined with the uncertainty surrounding how the economy will respond to the end of quantitative easing, could send stocks tumbling more in the weeks ahead, however, said David Katz, senior portfolio strategist at Weiser Capital Management.
Katz doesn't expect the market to fall as much as it would in a recession, but he does expect a downdraft. And that downdraft will present buying opportunities, he said.
"Cash that's on the sideline waiting for the next dip will be put to work" Katz said.
Most of Weiser Capital Management's clients have 5 to 20-percent cash at any point, he said. The firm was buying bigger tranches when the market tumbled in late 2008 through 2009, and they are "taking much smaller chunks now," Katz said. "I think we will have an opportunity to take healthier bites in the coming quarters."
The euro rose against the dollar after news China may buy “bailout bonds” for Portugal although concerns about the future of Greece's restructuring efforts continued to worry investors. Meanwhile, Maria Damanaki of Greece, and head of Fisheries at the European Commission, said Greece may be forced out of the euroif it can't accomplish tough austerity measures.
On the earnings front, Sony fell slightly after the Japanese electronics maker posted a jump in net losses from a write-off, but expects a profit for its current financial year. The company's earnings continue to be affected by the March earthquake and tsunami in Japan as well as cyber attacks of its PlayStation Network.
Tiffany , meanwhile, soared to the top of the S&P 500 after the luxury retailer reported higher profits in every region and raised its forecast for the full year. Global sales rose 20 from the first quarter, better than the firm's initial forecast.
NetApp also led the index after the computer data storage firm reported an 11 percent earnings gain and a robust outlook for the current quarter. Also, BMO raised its price target on the computer storage firm to "outperform" from "market perform," and S&P Equity raised its price target to $68 a share from $64.
However, Computer Sciences plunged more than 10 percent after the tech firm posted weaker than expected earnings and handed in an outlook that disappointed. In addition, at least three brokerages cut their price targets on the firm.
Google fell slightly after introducing "Google Wallet," a technology that would allow people to pay for items via an app on their mobile Android phones. The app uses MasterCard's "PayPass" technology.
Meanwhile Heinz rose slightly after the ketchup maker reported higher than expected sales, although earnings missed by a penny.
On the initial public offering front, shares of FreeScale Semiconductor jumped after the semiconductor company began trading Thursday morning. The offering was priced Wednesday at $18 a share, below the initial price talk of $22 to $24 a share.
But Spirit Airlines , fell after shares of the ultra low-priced airlines began trading. The $15.6 million IPO was priced at $12 a share on Wednesday.
The weak economic news led to a mixed picture for oil prices. U.S. light, sweet crude fell $1.08 percent to $100.23 a barrel, while in London, Brentcrude rose 0.10 percent to $115.05.
Precious metals also were weaker on Thursday. Gold fell 0.25 percent to settle at $1,522.80, while silver fell 0.83 percent to settle at $37.33.
The bond market added to gainsafter a successful U.S. Treasury auction of $29 billion in 7-year notes. The securities fetched a high yield of 2.43 percent, and a bid-to-cover ratio of 3.24. Yields on the 10-year note, meanwhile, traded below the 200-day moving average of 3.08 percent.
On the economic front, jobless claims rose 10,000 last week to a seasonally adjusted 424,000 form an upwardly revised 414,000, the Labor Department reported. The four week average of claims, however, fell to 438,500. Economists surveyed by Reuters had expected claims last week would fall to 400,000.
Also, the second reading on first quarter gross domestic product was reported unchanged at 1.8 percent. Economists had expected the second reading would show slightly stronger growth.
And sales of homes owned by banks or in some stage of foreclosure fell in the first quarter as demand remained weak, but distressed homesstill made up about 28 percent of sales, RealtyTrac reported on Thursday.
In other economic news, Goldman Sachs reduced its earnings forecast for the S&P 500 to $104 a share from $106, bringing its forecast for the index to 1,450 from 1,500.
European stocks rose as mining stocks lifted the benchmark index in the London market.
On Tap This Week:
THURSDAY: Seven-year Treasury note auction, money supply.
FRIDAY: Personal income and spending, consumer sentiment, and pending home sales.
More on CNBC.com