The index slipped as much as 634 points between July 27 as the political bickering intensified and Aug. 5, when S&P downgraded the national credit rating, citing the weakening of U.S. political institutions as a reason for the cut.
On Friday, stocks pared losses as investors took encouragement about the economy from a report by the University of Michigan showing that consumer confidence rose more than expected in November.
The Dow finished up 4.07 points at 12,815.39. The S&P advanced 2.34 points to 1,379.85, and the Nasdaq composite gained 9.29 points to 2,904.87.
Stocks are well below the highs of this year. The S&P is down 5.5 percent from its peak of 1,465 in September, when the Federal Reserve announced a third round of a bond-buying program intended to hold down borrowing costs.
The dimming outlook for Europe also weighed on markets this week. The European Commission, the executive arm of the European Union, cut its forecast for economic growth in the region Wednesday.
The yield on the 10-year Treasury note was little changed at 1.62 percent compared with 1.61 percent late Thursday. The yield on the benchmark government security has tumbled from as much as 1.84 percent Sept. 17, as investor aversion to risk has grown. Treasury yields fall as investor demand pushes up prices.
Among other stocks making big moves:
— Walt Disney fell $2.98, or 6 percent, to $47.06 after it said that advertising sales were flat at its ESPN unit, raising concern about the outlook for growth.
— Online deals company Groupon slumped $1.16, almost 30 percent, to $2.76 after it disclosed late Thursday that it was hurt by the economic problems in Europe and growth failed to meet expectations.
— J.C. Penney dropped $1.05 cents, or 4.8 percent, to $20.64 after the company reported a loss that was larger than investors were expecting. Shoppers have been abandoning the store after it got rid of blockbuster sales in favor of everyday low prices.
— Kayak Software surged $8.63, or 28 percent, to $39.67 after the company said it had agreed to be bought by rival travel website Priceline.com.