Over long periods of time, investing in the stock market is undoubtedly one of the best wealth-generation tools available to the average person. Just in the last decade, including dividends, the S&P 500 and Nasdaq Composite index have returned 328% and 237%, respectively. These are magnificent gains.

Nowadays, the S&P 500 and Nasdaq Composite index are both in record territory thanks to their impressive bull runs. It looks like investor optimism is at elevated levels.

So, is now still a smart time to buy stocks with the intention of holding them for the next 10 years? Here's what history says your returns could be.

It's all about valuation

Vanguard, a nearly 50-year-old asset manager that has trillions of dollars under management, maintains what's called the Vanguard Capital Markets Model. It analyzes historical data to try and predict what returns will be over the next 10 years.

According to this model, U.S. equities are set to produce annualized returns of just 4.7% in the next decade. That's a huge slowdown from the past decade.

It's pretty easy to understand why Vanguard's model has these muted expectations. It all comes down to valuation. All else being equal, investors should want to pay lower valuations for the stocks that they own. This adds upside to the return potential.

The S&P 500 CAPE ratio is an insightful tool to measure valuation. It says the S&P 500's current CAPE ratio sits at 34, 36% higher than what it was exactly 10 years ago. And it represents a 63% premium to 30 years ago. The takeaway is that valuations have trended higher over the past few decades.

Declining interest rates since the 1980s have definitely played a role here. As the yields that investors can earn on fixed-income securities fall, they seek higher returns in riskier assets. Consequently, more capital flows to equities. If the Federal Reserve starts to cut rates this year or next, we could continue to see valuations expand further.

More recently, however, skyrocketing tech-enabled enterprises, most notably the "Magnificent Seven," have been a key factor impacting valuations. The average return of these seven stocks was a staggering 111% in 2023. They generally trade at expensive P/E ratios. And because they currently represent just under 30% of the entire S&P 500, they can lift the valuation of the broader index.

This just means that if investors want to find companies that can outperform the market, they might want to consider under-the-radar names that aren't seeing their valuations get stretched from the AI boom.

Trader pondering looking at stock charts. on screens.

Image source: Getty Images.

Don't be discouraged

No one really knows what's going to happen with stocks going forward. Making accurate forecasts is impossible to do consistently. Even well-respected firms like Vanguard can't do this. It's still important to figure out where things stand today, though.

However, I do believe the outlook does make sense. Investors can't pay higher and higher valuations and expect strong returns going forward. I guess time will tell what the future holds.

All of this might be discouraging for people who are early on in their investing journeys. Why put money to work right now when returns will be weak?

To be clear, I believe that it's always a smart time to invest money in the stock market. Studies have shown that trying to time the market to take advantage of the dips is a losing game. Instead, it's best to invest early and often, adopting a dollar-cost average strategy with a long-term mentality. The market will continue to reward patient investors.