Stocks rose, giving the major indexes their first back-to-back gains in almost three weeks. Software shares rallied on a prediction that Oracle's profit will exceed estimates, and insurers climbed after MetLife forecast higher earnings next year.

The Dow Jones industrial average rose 14.88, or 0.2 percent, to 8589.14, and the Nasdaq composite index advanced 5.83, or 0.4 percent, 1396.59. The Standard & Poor's 500-stock index rose 0.51, or 0.1 percent, to 904.96.

Benchmark indexes fluctuated between gains and losses for much of the session.

The Commerce Department is expected to report Thursday that retail sales excluding automobiles probably rose 0.2 percent in November, less than one-third October's 0.7 percent rise, according to the median forecast of economists surveyed by Bloomberg News. Consumer sentiment also rose, economists expect a survey by the University of Michigan to show on Thursday.

Software shares climbed after Lehman analyst Neil Herman said Oracle may top consensus revenue and earnings estimates when it reports quarterly results on Dec. 18. Oracle, the third-biggest software maker, jumped 60 cents, to $11.30.

Microsoft, the world's biggest software maker, added 65 cents, to $54.66.

Rational Software gained 25 cents, to $10.54, above the $10.50 International Business Machines agreed to pay for the company. Speculation circulating on message boards maintained by Yahoo and others that Microsoft would make a higher offer are driving the gain, said Kaufman Brothers analyst Kevin Buttigieg. Spokesmen for Rational, IBM and Microsoft declined to comment.

MetLife climbed $1.50, to $28.15. The largest U.S. life insurer expects profit of $2.80 to $2.90 a share next year, excluding investment gains or losses -- above analysts' estimates of $2.76, according to Thomson First Call.

American International Group, the largest insurer, rose 87 cents, to $61.62.

First Data gained $1.45, to $36.36. Morgan Stanley analyst David Togut raised his rating on the largest money transfer service to "overweight" from "underweight." Kimberly-Clark, maker of Huggies diapers, lost $1.15, to $46.78, after cutting its profit forecast. The company is losing sales to rival Procter & Gamble because of discounts and promotions. Procter & Gamble slipped 19 cents, to $87.46.

Sara Lee dropped $1.05, to $22. Prudential Securities cut its rating to "hold," saying earnings won't grow fast enough to justify its gain of as much as 30 percent since the end of September.

Baxter International dropped $2.52, to $28.78. The maker of products for treating blood diseases said it will sell 13 million shares and $850 million in other equity.

Seagate Technology Holdings dropped 50 cents, to $11.50, in its first trading day. The maker of computer disk drives raised $870 million in an initial share sale after cutting the price by as much as 20 percent to entice investors. Seagate sold 72.5 million shares at $12 each, less than the proposed range of $13 to $15.

Other Indicators

* The New York Stock Exchange composite index rose 0.05, to 482.82; the American Stock Exchange index fell 0.19, to 824.76; and the Russell 2000 index of smaller-company stocks rose 0.41, to 393.88.

* Advancing issues outnumbered declining ones by 5 to 4 on the NYSE, where trading volume rose to 1.3 billion shares, from 1.29 billion on Tuesday. On the Nasdaq, advancers narrowly outnumbered decliners and volume totaled 1.38 billion, down from 1.43 billion.

* The price of the Treasury's 10-year note rose $2.19 per $1,000 invested, and its yield fell to 4.02 percent, from 4.05 percent on Tuesday.

* The dollar fell against the Japanese yen and rose against the euro. In late New York trading, a dollar bought 123.62 yen, down from 123.71 late Tuesday, and a euro bought $1.0084, down from $1.0091.

* Light, sweet crude oil for January delivery settled at $27.40 a barrel, down 35 cents, on the New York Mercantile Exchange.

* Gold for current delivery rose to $324.80 a troy ounce, from $323.50 on Tuesday, on the New York Mercantile Exchange's Commodity Exchange.