Updated from 4:05 p.m. EDT

Bulls made another successful run Tuesday, encouraged by strong earnings from

Home Depot

(HD) - Get Report

and tame inflation news, but a turnaround in oil prices trimmed some of the early gains by the close.

The

Dow Jones Industrial Average

gained 16.96 points, or 0.17%, to 9971, having briefly regained the 10,000 level; the

S&P 500

rose 2.29 points to 1081.63, while the

Nasdaq Composite

added 12.41 points, or 0.7%, to 1795.25. The 10-year Treasury note was down 17/32 to yield 4.19%, while the dollar was higher against the yen and euro.

Volume was relatively light with only 1.1 billion shares changing hands on the

New York Stock Exchange

, with advancers beating decliners roughly 6 to 4. On the Nasdaq, volume was just under 1.3 billion shares, and advancers also beat decliners by about 6 to 4.

Crude futures for September delivery closed 65 cents higher at $46.70, shy of Friday's record high, after trading lower for most of the morning. Traders continue to contend with a cauldron of stimuli, including a mortar blast that left at least seven people dead in Baghdad, more violence in Najaf, Iraq, and Yukos' uncertain fate. Easing the pressure was the final count in Venezuela's presidential referendum, which showed incumbent Hugo Chavez receiving a strong majority.

"Seems to me that the market environment is not so bad, in the sense that the economic growth appears to be continuing," said Subodh Kumar, chief investment strategist at CIBC World Markets. "There were concerns that things were slowing down because of the data from last week, but I think the last couple of days the focus has been more on the idea that momentum would be slowing but the overall level of activity is still pretty good.

"Oil is a weight on the markets" he said, "but I think the potential is for oil prices eventually to be moving lower."

The government said consumer prices fell 0.1% in July, after a 0.3% gain in June. Economists expected a gain of 0.2%. The core rate, which excludes energy and food costs, rose 0.1%, the same pace as in June, but less than the expected increase of 0.2%.

In addition, housing starts jumped 8.3% and building permits rose 5.3%. New construction hit an annualized level of 1.978 million units. Permits -- an indicator of future activity -- rose to 2.055 million units. Both were much stronger than economists' forecasts.

Peter Cardillo, chief market analyst at S.W. Bach & Co., said that the economic news was strong but oil prices were keeping a lid on the markets.

"The reversal in oil may certainly be holding the markets back," he said. "But it's possible that people just start paying less attention to a 50-cent swing in oil.

"Until we have something definitive to put our hats on, it does look like a technical bounce in an oversold market," he added. "I don't think we're going to have a straight move to significantly higher levels from here. I think we're going to have to wait well into the fall until we see the conditions in place to sustain a strong rally."

Among stocks, Home Depot's second-quarter earnings rose 19% to $1.5 billion, or 70 cents a share, on an 11% jump in sales to $20 billion. Excluding items, the retail chain earned 71 cents a share, beating estimates by 6 cents. Home Depot also raised its estimate of 2004 earnings growth, saying it now expects a gain of 14% to 17%, up from previous guidance of 10% to 14%. The stock closed up $1.23, or 4%, to $35.21.

Tech shares derived support from positive remarks made by a

Motorola

(MOT)

executive to

Reuters

.

"We obviously had a very good first and second quarter where we blew past anybody's estimates of what we would do," said Geoffrey Frost, senior vice president for Motorola's mobile phone division. "We feel very good about the second half of this year given the product portfolio, and as we accelerate our product development time, we expect momentum to continue."

Motorola was ended up 70 cents, or 4.9%, to $15.12.

Motorola's momentum helped other components of the Philadelphia Semiconductor Index such as

LSI Logic

(LSI) - Get Report

which was up over 3%; and

Applied Materials

(AMAT) - Get Report

which was up almost 3% ahead of its earnings expected to be released today after the bell. The overall index was up over 2%. The Biotech Index also saw more than 5% gains from

Human Genome

(HGSI)

and

Millennium Pharmaceuticals

(MLNM)

.

After the bell, Applied Materials said it swung to a profit in its fiscal third quarter, beating estimates by 1 cent a share. The Santa Clara-based maker of semiconductor tools earned $440.6 million, or 26 cents a share, compared with a loss of $36.8 million, or 2 cents a share, in the same period last year. Revenue doubled to $2.24 billion.

Another sprawling retail chain,

Staples

(SPLS)

, said second-quarter earnings soared 39% to $122.5 million, or 24 cents a share, on a 9% jump in revenue to $3.09 billion. Analysts had been expecting earnings of 22 cents a share in the most recent quarter. Shares of Staples were closed at $28.87, up 99 cents, or 3.55%.

Agricultural equipment giant

Deere & Co.

(DE) - Get Report

announced that earnings for the third quarter grew 62%, beating analysts' estimates by 8 cents. The company earned $401.4 million, or $1.58 a share, up from $247.5 million, or $1.02 a share, in the same period last year. Shares of Deere & Co. finished down 91 cents, or 1.5%, to $60.11.

Shares of cosmetics manufacturer

Estee Lauder

(EL) - Get Report

plunged 9% after it missed analysts' earnings estimates by a penny. Guidance also fell short of the consensus. The company reported profits of $71.1 million, or 31 cents per share, compared with $47.2 million, or 20 cents a share, a year earlier. Shares finished down $3.50, or 8.1%, to $40.

Overseas markets were higher, with London's FTSE 100 closing up 0.2% to 4358 and Germany's Xetra DAX adding 0.2% to 3705. In Asia, Japan's Nikkei added 0.4% overnight to 10,726, while Hong Kong's Hang Seng gained 0.3% to 12,256.

On Monday, falling oil and solid guidance from Home Depot rival

Lowe's

(LOW) - Get Report

helped spur stocks to strong gains, albeit in weak volume. The Dow closed up 129.20 points, or 1.3%, to 9954.55, while the S&P 500 added 14.53 points, or 1.4%, to 1079.33. The Nasdaq added 25.62 points, or 1.5%, to 1782.84.

Before Wednesday's opening bell, earnings are due out from

Brown Shoe

(BWS)

, expected to post second-quarter profits of 40 cents a share, down from 62 cents a share, in the same period last year; and

Ross Stores

(ROST) - Get Report

, expected to report second-quarter earnings of 29 cents a share, down from 35 cents a share in the prior year.

After the bell, earnings are due out from

Medtronic

(MDT) - Get Report

and

Nortel

(NT)

.

There are no major economic reports due for release.

There is no economic news Wednesday.