The stock market is headed for a reckoning, according to a dire warning from leading economic research firm Capital Economics. In a recent report, the firm forecasts that the current market bubble is set to burst in 2027, potentially ushering in a prolonged period of upheaval and volatility.

What this really means is that the party on Wall Street may soon be coming to an end. As Fortune reports, Capital Economics' chief markets economist John Higgins sees ominous parallels between the current market dynamics and the lead-up to the dotcom crash of the early 2000s. "If the aftermath of the dotcom era is any guide," Higgins wrote, "the bursting of the *next* bubble in the stock market—which we forecast will occur in 2027—might be followed by periods in which small-cap and value stocks outperformed their peers for a very long time."

Trouble Ahead?

The bigger picture here is that the recent shift in investor sentiment, with small-cap, value, and defensive stocks outperforming their large-cap, growth, and cyclical counterparts, could be an early warning sign. As Reuters reports, Higgins views this rotation as a "warning of trouble ahead" and a potential harbinger of more dramatic changes to come.

This is not the first time that market watchers have sounded the alarm on lofty valuations and the risk of a painful correction. As The Wall Street Journal reported late last year, the CEOs of both Morgan Stanley and Goldman Sachs have warned of a significant selloff, potentially as much as 20%, over the next two years.

A Reckoning on the Horizon?

While high valuations alone don't necessarily spell doom for the markets, the experts agree that a day of reckoning seems to be on the horizon. As UBS's chief investment officer Mark Haefele told CNBC, declines will likely come "when corporate profit growth disappoints, with forward returns more correlated with changes in earnings expectations over the next 12 months."

In other words, the current market euphoria, fueled in part by the rise of AI and other disruptive technologies, may have gone too far. And as investors start to recalibrate their expectations, the consequences could be severe. The only question that remains is when the bubble will finally burst.