If you've invested your money in the broader benchmark S&P 500 (^GSPC 0.13%) index over the last five years, then you've done quite well. The index recently registered all-time highs and was up close to 96% over the last five years (as of July 7). A large part of the success can be attributed to a handful of high-flying artificial intelligence (AI) stocks that have reached multitrillion-dollar market caps, effectively putting the rest of the index on their backs.

However, value investors who like to go fishing for small- and mid-cap stocks in the S&P 400 (^MID) and S&P 600 indexes haven't fared as well, lagging the S&P 500, especially for small-cap stocks in the S&P 600. Luckily, by some historical metrics, history says this could be about to change.

A wide discount between the indexes

While the five-year charts don't look so bad, the three-year chart is worse, especially for the S&P 600, which gained about 22.5% over the last three years, compared to the S&P 500's 63% gain.

Person looking at charts on computer.

Image source: Getty Images.

In fact, on a forward price-to-earnings basis, the gap between small- and mid-cap stocks and large-cap stocks in the S&P 500 hasn't been this wide in decades, according to Tobias Carlisle, a portfolio manager at the Acquirers Funds.

As you can see above, small- and mid-cap stocks have more or less been stagnant over the last 3.5 years. They've faced difficulties from the high interest rate environment, which increases their cost of debt; concerns about a recession; and more recently uncertainty over tariffs and how that might impact their businesses. Carlisle points out that the last time this happened, the S&P 400 and 600 indexes went on to widely outperform large-cap stocks in the S&P 500 for well over a decade -- and he wasn't kidding.

^SPX Chart

Data by YCharts

There are, of course, different periods of time within this larger time frame that large-cap stocks may have performed better or not underperformed as much, but small and medium caps pretty regularly held a lead. Part of the reason for this could have been the zero interest rate policy (ZIRP) that ensued after the Great Recession in 2008 all the way until the end of 2018.

When rates fall and safer assets yield less, investors take more of a risk-on approach, which makes small- and mid-cap stocks more appealing. A ZIRP environment also carries other advantages, like a lower cost to borrow, as mentioned above, and can result in more economic activity.

Are small- and mid-caps about to break out?

Investors should always keep in mind that while history often rhymes, it rarely repeats itself. That means that while data can be helpful in informing investment decisions, it doesn't predict the future, so there's certainly a chance that small- and mid-caps don't go on to outperform.

It seems unlikely that the Federal Reserve will revert to a ZIRP environment anytime soon, unless the economy really struggles, and some are worried about a higher inflationary environment down the line, whether due to tariffs or U.S. fiscal concerns.

That said, there are potential tailwinds that could lift small- and mid-cap stocks. The market is forecasting two interest rate cuts in the back half of the year, and some market strategists like Morgan Stanley see the rate cuts accelerating in 2026 -- they are calling for seven next year. Furthermore, at some point, President Donald Trump is likely to finalize tariffs, which, at the very least, will give businesses clarity, even if they are higher than expected. The recently passed U.S. budget reconciliation bill also firmed up tax cuts for corporations that were first implemented in Trump's first term, which could help with growth.

Ultimately, I do think the more attractively priced small- and mid-cap groups are poised for a breakout at some point. It's not a guarantee, so don't bet the farm, but having some exposure to this group in your portfolio is a good idea.