Updated from 4:20 p.m. EST

Stocks closed off their highs Wednesday with the

Nasdaq

coming just a fraction short of the 2100 level, as a jump in oil prices erased some of the enthusiam of a megamerger in the retail sector and a bullish quarter at

Hewlett-Packard

(HPQ) - Get Report

.

Based on preliminary tallies, the Nasdaq added 21.06 points, or 1%, to 2099.68, having spent much of the session above 2100, a level not seen since late January; the

Dow

added 6.92 points, or 0.6%, to 10,549.57, having traded within 40 points its 2004 high of 10,702; and the

S&P 500

was up 6.51 points, or 0.5%, to 1081.94, just off its recent three-year high.

Volume was heavy; some 2.22 billion shares changed hands on the Nasdaq, while 1.69 billion were traded on the

NYSE

. Advancers beat decliners by about a 2-to-1 margin.

Driving Wednesday's market was news that

Kmart

(KMRT)

will merge with

Sears

(S) - Get Report

in an $11 billion deal. The tie-up combines a pair of department store giants and creates the nation's No. 3 retailer, behind

Wal-Mart

(WMT) - Get Report

and

Home Depot

(HD) - Get Report

.

"Investors love hidden value stories," said Mace Blicksilver, managing director at Marblehead Asset Management. "That's a popular Wall Street theme, so the Sears-Kmart deal is really energizing the market."

"The retail sector took the leadership when the market originally broke out, so the Kmart-Sears deal is driving retailers and the market higher," said Paul Mendelsohn, a strategist at Windham Financial. "And retailers are a very visible and important sector, since they reflect consumer spending, which is a crucial factor in gauging the economy."

On that front, the government said housing starts jumped 6.4% in October to an annualized rate of 2.03 million units, well above the consensus forecast. Building permits, however, fell 0.7% to 1.984 units, less than expected. Meanwhile, industrial production rose 0.7% in October, while capacity utilization hit a 77.7% rate, exceeding economists' forecasts.

Bonds were volatile after the Commerce Department said its consumer price index rose 0.6% in September, about two-tenths of a percent more than expected. Excluding food and energy, the CPI was up 0.2%, compared with consensus expectations of 0.1%. Wednesday's number follows a bigger-than-expected jump in wholesale prices reported Tuesday.

In the credit markets, the 10-year Treasury note gained 19/32 in price with the yield down to 4.13% after early losses, while the dollar was lower against the yen and euro. The U.S. currency hit another record low vs. the European single currency.

"People generally discounted the CPI, especially the headline number, which was all oil," said Paul Nolte, strategist at Hinsdale Associates. "The lower dollar is boosting the miners and metal companies. This is a dynamic that is now getting on people's radar screens as the dollar keeps hitting multiyear lows."

Oil futures bounced around after the latest weekly reading on inventory stocks, with the December crude contract recently up 73 cents to $46.84. U.S. energy supplies showed a modest increase in crude but declines in gasoline and heating oil stocks, according to the Energy Department.

Overseas markets closed mostly higher, with London's FTSE 100 up 0.5% to 4796 and Germany's Xetra DAX gaining 1.6% to 4183. In Asia, Japan's Nikkei fell 0.3% overnight to 11,131, while Hong Kong's Hang Seng added 0.6% to 13,825.

Back in the U.S., Sears rose 21% and Kmart 16% after the companies shocked Wall Street with news of their linkup. Under the transaction, Kmart shareholders will do a 1-for-1 swap with a new holding company that will exchange half a share, or $50 in cash, for each Sears share.

The merger will create the a retail behemoth with annual revenue of about $55 billion. Both companies are major holdings of hedge fund manager Edward Lampert, who will be chairman of the combined firm. Sears and Kmart will continue to operate under separate brand names. Kmart also reported a profitable third quarter Wednesday.

Sears was up $7.80, or 17.3%, to $53, as some 46 million shares changed hands. Kmart jumped $7.78, or 7.7%, to $109.

Hardware giant Hewlett-Packard rallied after saying fourth-quarter earnings jumped 27% to $1.1 billion, or 37 cents a share, on a 7.7% rise in revenue. Adjusted earnings of 41 cents a share were 4 cents better than estimates. H-P expects to earn a pro forma 72 cents to 74 cents a share on revenue of $41.8 billion to $42.3 billion in the first half of its current fiscal year, surpassing estimates on both lines. The stock was recently up 47 cents, or 2,4%, to $20.15.

Network Appliance

(NTAP) - Get Report

also rose after the bell on a second-quarter earnings report that showed profit rising 14% from a year ago to $55.3 million. Excluding items, the storage networking company earned 16 cents a share, 2 cents better than forecasts.

"People do not want to miss out on this rally," said Robert Pavlik, portfolio manager at Oaktree Asset Management. "A lot of money managers were holding cash up until the election, and now they are rushing to put it to work."

Staff reporter

Gregg Greenberg contributed to this update.