October was the worst month for the Standard & Poor’s index of 500 stocks in 21 years — since the 1987 stock market crash.

But the final week was the best week for the market in 34 years.

 

As befits such a wild month, it was the most volatile in the 80-year history of the S.& P. 500.

 

The huge gains of the final week were reminiscent of the sharp recoveries from bear market lows in 1974 and 1982. Both of those moves came while the economy was mired in recession, as it almost certainly is now.

 

If Monday’s stock market lows prove to be the low prices for this cycle, the bear market will have ended with the S.& P. 500 down 46 percent from the peak it reached in October 2007.

 

That would make the bear market almost, but not quite, as bad as the 1973-74 bear market, which ended with the index down 48 percent.

 

In the 2000-2 bear market, the fall was 49 percent.

 

The hectic market action in October spread across most of the globe. Remarkably, the American market was one of the calmer markets during the month. Several had more volatility and larger swings in prices.

 

Nor was the volatility limited to stock prices. Oil prices fell 33 percent during October, making this the worst month for that market since oil futures began trading in 1983. Oil is down to just under $68 a barrel, from a peak over $145 in July.

 

One volatility measure, shown in the accompanying charts, is the number of days in which an index closes up or down at least 4 percent.

 

In normal times, the market goes years without having even one such day. There were none, for instance, from 2003 through 2007. There were three such days throughout the 1950s and two in the 1960s.

 

In October, there were nine such days.

 

The accompanying chart shows the months, from 1928 through the present, when the S.& P. 500 had at least five days with 4 percent moves. Most of them were during the 1929 crash and the Great Depression.

 

Until now, September 1932 held the record for the most days with big moves, at eight.

 

Two days during October ended with the index leaping more than 9 percent, something that had happened only nine times in the previous 80 years.

 

For the week, the S.& P. 500 was up 10.5 percent, the best weekly gain since a 14.1 percent rise in the week that ended Oct. 11, 1974.

 

If the rebound this week indicated that the bear market of 2007-8 had ended, it lasted just over a year and hit bottom on Monday, at 848.92. It recovered to 968.75 by week’s end.

 

There were similar moves in most major indexes. The Dow Jones industrial average ended the week up 11.3 percent, at 9,325.01, and the Nasdaq composite climbed 10.9 percent, to 1,720.95.

 

For the month, the S.& P. 500 was still down 16.9 percent, the worst showing for the index since it fell 21.8 percent in October 1987. The Dow fell 14.1 percent, and the Nasdaq index lost 17.7 percent.

 

Both moves — weekly and monthly — affected every sector and nearly every stock. Only seven of the stocks in the S.& P. 100 fell this week, while just nine were up for the month.

 

Of the 30 stocks in the Dow industrials, only one fell this week. General Motors dropped 16 cents to $5.79 amid talks on a possible merger with Chrysler and additional government aid.

 

For the month, all 30 were down, with Alcoa turning in the worst performance with a decline of 49 percent. But in the final week, it rose 22 percent, ending at $11.50 after trading as low as $9 and as high as $22.35 during the month. It traded at more than $47 last year.

 

During the bear market, financial stocks led the way down. The S.& P. financial index fell 65 percent from the high it reached in early 2007 to the low close on Monday. By Friday, the index had recovered 17 percent.

 

Internationally, Russia led the volatility parade, with an astonishing 17 days with 4 percent moves in the Micex index. It might have had more if Russia had not closed the market on Oct. 10, fearful of the selling panic that was sweeping the world.

 

That index ended the week up 42.5 percent. For the month, it was still down 28.8 percent

 

Many countries, among them Britain, Japan, India and Brazil, also showed more volatility than the United States.

 

That volatility was so high everywhere was an indication of how linked markets have become in the age of globalization. It is not just that most industrial countries appear to be in recession, or close to it. Another factor is that investors now own portfolios of shares from around the globe, and in times of stress may sell what they can, instead of just what they want to unload.

 

The period from 2003 through 2007 — when there were no daily moves of at least 4 percent in the United States — became known as the “Great Moderation” to some economists. That very lack of volatility encouraged investors to take more risks by borrowing money, and encouraged others to lend it.

 

All of the big days in September and October came after Lehman Brothers was allowed to fail. That Lehman was not deemed important enough to save signaled to investors that there was risk where they thought there was none and caused a sharp tightening of credit for many borrowers, despite efforts by central banks to push interest rates down.

 

The big advances, on Oct. 13 and again on Tuesday, came as hope grew that the financial system would be protected. The first came on the Monday after the Group of 7 finance ministers promised to take steps to protect banks. This week’s big move came amid indications that central banks would aggressively cut interest rates.

 

Such wild volatility may be an indication that a bottom was reached. The biggest week since World War II did come at the end of the 1973-74 bear market, and the biggest week in the 1980s, a gain of 8.8 percent, came just after prices hit bottom on Aug. 12, 1982.

 

Or the wild moves could just show how baffled investors are by a series of events unlike any they can remember.