Stocks Close Flat As Tech Selling Is Offset By Energy Rally

Stocks closed near the unchanged mark as investors pulled money out of the tech sector and moved into energy stocks.

"With the recent volatility that we've had, investors are taking a closer look at their portfolios and they're a little more cautious," said Ron Papanek, a strategist with RiskMetrics Group. "It's one of the reasons that you've seen ... the riskier sectors do a little bit worse here."

The major markets ended little changed a day after rallying sharply on comments from the Federal Reserve, which said it was moving to a more neutral position on interest rates.

"Investors are digesting the big gains from yesterday," Brian Hicks, editor of Wealth Daily, told CNBC.com. "They made a lot of money yesterday and are waiting it out. The price of oil has really popped today and there is continued fallout from the subprime market, investors are seeing what happens towards the end of the week."

The energy sector saw strong gains amid a range-bound overall market. Crude oil prices rose more than 3%, triggering a run on oil companies such as Exxon Mobil. The financial sector was the biggest laggard among the 10 S&P sectors, overtaking technology as the day's loser. Tech stocks were hit by a profit warning from cell phone maker Motorola.

"I think the market has gone from worrying about the Fed, which is what we saw yesterday," said Stephen Wood, portfolio strategist at Russell Investment Group. "As that fear moves away, we're now worrying about earnings which is precisely what portfolio managers and market strategists ought to be doing."

Motorola shares traded lower after the company said sales and earnings have further deteriorated and projected a first-quarter loss, prompting the cell phone maker to replace its CFO and name a new president and chief operating officer.

Handheld device maker Palm fell after analysts said the odds of a takeover by Motorola or Nokia are now considerably lower. Palm is set to report quarterly earnings after Thursday's close of trading.

Shares of Countrywide Financial declined after the lender said subprime mortgage defaults on 2006 loans could turn out to be the worst in the company's history.

Pfizer traded modestly lower after a federal appeals court invalidated the pharmaceutical giant's patent on Norvasc, paving the way for earlier-than-expected generic competition.

KB Home posted a lower quarterly net profit, reflecting the sharp decline in the U.S. housing market, although the results came in better than expected.

Intuit traded down sharply after the tax software maker reported disappointing sales of its TurboTax software. "We think Intuit is losing market share to H&R Block, which reported that its digital tax clients rose 15% at the end of February," said Jim Yin, an analyst with S&P Equity Research.

Amazon.com shares fell after Borders dropped the online retailer as its third-party distributor.

Shares of consumer goods giant General Mills gained after the company said third-quarter profit rose 9% as strong sales offset rising prices for ingredients.

New York light crude futures closed up 3.5% on the New York Mercantile Exchange, well above $61 a barrel, after government data showed a drop in gasoline inventories.

Bonds fell, pushing yields higher.

Broad Rally In Europe, Asia

In Paris, the CAC-40 closed strongly higher as Valeo rose on speculation that private equity firm Apollo could acquire the French auto parts maker in a deal potentially worth 3.2 billion euros, or $4.3 billion.

Frankfurt's DAX jumped 2%, led by gains in DaimlerChrysler and Siemens. Chrysler CEO Tom LaSorda told a group of auto dealers that a potential sale or spinoff would be completed quickly.

In London, the FTSE-100 ended up about 1% as retailer Next gained following a strong earnings report.

Tokyo's Nikkei 225 Average climbed 1.5% to end at its highest close in three weeks as Canon and other blue chip shares gained amid growing optimism about the U.S. economic outlook. Shares of Hitachi rose on news of the company's restructuring plans for its hard disk drive business.

In South Korea, the Kospi Index also finished at its highest close in three weeks as exporters such as Samsung Electronics gained.

Hong Kong stocks rose across the board amid a perceived softening stance by the U.S. Federal Reserve, with HSBC Holdings and property stocks leading the way.