Updated from 4:06 p.m. EDT

Stocks ended Friday's session with gains, but closed the week with losses, as investors mulled over the government's new tax package ahead of the Memorial Day weekend.

The Dow Jones Industrial Average gained 7.36 points, or 0.1%, to 8601.38, but finished down 77.59 points, or 0.8%, for the week. The Nasdaq gained 2.54 points, or 0.2%, to 1510.09 on Friday, but fell 28.44 points, or 1.8%, for the week. The S&P 500 gained 1.35 points, or 0.1%, to 933.22, and ended the week down 11.08 points, or 1.2%.

Early Friday, the House approved a $350 billion tax-cut measure, which will include temporary relief of dividend and capital gains taxes. The Senate also approved the plan, boosting the market from its early morning lows, and extending Thursday's rally.

With little in the way of economic or corporate news, brokerage research was driving trading on Friday.

Merrill Lynch downgraded shares of Lucent ( LU), which have more than quadrupled since October, to neutral from buy, based on valuation. Lucent was down 12 cents, or 4.7%, to $2.43.

Qualcomm ( QCOM) shares were down 45 cents, or 1.4%, to $30.90 after SG Cowen dropped the company to market perform from outperform, telling investors that excess inventory, low demand and stiffer competition will pressure fiscal 2004 earnings.

Microsoft ( MSFT) CEO Steve Ballmer said he was selling stock in the company to diversify his assets. According to the company, Ballmer held 470 million shares as of September 2002. In a statement, Ballmer said, "Even though this is a personal financial matter, I want to be clear about this to avoid any confusion; I remain excited about the potential for our technology to change people's lives, and I remain as committed to Microsoft as ever." Shares were up 6 cents, or 0.3%, at $24.22.

Among sectors, homebuilders were nailing down some of the session's biggest gains, with KB Home ( KBH) up $2.03, or 3.7%, to $57.39; Ryland ( RYL) up $1.84, or 3.1%, to $60.44; and Beazer Homes ( BZH) up $1.88, or 2.4%, to $81.33. Others in the space, such as Hovnanian Enterprises ( HOV) and Lennar ( LEN), were also posting sizable gains, with the Dow Jones Home Construction Index up 2.3%, jumping to a new 52-week high.

Utility stocks were also on the rise. American Electric Power ( AEP) was up $1.24, or 4.5%, to $28.54; Southern ( SO) was up $1.46, or 4.9%, to $31.21; and Public Service Enterprise ( PEG) was up $1.95, or 4.9%, to $41.95.

Merck ( MRK) shares were off 9 cents, or 0.2%, to $55.46 despite a positive note from Friedman Billings Ramsey, which upgraded the company to outperform from market perform, telling investors that its Medco spin-off will help unlock value in Merck's pharmaceutical business.

Autodesk's ( ADSK) shares were down 69 cents, or 4.4%, to $14.85. Late Thursday, the software maker reported that fiscal first-quarter income and revenue were down, and warned that the current quarter wouldn't meet Wall Street's expectations.

Marvel Technology ( MRVL) reported first-quarter sales that beat analysts' forecasts and said it had a profit for the first time in more than two years. Shares of the company, which makes chips for hard drives, were up $4.52, or 16.4%, to $32.10. Broadcom shares were up $1.08, or 5.2%, to $22.03.

If you liked this article you might like

Check the Math on Air Fares

Check the Math on Air Fares

US Airways Circles as Pilots Bicker

US Airways Circles as Pilots Bicker

Departure of Delta's Song Unit Boss Stirs Questions

Departure of Delta's Song Unit Boss Stirs Questions

Boeing Boosts Jet Deliveries

Boeing Boosts Jet Deliveries

CEO Gilmartin Will Survive Recall

CEO Gilmartin Will Survive Recall