Stocks extended Thursday's big rally and the Dow Jones industrial average closed the week on a winning note for the first time in two months as investors regained hope that the corporate earnings slump may be coming to an end.

``People are shrugging off'' bad news, said Joseph Ranieri, managing director of trading at Adams, Harkness & Hill in Boston. ''In the third and fourth quarter, we could get some signs of an upturn and people are setting themselves up now.''

The Dow Jones rose 60.07 points to finish at 10,539.06. The technology-dominated Nasdaq Composite Index gained 8.97 points to 2,084.71 after late selling pared gains made earlier in the session.

The broader Standard & Poor's 500 Index rose 7.54 points to 1,1215.68.

For the week, the Dow gained 2.8 percent -- the first weekly gain since the week ended May 18 -- the Nasdaq composite rose 4 percent and the S&P 500 grew 2.1 percent.

``We don't see a particular catalyst today, just a continued change in sentiment back to positive,'' said Dan Ascani, president of Global Market Strategists Inc. ``When you have people holding back after a deep oversold condition and then a signal like decent earnings or revenue announcements it gets people in. The market tends to carry on its own momentum.''

Friday's follow-through came after the biggest stock-market rally in two months on Thursday, sparked primarily by Microsoft. The Dow component told investors to expect an improvement in quarterly sales.

Juniper, the No. 2 maker of Internet routers, gained 13 cents to $28.60. The company posted results that were in line with sharply reduced estimates and forecast a slight sales recovery by year-end. Its rival Cisco Systems Inc. added 96 cents to $18.82. 

Stocks of companies that did not hint at a later-year recovery did not fare so well. 

Advanced Micro Devices Inc. dropped $1.40 to $21.30. The chip maker reported results that topped sharply lowered expectations, but cautioned it may report a third-quarter loss and a sales drop of 10 percent to 15 percent from second-quarter levels. 

Internet security software maker RSA Security Inc. sank $3.98 to $25.97 after warning results for the second half of the year would fall well short of Wall Street estimates and economic difficulties could last for two to four more quarters. 

Intel Corp., AMD's chief rival in the market for microprocessors, swung between gains and losses. In mid-afternoon trading, shares slipped 8 cents to $30.02. The Philadelphia Stock Exchange semiconductor index eased 0.54 percent. 

Computer memory chip developer Rambus Inc. dropped $1.03 to $9.85. The company reported that profits fell as it was hit by an industry slowdown and a mounting bill for legal fights. 

Personal-care products maker Kimberly-Clark Corp. fell $1.14 to $53.89. The company, hurt by weak foreign currencies, said earnings would be below analysts' estimates and it lowered full-year guidance for the second time in three months.

Investors are getting mixed readings on the economy. A government report showed sales at U.S. retail stores gained sluggishly for a second straight month in June. But U.S. consumer confidence edged higher for the third straight month in July as Americans managed to keep their spirits up despite growing job loss. 

Advancing issues outnumbered decliners nearly 3 to 2 on the NYSE. 

The Russell 2000 index, which tracks the performance of smaller company stocks, rose 1.67 to 490.71. 

Overseas markets were mixed Friday. Japan's Nikkei stock ended the day down 0.3 percent. But Germany's DAX index rose 0.9 percent, Britain's FT-SE 100 advanced 1.0 percent, and France's CAC-40 gained 1.3 percent.

-- The Associated Press and Reuters contributed to this report.