By one measure, stocks are as pricey as they were before the dotcom bubble burst, and that should give investors pause moving forward, according to Doug Ramsey of The Leuthold Group.

The firm's chief investment officer said in a note Friday that the S&P 500's price-to-sales ratio is around 2.2, near the highs seen in early 2000. The price-to-sales ratio is a valuation metric that compares a company's stock price to its revenue. The higher it goes, theoretically the more expensive the stock is.

"For the last year, we have labeled the Price/Sales ratio—which has returned to its Y2K bubble levels—the 'scariest chart in our database,'" Ramsey wrote. "Recall that the initial visit to present levels was followed by the S&P 500's first-ever negative total return decade."

The price-to-sales ratio is not the most popular valuation metric on Wall Street but it may be one that is least likely to be manipulated. Most professional investors look at the price-to-earnings ratio, which measures a company's price against its profit. However, some experts argue earnings can be manipulated through different friendly accounting practices.

Equity valuations rose sharply during the dotcom bubble as investors poured money into several nonprofitable internet companies. Once the bubble burst, many of these companies folded and the stock market lost half of its value as all of them plummeted in value. This year, the S&P 500 is up more than 6 percent and reached an all-time high in late January.

But Ramsey said the overvaluation today may be worse than during the bubble, noting the median S&P 500 price-to-sales ratio for specific companies today is more than double than it was in February of 2000. "The nature of this market's overvaluation is very different than in 2000," he said. "Overvaluation in 2000 was highly concentrated; today it is pervasive."