Stocks kicked off the fourth quarter with a solid rally on Friday as investors bet the market would shake off continued uncertainty about the election, the war in Iraq and high energy prices to stage its traditional fourth-quarter surge.

Friday's gains, sparked by decent economic reports and led by technology shares, erased Thursday's losses and helped stocks finish higher for the week.

The tech-heavy Nasdaq composite index fared best, gaining 45.36 points, or 2.4 percent, to close at 1942.20 on Friday. For the week, the Nasdaq rose 3.3 percent.

The Dow Jones industrial average picked up 112.38, or 1.1 percent, to close at 10,192.65. The Dow added 1.5 percent for the week.

The broad Standard & Poor's 500-stock index added 16.92 points, or 1.5 percent, to close at 1131.50. The S&P gained 1.9 percent for the week. The S&P has risen seven of the past eight weeks.

Market analysts and traders attributed Friday's gains in part to a report showing that manufacturing activity continued to rise in September, though at a slower pace than in August.

A day after single-handedly dragging down the Dow, drug company Merck, which announced Thursday that it would stop selling its popular Vioxx arthritis and pain medication, rebounded slightly. After losing 27 percent of its value Thursday, Merck closed up 31 cents on Friday, at $33.31.

Money managers said that after big declines in the third quarter, many technology company stocks now appear cheap, especially in light of solid economic fundamentals that should drive consumer and business spending in the fourth quarter.

"Technology has been beaten down so much," said Samuel D. Williams, senior managing director at Carret and Co. in New York. "There is a good possibility that selected technology names could rally off the bottom based on better expectations for 2005 order rates."

Williams added that investor pessimism that marked the third quarter -- driven by earnings warnings from several large companies and fear of terrorism at the political conventions and the Olympics -- has now worked its way into stock prices, providing room for improvement in the fourth quarter.

During the quarter that ended with September, historically the worst month for stocks, the Dow dropped 3.4 percent and the S&P lost 2.3 percent. The Nasdaq, which raced ahead 50 percent last year, fell the hardest in the third quarter, dropping 7.4 percent.

Jack Caffrey, equity market strategist at the JPMorgan Private Bank, said companies have done a good job reducing investor expectations by lowering earnings estimates enough so they can deliver positive surprises as they announce third-quarter numbers in the coming weeks.

Caffrey and others said the market could perform well this fall, as it typically does after the summer doldrums, if earnings appear solid, oil prices moderate and the outcome of the presidential election becomes clear. The market does not especially care which candidates win the election, analysts said, but stocks could suffer if the outcome seems uncertain going into Nov. 2. Once the election is past, however, stocks may be poised to race ahead, they said.

But for all the optimists who predict gains in the fourth quarter, there are others who fear that trouble in the housing sector could threaten the economy and the markets.

Peter Thiel, president of Clarium Capital Management, thinks the stunning run-up in housing prices nationwide is coming to a close. "The big story right now is that the housing bubble is over," he said.

Other Indicators

* The New York Stock Exchange composite index rose 92.93, to 6663.18; the American Stock Exchange index rose 7.44, to 1279.27; and the Russell 2000 index of smaller-company stocks rose 12.09, to 585.03.

* Advancing issues outnumbered declining ones by 3 to 1 on the NYSE, where trading volume fell to 1.58 billion shares, from 1.75 billion on Thursday. On the Nasdaq Stock Market, advancers outnumbered decliners by 5 to 2 and volume totaled 1.81 billion, up from 1.62 billion.

* The price of the Treasury's 10-year note fell $5.00 per $1,000 invested, and its yield rose to 4.19 percent, from 4.12 percent on Thursday.

* The dollar rose against the Japanese yen and the euro. In late New York trading, a dollar bought 110.40 yen, up from 109.93 late Thursday, and a euro bought $1.2407, down from $1.2433.

* Light, sweet crude oil for November delivery settled at $50.12, up 48 cents, on the New York Mercantile Exchange.

* Gold for current delivery rose to $419.50 a troy ounce, from $418.70 on Thursday, on the New York Mercantile Exchange's Commodity Exchange.