Stock market professionals have a favorite saying this time of year: "Sell in May and go away." The adage refers to the historical trend in which stocks perform better at the beginning and end of the year, while often languishing in the middle.

But some market analysts say that trend could get turned on its head this year because of the peculiar dynamics of presidential politics. In the fourth year of a presidential term, as campaigns heat up, markets tend to underperform in the first and fourth quarters while doing much better than average in the middle of the year, says to a recent analysis.

So far, 2004 seems like it may follow that script, which could produce a strong summer rally.

After starting the year off with a bang, the broad Standard & Poor's 500-stock index topped out on Feb. 11 at 1157.76 and began an extended slide, ending the first quarter at 1126.21, then hitting bottom at 1084.10 on May 17. Since then, stocks have begun moving forward again.

On Friday, in light, pre-Memorial Day weekend trading, the S&P 500 capped its first positive week since mid-April, finishing at 1120.68, a 2.5 percent gain for the week. The blue-chip Dow Jones industrial average also finished the week higher, after four straight losing weeks. The Dow closed at 10,188.45 on Friday, a 2.2 percent gain for the week.

The technology-dominated Nasdaq composite index also turned in a positive week, its second in a row, gaining 3.9 percent to close at 1986.74. All three indicators were mostly unchanged on Friday.

Sam Stovall, chief investment strategist at S&P, said the fourth year of a presidential cycle tends to buck normal trends for a number of reasons.

"Stocks tend to underperform in the first quarter because of uncertainty about who will be nominated" and what the campaign debate will be like, he said. "Then they outperform in the second quarter because investors know who is running and there is much less uncertainty.

"The third quarter is often substantially stronger than usual because there is a bit of euphoria surrounding the conventions. . . . Then investors act like teenagers who have borrowed against their allowance, and the markets tend to underperform in the fourth quarter."

According to Stovall's research, since 1945 S&P 500 stocks gained an average of 2.4 percent in the first quarter and 2.1 percent in the second. During presidential election years in that period, S&P 500 stocks have typically gained 1.3 percent in the first quarter and 3.7 percent in the second quarter.

Historically, the third quarter has been the worst for stocks, with the S&P 500 gaining an average of 0.1 percent. In a presidential election year, however, S&P 500 stocks have gained an average of 1.6 percent in the third quarter. The fourth quarter is usually the best for stocks, with an average gain of 4.2 percent in the S&P 500. But that gain drops to 3.1 percent in presidential election years.

Overall, the S&P 500 has gained an average of 8.6 percent in presidential election years in the post-World War II era. That is the second-biggest advance after the average 18 percent jumps in the third year of a presidential term, when incumbents typically pursue their most stimulative policies to boost the economy heading into an election. Stimulative policies in the months running up to the election may also help account for strength of the second and third quarters in the final year of a presidency, according to some analysts.

Stock market analyst Tom McClellan, of the McClellan Market Report, has also looked at presidential election year data and come to a similar conclusion: The lows hit in May may precede a summertime rally.

Not everyone buys into the notion that presidential cycles can predict the course of the stock market. Some quantitative analysts are especially skeptical, saying there is insufficient data on which to base firm conclusions.

"We just haven't had enough presidents," said Kevin M. Johnson, research director at Aronson, Johnson and Ortiz LP, an investment firm in Philadelphia that manages $14.8 billion. "Come back and ask in a thousand years. We have enough to know that maybe, sort of, kind of" there is a pattern. "But in the mean time it's grasping at straws to a large extent."

And every presidential election year is different. The current one includes a war in Iraq, the threat of terrorist attacks, continued high energy prices and rising interest rates.

"When you have war and the terrorist situation, that can really skew results significantly. I'm not sure the historical pattern will necessarily hold," said Sung Won Sohn, chief economist at Wells Fargo & Co.

Sohn said that nonetheless, the summer could be unusually positive for stocks, particularly if oil prices settle and the situation in Iraq improves.

"Right now we have a basic tug of war between economic forces and geopolitical concerns," he said. "On the economic side, it's pretty clear that growth should remain healthy even though it might slow down a bit. And corporate earnings continue to exceed everyone's expectations and will continue to."

The question, Sohn said, is whether stocks will be able to break out of their seesaw trading range. And that will largely depend on geopolitics.

Stovall said that if the geopolitical situation improves, stocks have significant room to grow because corporate balance sheets are strong and share prices are not especially high by historic standards.

Other Indicators

* The New York Stock Exchange composite index fell 7.58, to 6484.72; the American Stock Exchange index fell 1.90, to 1198.11; and the Russell 2000 index of smaller-company stocks fell 0.28, to 568.28.

* Advancing issues outnumbered declining ones by 4 to 3 on the NYSE, where trading volume fell to 1.17 billion shares, from 1.44 billion on Thursday. On the Nasdaq Stock Market, advancers narrowly outnumbered decliners and volume totaled 1.2 billion, down from 1.62 billion.

* The price of the Treasury's 10-year note fell $3.75 per $1,000 invested, and its yield rose to 4.65 percent, from 4.60 percent on Thursday.

* The dollar fell against the Japanese yen and rose against the euro. In late New York trading, a dollar bought 110.25 yen, down from 110.99 late Thursday, and a euro bought $1.2213, down from $1.2268.

* Light, sweet crude oil for July delivery settled at $39.88, up 44 cents, on the New York Mercantile Exchange.

* Gold for current delivery fell to $394.00 a troy ounce, from $394.90 on Thursday, on the New York Mercantile Exchange's Commodity Exchange.