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.

Novell ( NOVL) was up 38 cents, or 14%, to $3.10 after the software market narrowed its loss substantially on higher revenue.

Clothing retailer Gap ( GPS) posted earnings that topped Wall Street expectations late Thursday. The retailer's stock was down 69 cents, or 4%, to $16.51.

In other retail news, Aeropostale ( ARO) was upgraded to buy from neutral by Fulcrum Global Partners, which was impressed with the company's strong results. Shares were up 74 cents, or 3.8%, to $20.32.

Frontier Airlines ( FRNT) announced fourth-quarter losses that matched Wall Street expectations, but snapped a five-year streak of fiscal profitability due to the difficult travel environment. Shares were up 44 cents, or 7.2%, to $6.59.

Prudential ( PRU) announced an agreement to sell its property and casualty insurance divisions to Liberty Mutual, while also signing an agreement to sell its New Jersey property and casualty insurance operations to the Palisades Group. Shares of Prudential were up 13 cents, or 0.4%, to $32.88.

PacifiCare ( PHSY) shares were up 41 cents, or 1.1%, to $38.38 after the company announced that it will be moving over to the New York Stock Exchange on June 6, trading under the new ticker of PHS. PacifiCare management said, "NYSE's auction market structure will result in decreased price volatility and improved liquidity in the company's stock."

Overseas markets were mixed, with London's FTSE 100 closing down 11 points, or 0.3%, at 3980, and Germany's Xetra DAX ending down 42 points, or 1.5%, at 2823. In Asia, Japan's Nikkei closed up 133 points, or 1.7%, at 8184, while Hong Kong's Hang Seng gained 172 points, or 1.9%, to 9303.

Treasuries rallied, but the 10-year note was down a bit, with a yield of 3.34%. Crude oil prices for future delivery were higher in London. The euro was up at $1.180, as the dollar headed into its seventh consecutive week of losses against the European currency.

The U.S. markets will be closed Monday for Memorial Day.