In Alan Greenspan's 18 years as chairman of the Federal Reserve, the ups and downs of the stock market have undergone some striking changes.

The familiar turn of the cycle every few years from bull market to bear market and back all but disappeared in the 1990s. The new pattern was more like "up, up and away."

Alas, as it turned out, bear markets were only temporarily exiled. When the long advance of stock prices finally gave way to declines at the start of the 21st century, they returned with a vengeance.

But Greenspan, who is due to turn over the helm in January to Ben S. Bernanke, did succeed in altering, at least for a time, the ways many investors think about the interplay among the economy, American politics, and the cycle of increases and declines in stock prices.

The old order was embodied in the famed "political stock market cycle," which decreed that stock prices would enjoy their best gains in years leading up to and including presidential elections in the United States. The market suffered its worst times in the other half of the cycle, the two years after elections.

The reasoning behind this was simple and clear. "Politics being what it is, incumbent administrations during election years try to make the economy look good," say Yale Hirsch and Jeffrey Hirsch in their annual Stock Trader's Almanac. Those same politicians "tend to put off unpopular decisions until the votes are counted," the Hirsches said.

The political cycle had one of its most visible manifestations in post-election years. Like clockwork, stocks endured regular drubbings in 1969 (an 11 percent decline for the Standard & Poor's 500-stock index), 1973 (down 17 percent), 1977 (down 12 percent) and 1981 (down 10 percent).

The string was broken in 1985, thanks in large measure to changes afoot at the Fed. Under Chairman Paul A. Volcker, the central bank had begun what would prove a successful long-term campaign to subdue inflation.

The S&P 500 climbed 26 percent in 1985. After Greenspan succeeded Volcker in 1987, the index rose 27 percent in post-election 1989, 7 percent in 1993 and 31 percent in 1997. These gains displayed a thoroughly bipartisan spirit, coming under Republican Presidents Ronald Reagan and George H.W. Bush in the '80s and Democrat Bill Clinton in the '90s.

In 2001, the market reverted to post-election form, with the index falling 13 percent on the heels of a 10 percent drop in 2000 -- which, by the way, represented the first election-year loss in 40 years and only the third since World War II.

That brings us to 2005, which has been a going-nowhere year for the big U.S. market averages -- though it has produced some significant bright spots elsewhere.

The average emerging-markets stock mutual fund tracked by Bloomberg, for example, gained 20 percent from New Year's through the end of last week. The average emerging-markets bond fund advanced 5.3 percent in the face of rising U.S. short-term interest rates.

"Greenspan is retiring, and his desire to get out intact may have something to do with the unusual speculative strength this year," says Jeremy Grantham, chairman of Grantham, Mayo, Van Otterloo & Co., a Boston-based manager of $90 billion. "This last year for him is more like the fourth and last year of a presidential cycle, when the overwhelming desire is to coast up to the election and not rock the boat."

Grantham views this bearishly, seeing "the potential for a downward spiral in risky assets" as Greenspan's successor takes over. "For Greenspan, there is only one quarter left of coasting," Grantham said in a recent Web site commentary.

Choruses of praise and criticism for Greenspan can be heard on all sides nowadays. Rather than add one more voice, this column will note simply that the S&P 500 rose 10 percent a year in the 18 years from the end of the third quarter in 1987, when he had just taken over the Fed job, through the third quarter of this year.

No, Greenspan didn't abolish the stock cycle in a tenure that saw one severe market break at the outset, the crash of 1987, and another near its end, the 2000-02 bear market. Nevertheless, the index's net gain for the Greenspan years can be read as an objective, and quite positive, endorsement of his work.

Alan Greenspan's 18-year tenure as chairman of the Fed has been marked by a relentless focus on inflation.