Traders wear masks as they work on the floor of the New York Stock Exchange as the outbreak of the coronavirus disease (COVID-19) continues New York, May 27, 2020.

The stock market could be in trouble after its historic surge from the late-March lows as valuations become increasingly elevated, data compiled by RBC Capital Markets showed.

The S&P 500‘s trailing price-to-earnings ratio, a widely used valuation metric, is currently sitting at 21.61. That’s near the highs seen in early 2020, when the broader market index was trading at an all-time high. The forward S&P 500 PE ratio, which is measured using earnings estimates for the next 12 months, has jumped to 22.18, near its highest levels in almost two decades.

RBC’s data shows the market tends to fall over the next 12 months when valuations are this high, raising concern about the market’s performance going forward.

“Valuations are a clear negative for the US equity market,” Lori Calvasina, head of U.S. equity strategy at RBC Capital Markets, said in a note.

Calvasina noted that S&P 500 valuations were tracking at 1.64 standard deviations above their long-term average. To determine this, Calvasina used a model that combined market-cap weighted and unweighted S&P 500 PE ratios. On average, according to the data, the S&P 500 posts low single-digit losses one year out when valuations are this far above their long-term average.

These high market valuations come after the S&P 500 surged more than 43% since hitting an intraday low on March 23. That jump was sparked in part by unprecedented stimulus from the Federal Reserve.

To be sure, valuations have traditionally been a poor market timing tool. And some could argue low interest rates and other forms of monetary stimulus justify this type of valuation expansion.

The Fed cut rates to zero and launched an open-ended quantitative easing program to support the economy amid the coronavirus pandemic. The U.S. central bank also launched a series of programs to help small and medium-sized business and started buying corporate debt for the first time.

“US equities look highly expensive again on 2020 and 2021 EPS,” said Calvasina. “While we acknowledge that Fed stimulus has inflated P/E multiples and is likely to continue supporting lofty levels, the expansion already seen is on par with what we’ve seen in most prior QE periods.”

—CNBC’s Michael Bloom contributed to this report.

Subscribe to CNBC PRO for exclusive insights and analysis, and live business day programming from around the world.