Stocks rose Tuesday, with blue chips gaining 138 points, as a rally in insurance stocks, triggered by Marsh & McLennan's decision to fire its chief executive in the face of an ongoing probe, offset higher oil prices and weak economic data.

The Dow Jones industrial average (search) rose 138.49 points, or 1.42 percent, to 9,888.48. The Standard & Poor's 500 Index (search) closed up 16.29 points, or 1.49 percent, at 1,111.09. The technology-laced Nasdaq Composite Index (search) ended up 14.75 points, or 0.77 percent, at 1,928.79.

It was the Dow's biggest jump since June 7.

Analysts attributed at least some of the day's trading to bargain hunting, as October winds to a close, marking the end of the fiscal year for many mutual funds — a time when managers reposition themselves and make new bets. This was reflected in improved performance in some beaten down sectors, including financials, health care and pharmaceuticals.

"I would say half of it is relief over the insurance stocks and the other half is end-of-October bargain hunting. People want to sell their losers and ride the winners," said Matt Kelmon, portfolio manager of the Kelmoore Strategy Funds. "Then on the other side, there are people not wanting to make any decisions ahead of the election."

Marsh & McLennan (MMC), the world's largest insurance broker, shot up more than 9 percent, or $2.45 to $28.87 after Jeffrey Greenberg resigned as the company's chairman and chief executive and New York Attorney General Eliot Spitzer (search) said he would not press criminal charges against Marsh.

American International Group Inc. (AIG) climbed 7.5 percent, or $4.23 to $60.33 a day after saying it intends to seek a "prompt resolution of outstanding issues" with the U.S. Securities and Exchange Commission and Department of Justice.

"The insurance sector has really helped the blue chips ... that got the ball rolling in the right direction for the Dow," said Evan Olsen, head of equity trading at Stephens Inc.

Stocks scored gains despite negative economic news. The Conference Board (search) said consumer confidence fell in October for the third consecutive month, with the board's index falling 3.9 points to 92.8 from 96.7 in September. Analysts had expected a reading of 94. Consumer confidence has suffered in recent months due to a lack of job growth and high energy prices, and investors fear that if the trend continues, consumers may not spend as much during the critical holiday retail season.

Continued volatility in oil prices kept many investors from making large bets, however. Light, sweet crude futures settled 63 cents higher at $55.17 on the New York Mercantile Exchange (search).

Home builders, mortgage bankers and other interest-rate sensitive stocks rose as U.S. Treasury debt yields held near 7-month lows after an index of consumer sentiment in October fell more than expected, adding to concerns about the economy.

The yield on the benchmark 10-year note was below 4 percent for a second straight day.

"Lower interest rates help all stocks, but they especially help stocks like Home Depot and others with a lot of debt," said Tom Schrader, managing director at Legg Mason Wood Walker.

Home builders were among the top performing groups, with the Dow Jones home builder index up 3.5 percent. Pulte Homes (PHI) was up $3.02 to $54.52.

Mortgage companies gained, with Fannie Mae (FNM) up $2.26 at $69.13 and Countrywide (COF)Financial Corp up $1.23 at $32.62.

Home Depot Inc. (HD) gained more than 2 percent, up $1 to $39.67.

Strong earnings from Lockheed Martin Corp. (LMT) and Halliburton Co.(HAL), along with a strong profit outlook from General Electric Co., cheered many investors, though Dow component DuPont Co. fell despite a credible third-quarter performance.

Lockheed Martin added 88 cents to $54.38 as its growing information technology business offset a slumping space division, helping the company post a 41 percent jump in earnings. The aerospace giant, which beat analysts' forecasts by 4 cents per share, issued a tepid full-year outlook, however.

General Electric (GE) gained 73 cents to $33.63 as it backed Wall Street's view of its fourth-quarter and full-year profit forecasts, citing strength across the conglomerate's various divisions.

Halliburton added $1.38, or 4 percent, to $35.73, even as the company swung to a loss, weighed down by continued asbestos claims settlements. Without the one-time losses, the company would have exceeded profit forecasts by 6 cents per share.

DuPont (DD) fell 78 cents to $41.40 after the chemical company swung to a profit in the third quarter despite higher raw materials costs. DuPont, which beat Wall Street expectations by a penny per share, also reiterated its full-year profit outlook, though some investors worried that materials and energy costs would eventually sap the company's profits.

U.S. Steel Corp. (X) finished up $1.60, or 4.5 percent, at $37.45, after returning to profitability in the third quarter, blowing past Wall Street profit forecasts by 58 cents per share thanks to higher demand. The company also said it expects a strong fourth quarter.

Trading was active, with 1.7 billion shares changing hands on the New York Stock Exchange, above the 1.4 billion daily average for last year. About 1.8 billion shares were traded on Nasdaq, above the 1.69 billion daily average last year.

Advancers outnumbered decliners on the NYSE by about 12 to 5, and 3 to 2 on Nasdaq.

The Russell 2000 index of smaller companies was up 5.94, or 1.04 percent, at 577.61.

Overseas, Japan's Nikkei stock average rose 0.12 percent. In Europe, France's CAC-40 climbed 0.29 percent, Britain's FTSE 100 closed up 0.41 percent, and Germany's DAX index gained 0.20 percent.

Reuters and the Associated Press contributed to this report.