Updated from 4:20 p.m. EDT

Stocks in New York stayed strong through the finish Thursday as a rally in technology and a relatively positive manufacturing report helped investors look past a series of otherwise disappointing economic data.

The Dow Jones Industrial Average had a shaky start, but shook off early losses to close up 94.28 points, or 0.73%, to 12,992.66. The S&P 500 climbed 14.91 points, or 1.06%, to 1423.57. The tech-heavy Nasdaq Composite enjoyed a particularly good day, tacking on 37.03 points, or 1.48%, to 2533.73, as component CNET ( CNET) surged on buyout news.

In spite of that move, market sentiment was bearish at the open, but investors perked up after Northeastern factory activity data showed vast improvement. The Philadelphia Fed Index came in at negative 15.6 for May -- still a contraction, but far less egregious than last month's decline of 24.9, and better than the economists' consensus for negative 19.

The Real Story Wrap: May 15

"Overall the survey is soft," said Ian Shepherdson, chief U.S. economist with High Frequency Economics, in an emailed statement, "but its weakness has not been fully reflected in the one industrial survey that really matters, the Institute for Supply Management report."

The ISM dispatches monthly nationwide manufacturing numbers, and its next installment is due on June 2.

Shepherdson added that the Federal Reserve's industrial output numbers show that "manufacturing is now struggling, though it is certainly not in meltdown." The report revealed that industrial production fell 0.7% in April, worse than the 0.3% decline that had been expected. March was revised to show an increase of only 0.2%, rather than the 0.3% uptick that had been reported.

Still, said Tony Crescenzi, chief bond strategist at Miller Tabak and contributor to RealMoney.com, a sister site to TheStreet.com, those production numbers are "not a major surprise."

"April's drop overstates the impact of the economy on output, as strikes in the automobile sector shaved three-tenths of a percentage point from total output," Crescenzi wrote. He also cited the fact that April saw a large 1.2% decline aggregate hours worked in the manufacturing sector.

Shepherdson further noted that the declines were broad, even stripping out car production: consumer goods, materials, construction supplies and business equipment, he pointed out, all sustained drops. "The dollar value of business equipment produced -- a key indicator of capital spending -- fell a hefty 1.8%, after being flat for the past three quarters or so," he added. "Further declines would be very worrying."

Capacity utilization was also a bit light, coming in at 79.7% compared with the 80.1% consensus forecast.

Meanwhile, New York factory data -- the Empire State Index -- registered at negative 3.2 for May, down from a slight uptick in April and worse than break-even expectations

Elsewhere on the economic docket, jobless claims were roughly in line with expectations, rising by 6,000 to 371,000. That was about 1,000 more than had been predicted.

Stocks' breadth was positive. Roughly 1.90 billion shares changed hands on the New York Stock Exchange, with advancing issues outrunning decliners by a 7-to-3 margin. Volume reached about 2.20 billion shares on the Nasdaq as winners beat losers 3 to 2.

On the corporate front, CBS ( CBS) would buy Internet media company CNET for $1.8 billion. That news lifted CNET by 43.5%, but CBS was slipping 2.4%.

Separately, General Electric ( GE), a component of the Dow, is considering selling or parting ways with its appliances division, according to The Wall Street Journal. The unit could fetch $5 billion to $8 billion, the report said. Still, after a brief rise out of the gate, shares closed off 14 cents to $32.37.

Also, billionaire investor Carl Icahn has moved to replace 10 directors on Yahoo!'s ( YHOO) board, telling chairman Roy Bostock in a letter that the company "acted irrationally and lost the faith of shareholders" in turning down Microsoft's ( MSFT) sweetened takeout offer. Recently, reports surfaced that Icahn had begun acquiring large amounts of Yahoo! stock.

Earlier this month, Microsoft upped its bid for the Internet-portal operator by $5 billion in a last-ditch attempt to prod Yahoo! into agreement. But Yahoo! remained defiant, so Microsoft, which had first proposed the combination in February, finally dropped the offer. Yahoo! shares finished ahead by 2.6%.

Also in the tech space, VMware ( VMW) shares leaped 8.7% a day after CEO Diane Greene voiced confidence on the firm's place in the virtualization-software business, even against the likes of Microsoft, at VMware's first annual meeting as a public company. EMC ( EMC), VMware's majority owner, climbed 6.7%.

Elsewhere, Britain-based bank Barclays ( BCS) reported a $1.94 billion writedown and saying its first-quarter profit had withered from last year. Shares ended down 8 cents at $33.23.

J.C. Penney ( JCP) said its first-quarter income plunged by 50% from a year earlier, and the retailer predicted that 2008 will be a difficult year. Still, shares were up 4.7%.

In notable analyst calls, Friedman Billings upped TiVo ( TIVO) to market perform from underperform, and Needham raised flash-memory card maker SanDisk ( SNDK) to buy from hold. Dow component Chevron ( CVX), an oil-and-gas giant, was upgraded to buy at UBS.

TiVo shares jumped 6.9%, SanDisk moved up 5.4%, and Chevron added 1.5%.

Back on the data side, the U.S. Treasury said net foreign purchases of long-term securities totaled $80.4 billion, up from a downwardly revised $64.9 billion in the prior month.

Among commodities, crude oil had a volatile day, reaping big gains early on before pulling back sharply, then settling down just 12 cents at $124.12 a barrel. Also, gas prices at the pump continued their relentless climb, with the nationwide average hitting yet another new high of $3.776.

Gold futures added $13.50 at $880 an ounce. The U.S. dollar nudged higher against the euro to settle at $1.5452, but lost 0.5% to the yen at $1.5452.

Treasury prices were jumping. The 10-year note lifted by 23/32 in price to yield 3.82%, and the 30-year bond was up 29/32 in price, yielding 4.56%.

Markets abroad were mixed. In Asia, Tokyo's Nikkei 225 added 0.9% overnight, but the Hang Seng Index in Hong Kong slipped 0.1%. As for European bourses, London's FTSE 100 climbed 0.6%, and the Paris Cac closed marginally higher. Germany's Xetra Dax was slightly lower at 7081.

More from Markets

Inside Carnival's Mind Blowing New Horizon Cruise Ship (Video)

Inside Carnival's Mind Blowing New Horizon Cruise Ship (Video)

Jim Cramer: The 10-Year Yield Could Go to 2.75%

Jim Cramer: The 10-Year Yield Could Go to 2.75%

Oil Slumps, Gas Spikes Ahead of Holiday Weekend; Assessing the Chipmakers--ICYMI

Oil Slumps, Gas Spikes Ahead of Holiday Weekend; Assessing the Chipmakers--ICYMI

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain

Week Ahead: Wall Street Looks to Jobs Report as North Korea Meeting Less Certain

Dow and S&P 500 Decline, Energy Shares Fall as U.S. Crude Oil Slides 4%

Dow and S&P 500 Decline, Energy Shares Fall as U.S. Crude Oil Slides 4%