Corporate earnings in a typical recession would drop enough to make stock prices as overpriced as they were in the summer of 1987.

Why? It has to do with price-to-earnings ratios, an indicator used to tell whether you're paying too much for a stock. With lower earnings possible, those ratios could go out of balance quickly.

Keep that in mind if you venture into the stock market. The bottom line is this: If there is a recession and company profits decline the typical 16 percent to 25 percent, the stock market would be back where it was right before the 1987 crash, with P/E ratios in the low 20s-to-1.

The stock market's recent ascent has put P/E ratios at around 16.5-to-1. In 1987, the ratio was about 23-to-1 for the 400 companies that make up the Standard & Poor's 400 stock index.

The P/E ratio for the stock market is a simple calculation derived by dividing the collective prices of companies (in this case the 400 S&P stocks) by the collective earnings per share of those companies. The ratio can increase either by the numerator (the stock prices) going up or by the denominator (the earnings) going down.

In a recession, the corporate earnings denominator would decline. So if stock prices remain constant, and profits drop, say, 25 percent, the P/E ratio would be almost exactly where it was in August 1987.

This isn't just an academic exercise. The U.S. economy has been showing increasing weakness in the past few months and the prospect of a recession, according to many experts, is increasing.

Leon Cooperman, chairman of Goldman Sachs Asset Management, said several things can happen. First, interest rates could drop and bail out the economy and the stock market.

Second, stock prices could decline, making P/E ratios more reasonable.

And third, the stock market could simply remain overvalued if there are enough buyers willing to put their money into equities despite the stumbling economy. In this last case, corporate earnings will eventually improve and justify the level of stock prices -- even if it takes years.

Ordinarily, more people would be betting on the first option: interest rates dropping and bailing out the economy and market. But this time around, that might not happen.

For one thing, the budget deficit (including the huge bailout of the nation's savings and loans) will cause the government's borrowing needs to rise dramatically.

Also, interest rates overseas are already high and might climb more if the reunification of Germany causes a strong increase in demand for capital.

Hugh Johnson, market strategist at First Albany Corp., said he believes that the stock market is already looking past the obviously slowing economy to the recovery that will follow.

He said that while long-term interest rates may remain high because of the international situation and the deficit, short-term rates (the ones the Federal Reserve has control over) will dip in response to the slowdown.

Johnson predicted that profits will recover by the fourth quarter of this year. The only thing that could go wrong, he said, is that inflation could rise to where the Fed cannot loosen short-term rates to get the economy going again. If that happens, P/E ratios are going to be too high for comfort.

Not only is Warren Buffett trying to sell the 44 percent stake in Geico Corp. that he holds, but the entire insurance company also is up for sale, according to one Wall Street source. The source said Salomon Brothers Inc. has informally approached potential buyers and it's clear that Buffett -- for whatever reason -- wants to get out of that investment with as hefty a profit as possible. The only way he can do that is to find someone willing to pay a premium for the whole company.

Edward Johnson had been predicting that the price of Dillard Department Stores stock would reach the mid-$70s by fall. But Johnson, an analyst at the investment firm of Prescott Ball & Turben Inc., recently had to change his opinion.

Because its earnings have been a lot better than expected, Dillard's stock last week hit $88 a share. That's not only well above Johnson's expectation, but also 52 percent higher than the stock's low point for the year.

People gave up on retailing stocks months ago when the entire industry -- thanks mostly to the chaos in the Campeau Corp. retailing operation -- seemed like it was in a rut that was deep enough to become a grave. But Wall Street pros and investors have quietly been buying shares of stores, like Dillard, that have a niche, even as the economy seems to be weakening.

Some retailers are indeed spinning their wheels. But others are lucky enough to specialize in products that are still selling well or are fortunate to be in areas where the economy hasn't softened too much. These retailers are thriving.

Which niches are safe? "Specialty retail chains are doing well, and off-price retailers are not," said Monroe Greenstein, Bear Stearns & Co.'s retail analyst. Stores that specialize in consumer electronics products also have been doing poorly, but apparel sales have been strong.

The most important rule for would-be investors is to stay away from companies that do most of their business in the ailing Northeast.

John Crudele is a columnist for the New York Post.