Stocks traded modestly higher amid weak economic news, falling oil prices, and a strong debut for LinkedIn's initial public offering.
The Dow Jones Industrial Average gained more than 35 points after snapping a three-day losing streakon Wednesday as oil prices gained.
Intel led the blue-chip average lower after news that Goldman Sachs downgraded the chip maker to "sell" from "neutral," citing slowing shipments on processors, rising competition and increasing capital expenditures. The brokerage also cut its overall view of the semiconductor sector to "cautious" and downgraded Applied Materials to "neutral" from "buy." Hewlett-Packard fell for a third day in the wake of a weak earnings outlook earlier this week. Citigroup cut HP's price target to $45 a share from $65.
TheS&P 500 traded flat, while the tech-heavy Nasdaq gained. The CBOE Volatility Index, widely considered the best gauge of fear in the market, fell below 16.
Among key S&P 500 sectors, health care and energy fell, while industrials gained.
The main reason the markets rose on Thursday in the face of Goldman's downgrade of Intel, and a host of weak economic news, was the success of the LinkedIn offering, said Todd Schoenberger, managing director at LandColt Trading.
"The markets would have crumbled today if not for the IPO," Schoenberger said.
In Schoenberger's view, the IPO doesn't represent a frothy market top like the Internet bubble of the late 1990s. Instead, he notes, "40 percent of hte company's revenues come from the services they sell to recruiters and their tools are very unique."
Stocks had weakened earlier in the session as investors digested a slew of economic news, much of it pointing to further signs of sluggishness in the economy.
One of the more optimistic reports was that initial jobless claims fell last week, although the four-week moving average of claims reached a six-month high.
"We are seeing improvements on the job front, but not to the extent we want to see," said Daniel Penrod, senior industry analyst at California Credit Union League.
Still, for individuals who remain unemployed, "there is no recovery without a job," Penrod says. "Until individuals are back, the overall feeling is going to be one of we're not there yet."
That was evident in Conference Board's index of leading indicators, which fell for the first time since June 2010. "While there weren't big moves expected, small positive moves is what we were hoping for," Penrod said. "Unfortunately there is still more uncertainty than people thought there would be."
Another factor in Thursday's markets is tomorrow's expiration day for stock index and equity options, which can lead to volatility as investors roll over contracts.
History has shown that the market often rises going into the day of expirations, said J.J. Kinahan, chief derivatives strategist at TD Ameritrade. "If you're long you are usually better off," Kinahan said.
Perhaps the biggest boost to the market on Thursday was the soaring performance of LinkedIn , which began trading at $83 a shareThursday morning, nearly double its pricing level of $45 a share. The social networking site for professionals, trading under the symbol LNKD, traded at around $108 a share in the early afternoon. At that price, LinkedIn's market cap would be $10.2 billion, bigger than the market caps of some of the market's most well known names, including AMD , Southwest Airlines and NYSE Euronext . The price fell back later in the session, although the shares still rose more than 100 percent.
Meanwhile, Glencore , the world's largest diversified commodities trader, priced its $10 billion IPO in the Hong Kong and the UK on Wednesday.
The dollar fell against a basket of currencies and oil prices slippedafter U.S. economic data showed signs of a slow growth. U.S. light, sweet crude fell 1.66 percent to $98.44, while in London, Brentcrude fell 0.8 percent to $111.42.
Precious metals pricesfell slightly on the weak economic news. Gold fell 0.23 percent to settle at $1,492.20 on Thursday, while silver fell 0.48 percent to $34.927.
On the earnings front, Sears shares dropped after reporting a wider-than-expected losson declining sales.
But Dollar Tree beat profit expectations as the low-priced chain continued to benefit from shoppers trying to get the most for their money.
GameStop sank after video game retailer delivered a disappointing second quarter earnings outlook, despite stronger-than-expected results for the first quarter.
Limited Brands fell Thursday despite reporting a 47 percent gain in profits and a double-digit gain in same-store sales. Also Lazard Capital raised its price target for the owner of Victoria's Secret to $55 a share from $45.
Also trading lower was Hot Topic , which reported a bigger loss in the first quarter than expected, and Children's Place , which beat earnings expectations but reported little change in profit margins.
More retail earnings will be reported after the bell when Gap releases results, and cloud computing company Salesforce.com also delivers earnings.
Elsewhere, Sodastream jumped after news the maker of home carbonation systems plans to create products for offices, restaurants and the hospitality industry next year, the company CEO told Reuters.
In M&A news, Thermo Fisher Scientific is buying Phadia, a privately-held Swedish company, for about $3.5 billion in cash. Phadia makes blood test systems.
Several economic reports released on Thursday provided investors with evidence the economy remains weak.
The Philadelphia Fed's business activity index tumbled to 3.9 in May from 18.5 in April, a surprising drop. Economists had expected the index to rise to 20, according to Reuters.
Also, existing home sales fell 0.8 percentin April, according to the National Association of Realtors. Economists had expected home sales to rise.
Initial claims for unemploymentfell by 29,000 to 409,000 in week ended May 14 from an upwardly revised 438,000 claims the week before, the Labor Department said. Economists surveyed by Reuters expected claims to fall to 420,000 from the previously reported 434,000.
The four-week moving average of claims, however, reached a six-month high, rising 1,250 to 439,000. Continuing claims fell to 3.71 million in the week ended May 7 from 3.79 million.
Japan got word on Thursday that the country officiallyhad fallen into recession in the first quarteras a result of the multiple disasters in March.
Shares in Europe closed higher, led by energy stocks.
On Tap This Week:
THURSDAY: Money supply; Earnings from Salesforce and Gap after-the-bell.
FRIDAY: JCPenney shareholder meeting, Macy's shareholder meeting, Time Warner shareholder meeting; earnings from Ann Taylor before-the-bell.
More on CNBC.com