Updated from 4:08 p.m. EST

Stocks ended higher Monday after a federal judge affirmed

Microsoft's

(MSFT) - Get Report

antitrust settlement with the U.S. government and rejected stricter penalties sought by individual states. But the major averages ended well off their best levels of the day, as investors took some money off the table ahead of some key events this week.

The

Nasdaq

ended up 35 points, or 2.6%, at 1396, while the

Dow Jones Industrial Average

closed up 54 points, or 0.6%, at 8571. The

S&P 500

gained 7 points, or 0.8%, to 908. The Dow had been up 213 points earlier in the day, while the Nasdaq had been up as much as 4.4%.

"It makes sense that there'd be a little profit-taking, there is the election tomorrow and the Fed meeting on Wednesday," said Jeff Sarrett, a trader at Marblehead Asset Management. "That being said, the market is still strong overall."

Others noted that stocks were pressured in afternoon trading by comments from Defense Secretary Donald Rumsfeld, who said that call-ups of National Guard and reserve troops could begin in the near future, suggesting that a war with Iraq is still a possibility.

Software stocks rose 4% on average, aided by a 5.5% jump in shares of Microsoft after the U.S. District Court effectively ruled out tougher sanctions proposed by nine nonsettling states and only slightly modified the settlement between Microsoft and the Justice Department reached last year.

The move sparked speculation that Microsoft could begin to spend some of its $40 billion cash pile by possibly repurchasing stock or issuing a small dividend. Microsoft ended up $2.92 at $56.10.

Elsewhere in tech land, hardware stocks gained 6%, chips rose 4% and networking issues added almost 1%.

In the broader market, shares of

Disney

(DIS) - Get Report

rose 6% to $18.05 after Barron's suggested that the stock is undervalued and that its break-up value could be double the current share price.

Hopes that the

Federal Reserve

would lower interest rates on Wednesday added to the generally positive tone. The Dow advanced by 120 points Friday, as the odds of another rate cut grew to 100%. For the week, the Dow rose 73 points to finish at 8517, making it the best October for the average since 1982. The S&P 500 inched up 3 points to 901 over the five sessions, while the Nasdaq Composite added 2% on the week to 1360. That index is up 22% since Oct. 9.

Dave Briggs, a trader at Federated Investors, said stocks have been propelled by short-covering recently, but he noted that the fundamental backdrop hasn't changed.

In fact, the economy is still in danger of slipping back into recession as consumer spending continues to slow down. On Friday, the labor market showed signs of weakening, and consumer confidence is currently sitting at a nine-year low.

"I think some people are feeling they've missed out on the rally and they're getting in," Briggs said. "But I think most of the easy money has been made."

Briggs said if the Fed chooses not to cut rates or if it cuts by 50 basis points "that could surprise the market." He also noted that the Congressional elections on Tuesday could potentially impact stocks.

"A lot of people are betting on a Democratic Senate and a Republican House," he said. "If something dramatically different happens that could disappoint the market."

In earnings news Monday,

Autodesk

(ADSK) - Get Report

said earnings and revenue will be below expectations in its just-completed quarter; insurer

Anthem

(ATH) - Get Report

posted third-quarter earnings that beat the consensus by 6 cents a share and guided higher for the fourth;

DTE Energy

(DTA)

said it earned 96 cents a share, blowing away the consensus by 20 cents; and

Interdigital

(IDCC) - Get Report

warned third-quarter revenues are trending light.

Moving higher was

Cisco Systems

(CSCO) - Get Report

, which rose 5.6% to $12.31 ahead of its earnings report on Wednesday.

Tenet Healthcare

(THC) - Get Report

was another gainer following its assurances in a conference call Friday that all of its bad news is out. Tenet lost several billion dollars in market cap last week after disclosing an FBI probe into two of its doctors. The company was defended by several brokerages Monday morning and was recently up 1.9% to $27.00.

General Motors

(GM) - Get Report

fell 0.44% to $33.87 even though Banc of America raised its fourth-quarter earnings estimate on the stock after the firm raised production targets. On Friday, GM said October sales fell 32%.

Shares of

Merck

(MRK) - Get Report

fell 0.70% to $53.68 after Banc of America Securities cut its 2003 earnings expectations, citing the effect of generic competition for the firm's antiheartburn drug Prilosec.

Separately, Salomon Smith Barney analyst Glen Yeung made cautious comments on the chip equipment group, saying the sector has outperformed the S&P 500 by a wide margin since early September and that any good news about a bottoming in orders has now been priced in. He reduced his sector weighting to "market weight" from "overweight."

Applied Materials

(AMAT) - Get Report

rose 1.21% to 16.45, while

Novellus

(NVLS)

added 2.5% to 34.07.

Government bonds were lower, with the 10-year Treasury note losing 1/4 to yield 4.03%. On the economic front, factory orders fell 2.3% in September after falling 0.4% in August. The decline was better than expected, as economists had called for a drop of 3%. Meanwhile, monthly layoff announcements rose to 176,010 in October, the second-highest total of the year, according to Challenger, Gray & Christmas. In September just 70,057 layoffs were announced -- the lowest total since November 2000.

Overseas markets were broadly higher, with London's FTSE 100 adding 3.1% to 4119 and Germany's Xetra DAX up 4.4% to 3304. Japan's markets were closed, while Hong Kong's Hang Seng added 3.3% to 9720.