Error.

That at least is the conclusion that emerged when I compared the current market environment to what prevailed at major market tops of the past century.

To be sure, there are some dissimilarities as well. But that doesn't necessarily mean we're not peaking. No two tops are exactly alike. As Mark Twain famously said, even if history does not repeat itself, it does rhyme.

With that thought in mind, I examined all 35 bull market tops since the 1920s. I searched for patterns in the performance of not only the market itself, but of various internal market factors, such as earnings and price/earnings ratios. I was also interested in how small company stocks tend to perform in the months leading up to a top, both in their own right and relative to large-cap stocks. Likewise, I searched for patterns in the relative returns of growth and value stocks.

I relied on several extensive databases: Yale University Prof. Robert Shiller's database of Standard & Poor's 500 earnings and P/E ratios, as well as a database showing the relative performances of small- and large-cap stocks, as well as of the growth and value styles, maintained by Eugene Fama of the University of Chicago and Ken French of Dartmouth. To determine when bull and bear markets have begun and ended, I relied on the precise definitions employed by Ned Davis Research, the quantitative research firm.

Here's what I found.

Market rises steeply before bull dies

The typical bull market comes to an end following a period of extraordinary performance. In other words, some of a bull market's best returns are produced right before it dies.

This is important to know if you thought that this bull market would, before it breathes its last, begin to slow down and go through a period of modest performance. That's not typically the case: On a price chart, the average market top looks more like a pointed mountain peak than a plateau.

While it is of course possible that the next market top is more like a plateau, it would be the exception rather than rule: Since the 1920s, the average bull market has gained more than 21% over the 12 months prior to a top — more than double the long-term average.

Interestingly, the stock market recently has produced a return that is quite similar to this average 12-month gain prior to market tops: The S&P 500 over this period is up nearly 23%.

Riskiest stocks shine before market tops

One of the most striking patterns about these months leading up to a market top is that the riskiest stocks far outperform the most conservative ones.

Profs. Fama and French have devised two proxies for risk. One is the relative performance of value stocks over growth issues; stocks with low price-to-book ratios are deemed value stocks, while those with high ratios are in the growth category. Their second risk proxy is the performance of small company stocks relative to the large-caps.

On both counts, the historical record suggests the stock market is a particularly risky affair over the 12 months prior to market tops. The margin between the average value and average growth stock over those 12 months is nearly double that historical average; the same is true for the margin of the average small-cap over the typical large-cap.

Ominously, recent experience adheres to this pattern. The value-over-growth margin over the past 12 months has actually been nearly triple the historical average (Fama and French define value as riskier than growth). Though the small-cap sector hasn't outperformed the large-caps by as big a margin, it still is well ahead over the past 12 months.

P/Es at market tops

I had fully anticipated, when focusing on price/earnings ratios, to find that they are at extreme levels at market tops. But that is not what I found.

On the contrary, the average P/E for the S&P 500 has been 18.7 at bull market tops since the 1920s. That's only modestly higher than the 16.8 average over the entire eight-decade sample.

The reason I think this comes as a surprise is that valuations did indeed reach extreme levels at the top of the Internet bubble, and that memory lives on. The S&P 500's P/E ratio rose to above 30, in fact, in early 2000.

But if we step back from that recent experience and think about it for a moment, it makes sense that P/Es won't always be at extreme levels at bull market peaks. That's because the stock market anticipates economic downturns by quite a few months, on average. By the time earnings have stopped growing and turned downward, the bull market has long since been over.

This provides both good and bad news for the current market. On the one hand, the S&P 500's current P/E, at 17.9 when calculated on the basis of trailing earnings, is hardly at an extreme level. On the other hand, however, the market's current P/E is only marginally less than where it stood on average at past bull market tops — 18.7.

The bottom line?

Needless to say, not all historical parallels to the current market are worrisome. The index of leading economic indicators, for example, shows no signs of an imminent recession. And even though interest rates have begun to rise, the yield curve — which has an impressive forecasting record — has not only remained quite steep, but even become slightly steeper in recent weeks. That's good news, because that means it's moving in just the opposite direction of its becoming inverted, and only when it's inverted would it signal a heightened risk of a downturn.

Of course, after the next bear market, whenever it occurs, the reasons why it occurred will suddenly appear obvious. We'll all kick ourselves for not having detected them beforehand.

In advance, though, those reasons are anything but obvious. Reading the historical tea leaves is not an exact science. All we can say right now is that, when we compare the current stock market to past market tops, there are some worrisome parallels.

This doesn't automatically mean that the current bull market will soon end. But it also means we shouldn't be too confident that it won't.