Continued from page 1

Under the debt agreement, banks will take a 50 percent loss on their Greek government bonds. Europe will also add money to a financial rescue fund to protect other countries. And banks will increase their capital reserves to protect themselves.

With the October books closed, the Dow was at 11,955.01, up about 83 percent from March 2009, its lowest point after the financial meltdown. It would have to rise more than 2,200 points from here to set an all-time high.

The S&P 500 finished the month at 1,253.50, down 32 points on Monday, or 2.5 percent. The Nasdaq composite index fell 53 points for the day, or 1.9 percent, and ended October at 2,684.

Besides the Depression-heralding collapse in 1929, the crash in 1987 and the meltdown 2008, the stock market suffered through a mini-crash on Friday the 13th in October 1989 and a 554-point drop in the Dow on Oct. 27, 1997.

But the month “turned the tide” in 11 bear markets after World War II, according to the Stock Trader’s Almanac. And it turned out to be the best single month for the market from 1993 to 2007, according to the almanac.

Strong as it was, this October wasn’t close to ranking as one of the best. After the 1929 crash, the market routinely ran up much bigger percentage gains. In July and August 1932, for example, the market gained more than 36 percent each month.

Worries about a second recession have receded somewhat. The government announced last week that the economy in July, August and September grew at an annual rate of 2.5 percent, more than twice the speed of earlier this year.

The European debt crisis is still far from fixed. One troubling sign is that borrowing costs for Italy and Spain have increased, a signal that traders remain worried about those countries’ ability to pay their debts.

And there are problems closer to home. A congressional “supercommittee” has to find $1.2 trillion in deficit cuts in less than a month, and Republicans and Democrats are fighting about whether to focus on higher taxes or cuts in federal spending.

If they can’t agree, investors are worried that Moody’s, the prominent credit rating agency, will follow S&P and strip the United States of its top rating, or that S&P will lower its rating even further.