The Nasdaq composite index was up 36.78, or 2.2 percent, to 1,708.09, and the Dow Jones industrial average gained 172.92, or 1.8 percent, to 9,377.03. CNET's technology indexes were mixed.
"On Wednesday, the markets reversed from up to down--Thursday was lower. Friday saw the market reverse from down to up," said Ralph Bloch, an analyst at Raymond James & Associates. "This shows a degree of some strength underlying this market, as Wednesday's action didn't lead to significant further selling."
The markets were down earlier Monday after news that U.S. military aircraft attacked Taliban targets, and after a report that a Washington, D.C., postal worker has an anthrax infection. The rally later in the day was not disturbed on news that two postal workers who died recently may have been infected with anthrax.
The day's economic news came from the Conference Board's index of leading indicators, a compendium of previously announced numbers that includes statistics such as jobless claims and building permits. The index fell 0.5 percent in September, its largest decline since early 1996. The drop is a sign that the economy may remain weak into next year, according to the independent research firm.
In technology news, stocks in the chip sector saw strong advances, and companies due to report quarterly results after the bell saw their shares rise.
Shares for Altera were up $1.15, or 6 percent, to $19.98. The company, which makes programmable logic devices, or PLDs, aimed mostly at the telecommunications market, is expected to report earning of 5 cents a share for its third quarter.
Vitesse Semiconductor, up 66 cents, or 7 percent, to $9.56, is expected to post a loss of 13 cents for its fourth quarter.
CNET's Semiconductor index was up almost 5 percent.
Shares of Internet travel site Expedia, also scheduled to report earnings results after the market's close, fell 58 cents to $29.23.
EMC was up 68 cents, or 6 percent, to $12.19 after an announcement that Dell Computer will resell some of EMC's storage hardware and software. Dell Computer shares were up 50 cents to $24.55.
SBC Communications was off $2.24, or 5 percent, to $41.40, after it reported mixed third-quarter results before the opening bell. SBC also said it would cut several thousand jobs and blamed governmental regulations for many of its problems.
Among other actively traded shares, Intel rose $1.15 to $25.30; Oracle rose 41 cents to $14.95; and Microsoft rose $2.26 to $14.95.
AOL Time Warner rose 48 cents to $31.65. Yahoo rose 41 cents to $11.78, and Amazon.com was up 76 cents to $8.77.
Staff and Reuters contributed to this report.