Updated from 4:05 p.m. EST

Stocks ended lower Wednesday as optimistic comments from a Microsoft ( MSFT) executive late in the day failed to outweigh concerns about the overall profit outlook.

The Dow closed down 5 points at 8737. The Nasdaq ended down 18 points, or 1.3%, at 1430, and the S&P 500 lost 3 points, or 0.4%, to 917.

Stocks had been sharply lower earlier in the session, with the Dow down 89 points and the Nasdaq down 2.5% following cautious words from Hewlett-Packard ( HPQ), a profit warning from Disney ( DIS) and downgrades on the tech sector from Morgan Stanley.

But the market recovered in afternoon trading amid bullish remarks from Microsoft Chief Financial Officer John Connors. During a Credit Suisse First Boston investor conference, Connors reportedly said that investor sentiment in the technology sector is improving. Price-to-earnings ratios "have started to move to more normal and sane levels," Dow Jones quoted Connors as saying.

"Microsoft helped the techs to turn around," said Peter Blatchford, trader at Miller Tabak & Co. "The market is acting well."

Even before those remarks, the Dow had been stabilizing amid strength in defensive names such as Philip Morris ( MO), United Technologies ( UTX) and Coca Cola ( KO).

While the major averages did end off their best levels for the day -- perhaps due to concerns about the latest skirmishes in Iraq -- market watchers were generally encouraged by the action in the market Wednesday.

Brian Pears, head of equity trading at Victory Capital Management, said the Dow and S&P 500 have fallen sharply over the past two days and that some investors may be buying the dip. Both indexes have fallen 2% for the week. "There may have been some buying just because we've come down so hard," he said.

While the market is still "working off" its overbought condition, Pears said he is "constructive" on the market because he feels portfolio managers still see opportunities to make money before the end of the year. December is seasonally the strongest month of the year, with the S&P 500 posting an average gain of 1.9% for the month.

Stocks were broadly lower early Wednesday after Chief Executive Carly Fiorina said she expects to see revenue growth of 2% to 4% in fiscal 2003, down from the company's earlier outlook for 4% to 6% growth, but in line with analysts' estimates.

Fiorina declined to give guidance for the quarter under way, but said the firm plans to notch $3 billion in cost savings in the fiscal year that just began. Meanwhile, Chief Financial Officer Bob Wayman said pension costs will rise sharply next year, to an estimated $1.7 billion from last year's $1 billion or so. The company is reducing its expectation for pension returns from 9% to 8.5%. H-P fell 4% to $18.37.

Another Dow component was also feeling the heat: Disney was down 4% to $17.68 after lowering its latest fiscal fourth-quarter earnings because ticket sales for the film Treasure Planet were lower than expected. The animated epic took in only about $17 million over the Thanksgiving weekend. Disney must now write down the picture's book value to the tune of $74 million, a move that will cut 2 cents a share from earnings.

Disney also said federal regulators are investigating its disclosures about outside directors whose relatives had ties to the company.

Adding to the pessimistic tone in the technology group were some downgrades by Morgan Stanley on the chip and chip-equipment sectors, as well as downgrades on electronic contract manufacturers and enterprise hardware names. The brokerage cited expectations for a muted cyclical recovery and lackluster demand.

Morgan lowered the chip-equipment sector to in line from attractive, citing valuation concerns. "We believe the stocks need to take a breather until fundamentals catch up or visibility improves on the pace of cyclical recovery," Morgan wrote.

Contract electronics makers, known on Wall Street as electronic manufacturing services, were lowered to cautious from in line. Morgan says valuations in the group are "stretched" and risk remains to existing earnings estimates. "We expect consensus earnings estimates to trend lower in early 2003, particularly as end-market demand remains subdued and margin pressure remains from overcapacity and intense competition," Morgan said.

The enterprise hardware sector also was dropped to cautious, while semiconductor makers were lowered to in line.

A weak profit outlook from AOL Time Warner ( AOL) sent stocks to a lower close Tuesday and on Wednesday morning Morgan Stanley lowered AOL to equal weight from overweight while dropping its price target to $16 to $18 from $20. The shares were off another 2% to $13.84 after giving up 14% of their value on Tuesday.

Results from retailers continue to trickle in following the Thanksgiving weekend. Federated ( FD) said the holiday came too late to prevent its same-store sales from falling 7.4% in the month, while Office Depot ( ODP) said despite weak business, it still expects to earn 22 cents in the fourth quarter because of higher margins. Still, Office Depot was down 6% to $16.30, while Federated was off 2% to $31.25.

Software maker JD Edwards ( JDEC) and troubled hospital operator Tenet Healthcare ( THC) also issued disappointing outlooks. JD Edwards was down 11%, but Tenet was up 5%.

Losers topped winners by 16 to 15 on the NYSE and by 19 to 13 on the Nasdaq. Volume reached 1.5 million shares on the Big Board, while 1.8 billion shares changed hands on the Nasdaq.

In economic news, the Institute for Supply Management's services index came in at 57.4 in November, above both the prior month of 53.1 and expectations of 54. New orders jumped to 58.0 from 50.9, while prices paid held steady at 54.0.

In addition, nonfarm productivity rose 5.1% in the third quarter, up from an initial estimate of 4%, and better than economists' estimates of 4.5%. Unit labor costs fell 0.2%, compared with a previous estimate of 0.8%. Productivity growth rose 1.1% in the second quarter and 8.6% in the first.

Still, October factory orders came in at 1.5%, slightly below consensus of 1.7%. The previously released durable goods orders component was revised down to 2.4% from 2.8%. September's orders were revised down to -2.4% from -2.3%.

Treasuries were higher, with the 10-year note rising 6/32 to yield 4.18%.