Stocks fell sharply during the week as Wall Street became spooked by concerns about the credit markets and potential fallout from the struggling housing market and U.S. equities posted their worst weekly declines in several years.
The Dow Jones Industrial Average posted a weekly loss of 4.2% -- its worst on a percentage basis since 2003 -- and the S&P 500 fell 4.9%. The Nasdaq Composite dropped 4.7%, but it was only its worst loss since March.
Stocks ended with strong gains on Monday, making a modest run back near the 14,000 level, as investors were encouraged by solid earnings reports and the return of brisk mergers and acquisitions activity.
"We definitely had a lot of good news today," said Charles Rotblut, senior market analyst at Zacks.com. "There was a lot of merger news and we also had some good numbers from Merck, which is one of six Dow components reporting this week."
Merck was the biggest percentage gainer on the Dow after reporting better-than-expected earnings for the second quarter.
Positive sentiment proved to be short-lived, however, as the Dow dropped 226 points on Tuesday, following several disappointing earnings reports and renewed concerns about the housing market.
The influential financial sector fell 2.8% and was among the day's worst performing groups as Countrywide Financial, the country's largest mortgage lender, posted a decline in quarterly earnings and cut full-year guidance.
"The housing story has gone from bad to worse. It's pretty clear that the subprime market is not as well contained as a lot of people had been thinking," said David Rosenberg, North American economist at Merrill Lynch.
Stocks closed higher on Wednesday in volatile trading as better-than-expected earnings offset worries about the credit markets.
Shares of both aerospace giant Boeing and online retailer Amazon.com soared after each company reported better-than-expected quarterly results.
Stocks sold off sharply on Thursday and the Dow and S&P 500 fell 2.3%, as disappointing news from the housing industry stirred up concerns about credit markets and the U.S. economy.
"Nobody knows whose credit is worth what," said Art Cashin, director of floor operations at UBS.
New home sales fell by 6.6% in June, far worse than the 1.6% decline analysts were expecting, according to a survey conducted by CNBC and Dow Jones.
Results from Beazer Homes didn't help sentiment. The company, which is facing a deteriorating U.S. housing market and federal investigations into lending practices, posted a quarterly loss of $3.20 a share. That was significantly worse than than Wall Street estimates for a loss of 32 cents a share, according to Thomson Financial.
And homebuilder DR Horton posted a steep loss for its fiscal third quarter, as the company recorded enormous charges to write down the value of unsold inventory and deposits on land. The company posted a loss of $823.8 million, or $2.62 a share, far worse than the loss of 35 cents a share analysts were expecting, according to Thomson Financial.
The Dow was down as much as 449 points, or 3.3%, at its worst during the session, but closed with a 312-point loss. The deep selloff triggered trading curbs on the NYSE prohibiting certain types of computerized index arbitrage trading. Curbs were also in effect in Tuesday's session.
Exxon Mobil fell 4.9% after the oil giant posted a 1% drop in quarterly earnings, below Street estimates.
Apple was a bright spot following stellar results due to strong iPod sales. Apple also said it sold 270,000 of its new iPhones.
Stocks continued to struggle on Friday and a U.S. markets closed at the lows of the session following a last-minute selloff, quelling a mild afternoon rally.
Despite a volatile stock market, a number of equity strategists remained optimistic on U.S. stocks.
"People want to attribute all sorts of fundamental reasons for the selling, but all the major averages are up well over 20% from this time last year," said Bill Strazzullo, chief market strategist at Bell Curve Trading. "As far as we're concerned, it's just profit-taking."
Initial GDP data showed a U.S. economy which grew 3.4% in the second quarter, above economists' expectations.
By the end of the week, the S&P had posted its biggest percentage loss since 2002.